Skip to content

Commit

Permalink
rebase with main
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyems committed Apr 11, 2024
2 parents 10762e1 + bc503fb commit c3df56f
Show file tree
Hide file tree
Showing 94 changed files with 3,311 additions and 1,979 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/linux-cpu-arm64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ jobs:
run: |
docker run --rm \
--volume $GITHUB_WORKSPACE:/onnxruntime_src \
-w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "ls -l /onnxruntime_src/build/gcc_cpu/release/test/"
-w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "ls -l /onnxruntime_src/build/cpu/test/"
- name: Docker -- Run tests
run: |
docker run --rm \
--volume $GITHUB_WORKSPACE:/onnxruntime_src \
-w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/onnxruntime_src/build/gcc_cpu/release/test/unit_tests"
-w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/onnxruntime_src/build/cpu/test/unit_tests"
6 changes: 3 additions & 3 deletions .github/workflows/linux-cpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Install the python wheel and test dependencies
run: |
python3 -m pip install build/gcc_cpu/release/wheel/onnxruntime_genai*.whl
python3 -m pip install build/cpu/wheel/onnxruntime_genai*.whl
python3 -m pip install -r test/python/requirements-nightly-cpu.txt --user
- name: Get HuggingFace Token
Expand All @@ -59,9 +59,9 @@ jobs:
if: always()
continue-on-error: true
run: |
ls -l ${{ github.workspace }}/build/gcc_cpu/release
ls -l ${{ github.workspace }}/build/cpu
- name: Run tests
run: |
set -e -x
./build/gcc_cpu/release/test/unit_tests
./build/cpu/test/unit_tests
6 changes: 3 additions & 3 deletions .github/workflows/linux-cpu-x64-nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ jobs:
run: |
set -e -x
rm -rf build
cmake --preset linux_clang_cpu_release
cmake --build --preset linux_clang_cpu_release
cmake --preset linux_gcc_cpu_release
cmake --build --preset linux_gcc_cpu_release
- name: Install the python wheel and test dependencies
run: |
python3 -m pip install build/clang_cpu/release/wheel/onnxruntime_genai*.whl
python3 -m pip install build/cpu/wheel/onnxruntime_genai*.whl
python3 -m pip install -r test/python/requirements-nightly-cpu.txt --user
- name: Get HuggingFace Token
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux-gpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
--gpus all \
--rm \
--volume $GITHUB_WORKSPACE:/onnxruntime_src \
-w /onnxruntime_src ort_genai_linux_gpu_gha bash -c "python3 -m pip install /onnxruntime_src/build/gcc_cuda/release/wheel/onnxruntime_genai*.whl --user && python3 -m pip install -r test/python/requirements.txt --user && python3 test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models"
-w /onnxruntime_src ort_genai_linux_gpu_gha bash -c "python3 -m pip install /onnxruntime_src/build/cuda/wheel/onnxruntime_genai*.whl --user && python3 -m pip install -r test/python/requirements.txt --user && python3 test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models"
- name: Docker -- Run tests
run: |
Expand All @@ -72,4 +72,4 @@ jobs:
--gpus all \
--rm \
--volume $GITHUB_WORKSPACE:/onnxruntime_src \
-w /onnxruntime_src ort_genai_linux_gpu_gha bash -c "/onnxruntime_src/build/gcc_cuda/release/test/unit_tests"
-w /onnxruntime_src ort_genai_linux_gpu_gha bash -c "/onnxruntime_src/build/cuda/test/unit_tests"
5 changes: 3 additions & 2 deletions .github/workflows/mac-cpu-arm64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ jobs:
run: |
mv ${{ env.ort_dir }} ort
- name: Build with CMake and Clang
- name: Configure CMake
run: |
cmake --preset macos_cpu_release
- name: Build with CMake
run: |
cmake --preset macos_cpu_release
cmake --build --preset macos_cpu_release --parallel
continue-on-error: false

Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/win-cpu-arm64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
ort_dir: "onnxruntime-win-arm64-1.17.1"
ort_zip: "$(ort_dir).zip"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/$(ort_zip)"
cmake_build_dir: 'build/release/cpu_default'
binaryDir: 'build/cpu'

jobs:
windows-cpu-arm64-build:
Expand Down Expand Up @@ -45,14 +45,17 @@ jobs:
run: |
Rename-Item -Path $env:ort_dir -NewName ort
- name: Build with CMake
- name: Configure CMake
run: |
cmake --preset windows_arm64_cpu_release
- name: Build with CMake
run: |
cmake --build --preset windows_arm64_cpu_release --parallel
- name: Install the Python Wheel and Test Dependencies
run: |
python -m pip install (Get-ChildItem ("$env:cmake_build_dir\wheel\*.whl"))
python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl"))
python -m pip install -r test\python\requirements.txt
- name: Run the Python Tests
Expand All @@ -62,15 +65,15 @@ jobs:
- name: Build the C# API and Run the C# Tests
run: |
cd test\csharp
dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:cmake_build_dir\Release"
dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release"
- name: Verify Build Artifacts
if: always()
continue-on-error: true
run: |
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:cmake_build_dir -Recurse
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:cmake_build_dir\test -Recurse
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir\test -Recurse
- name: Run tests
run: |
.\build\release\cpu_default\test\Release\unit_tests.exe
.\build\cpu\test\Release\unit_tests.exe
17 changes: 10 additions & 7 deletions .github/workflows/win-cpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
ort_dir: "onnxruntime-win-x64-1.17.1"
ort_zip: "$(ort_dir).zip"
ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.1/$(ort_zip)"
cmake_build_dir: 'build/release/cpu_default'
binaryDir: 'build/cpu'

jobs:
windows-cpu-x64-build:
Expand Down Expand Up @@ -52,14 +52,17 @@ jobs:
with:
languages: 'cpp'

- name: Build with CMake
- name: Configure CMake
run: |
cmake --preset windows_x64_cpu_release
- name: Build with CMake
run: |
cmake --build --preset windows_x64_cpu_release --parallel
- name: Install the python wheel and test dependencies
run: |
python -m pip install (Get-ChildItem ("$env:cmake_build_dir\wheel\*.whl"))
python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl"))
python -m pip install -r test\python\requirements-nightly-cpu.txt
- name: Get HuggingFace Token
Expand All @@ -76,18 +79,18 @@ jobs:
- name: Build the C# API and Run the C# Tests
run: |
cd test\csharp
dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:cmake_build_dir\Release"
dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release"
- name: Verify Build Artifacts
if: always()
continue-on-error: true
run: |
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:cmake_build_dir -Recurse
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:cmake_build_dir\test -Recurse
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir\test -Recurse
- name: Run tests
run: |
.\build\release\cpu_default\test\Release\unit_tests.exe
.\build\cpu\test\Release\unit_tests.exe
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/win-gpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
cuda_dir: "${{ github.workspace }}\\cuda_sdk"
cuda_version: "11.8"
CUDA_PATH: ${{ github.workspace }}\\cuda_sdk\\v11.8
cmake_build_dir: 'build/release/cuda_default'
binaryDir: 'build/cuda'


jobs:
Expand Down Expand Up @@ -47,9 +47,12 @@ jobs:
run: |
Rename-Item -Path $env:ort_dir -NewName ort
- name: Build with CMake
- name: Configure CMake
run: |
cmake --preset windows_x64_cuda_release -T cuda=${{ env.cuda_dir }}\\v${{ env.cuda_version }} -DTEST_PHI2=False
- name: Build with CMake
run: |
cmake --build --preset windows_x64_cuda_release --parallel
- name: Add CUDA to PATH
Expand All @@ -58,7 +61,7 @@ jobs:
- name: Install the Python Wheel and Test Dependencies
run: |
python -m pip install (Get-ChildItem ("$env:cmake_build_dir\wheel\*.whl"))
python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl"))
python -m pip install -r test\python\requirements-nightly-cpu.txt
- name: Get HuggingFace Token
Expand All @@ -75,17 +78,17 @@ jobs:
- name: Build the C# API and Run the C# Tests
run: |
cd test\csharp
dotnet test /p:Configuration=release /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:cmake_build_dir\Release"
dotnet test /p:Configuration=release /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release"
- name: Verify Build Artifacts
if: always()
continue-on-error: true
run: |
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:cmake_build_dir -Recurse
Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse
- name: Prepend CUDA to PATH and Run tests
run: |
$env:PATH = "${{ env.cuda_dir }}\\v${{ env.cuda_version }}\\bin;" + $env:PATH
echo "Current PATH variable is: $env:PATH"
.\build\release\cuda_default\test\Release\unit_tests.exe
.\build\cuda\test\Release\unit_tests.exe
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/test/test_models/*
/cache_models
/onnxruntime-linux-x64-*
/*.csv
*.csv
.idea
cache_dir
example-models
Expand Down
7 changes: 6 additions & 1 deletion .pipelines/nuget-publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ parameters:
- '12.2'
default: '11.8'

- name: publish_to_ado_feed
displayName: 'Publish to Azure DevOps Feed'
type: boolean
default: false

resources:
repositories:
- repository: manylinux
Expand All @@ -51,4 +56,4 @@ stages:
enable_linux_cuda: ${{ parameters.enable_linux_cuda }}
ort_version: ${{ parameters.ort_version }}
cuda_version: ${{ parameters.cuda_version }}

publish_to_ado_feed: ${{ parameters.publish_to_ado_feed }}
6 changes: 6 additions & 0 deletions .pipelines/pypl-publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@ parameters:
- '11.8'
- '12.2'

- name: publish_to_ado_feed
displayName: 'Whether to publish the packages to ADO feed.'
type: boolean
default: false

resources:
repositories:
- repository: manylinux
Expand All @@ -50,3 +55,4 @@ stages:
enable_win_cuda: ${{ parameters.enable_win_cuda }}
ort_version: ${{ parameters.ort_version }}
cuda_version: ${{ parameters.cuda_version }}
publish_to_ado_feed: ${{ parameters.publish_to_ado_feed }}
50 changes: 0 additions & 50 deletions .pipelines/stages/jobs/nuget-linux-packaging-job.yml

This file was deleted.

Loading

0 comments on commit c3df56f

Please sign in to comment.