From 9d1c57631dc8f6e7209f67987c1b09d0ae1d511d Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Tue, 3 Dec 2024 14:48:54 -0800 Subject: [PATCH 01/16] add debug pipelines --- .../workflows/linux-cpu-arm64-debug-build.yml | 95 +++++++++++ .../workflows/linux-cpu-x64-debug-build.yml | 104 ++++++++++++ .../workflows/linux-gpu-x64-debug-build.yml | 151 ++++++++++++++++++ .../workflows/win-cpu-arm64-debug-build.yml | 89 +++++++++++ .github/workflows/win-cpu-x64-debug-build.yml | 109 +++++++++++++ .../workflows/win-cuda-x64-debug-build.yml | 109 +++++++++++++ 6 files changed, 657 insertions(+) create mode 100644 .github/workflows/linux-cpu-arm64-debug-build.yml create mode 100644 .github/workflows/linux-cpu-x64-debug-build.yml create mode 100644 .github/workflows/linux-gpu-x64-debug-build.yml create mode 100644 .github/workflows/win-cpu-arm64-debug-build.yml create mode 100644 .github/workflows/win-cpu-x64-debug-build.yml create mode 100644 .github/workflows/win-cuda-x64-debug-build.yml diff --git a/.github/workflows/linux-cpu-arm64-debug-build.yml b/.github/workflows/linux-cpu-arm64-debug-build.yml new file mode 100644 index 000000000..ea3ecda87 --- /dev/null +++ b/.github/workflows/linux-cpu-arm64-debug-build.yml @@ -0,0 +1,95 @@ +name: "Linux CPU ARM64 Build" +on: + workflow_dispatch: + push: + branches: + - main + - rel-* + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +env: + ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" + ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" + ORT_NIGHTLY_SOURCE: "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/nuget/v3/index.json" + DOTNET_INSTALL_DIR: "${{ github.workspace }}/dotnet" + +jobs: + linux-cpu-arm64-build: + runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2004-ARM-CPU" ] + steps: + - name: Checkout OnnxRuntime GenAI repo + uses: actions/checkout@v4 + with: + submodules: 'true' + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Get the Latest OnnxRuntime Nightly Version + shell: pwsh + run: | + $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" + $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion + Write-Host "$ORT_NIGHTLY_VERSION" + "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Download OnnxRuntime Nightly + run: | + dotnet new console + dotnet add package ${{ env.ORT_PACKAGE_NAME }} --version ${{ env.ORT_NIGHTLY_VERSION }} --source ${{ env.ORT_NIGHTLY_SOURCE }} --package-directory . + dotnet build + continue-on-error: true + + - name: list files + shell: bash + run: | + ls -l + ls -R microsoft.ml.onnxruntime + continue-on-error: true + +# TODO: Find out why do we need to to have libonnxruntime.so.$ort_version + - name: Extract OnnxRuntime library and header files + run: | + mkdir -p ort/lib + mv microsoft.ml.onnxruntime/**/build/native/include ort/ + mv microsoft.ml.onnxruntime/**/runtimes/linux-arm64/native/* ort/lib/ + cp ort/lib/libonnxruntime.so ort/lib/libonnxruntime.so.1 + + - name: Download Docker Image + run: | + set -e -x + az login --identity --username 63b63039-6328-442f-954b-5a64d124e5b4 + az acr login --name onnxruntimebuildcache --subscription 00c06639-6ee4-454e-8058-8d8b1703bd87 + python3 tools/ci_build/get_docker_image.py --dockerfile tools/ci_build/github/linux/docker/inference/aarch64/default/cpu/Dockerfile \ + --context tools/ci_build/github/linux/docker/inference/aarch64/default/cpu \ + --docker-build-args "--build-arg BUILD_UID=$( id -u )" \ + --container-registry onnxruntimebuildcache \ + --repository ort_genai_linux_arm64_gha + + - name: Docker -- Configure with CMake and GCC + run: | + docker run --rm \ + --volume $GITHUB_WORKSPACE:/onnxruntime_src \ + -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/usr/bin/cmake --preset linux_gcc_cpu_debug" + + - name: Docker -- Build with CMake and GCC + run: | + docker run --rm \ + --volume $GITHUB_WORKSPACE:/onnxruntime_src \ + -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/usr/bin/cmake --build --preset linux_gcc_cpu_debug" + + - name: Docker -- Check test directory + run: | + docker run --rm \ + --volume $GITHUB_WORKSPACE:/onnxruntime_src \ + -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 "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/onnxruntime_src/ort/lib/ /onnxruntime_src/build/cpu/unit_tests" diff --git a/.github/workflows/linux-cpu-x64-debug-build.yml b/.github/workflows/linux-cpu-x64-debug-build.yml new file mode 100644 index 000000000..d9ce2230c --- /dev/null +++ b/.github/workflows/linux-cpu-x64-debug-build.yml @@ -0,0 +1,104 @@ +name: "Linux CPU x64 Build" +on: + workflow_dispatch: + push: + branches: + - main + - rel-* + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +env: + ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" + ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" + ORT_NIGHTLY_SOURCE: "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/nuget/v3/index.json" + DOTNET_INSTALL_DIR: "${{ github.workspace }}/dotnet" +jobs: + linux_cpu_x64: + runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2204-AMD-CPU" ] + steps: + - name: Checkout OnnxRuntime GenAI repo + uses: actions/checkout@v4 + with: + submodules: true + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Get the Latest OnnxRuntime Nightly Version + shell: pwsh + run: | + $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" + $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion + Write-Host "$ORT_NIGHTLY_VERSION" + "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Download OnnxRuntime Nightly + run: | + dotnet new console + dotnet add package ${{ env.ORT_PACKAGE_NAME }} --version ${{ env.ORT_NIGHTLY_VERSION }} --source ${{ env.ORT_NIGHTLY_SOURCE }} --package-directory . + dotnet build + continue-on-error: true + + - name: list files + shell: bash + run: | + ls -l + ls -R ${{ env.ORT_PACKAGE_NAME }} + continue-on-error: true + +# TODO: Find out why do we need to to have libonnxruntime.so.$ort_version + - name: Extract OnnxRuntime library and header files + run: | + set -e -x + mkdir -p ort/lib + mv microsoft.ml.onnxruntime/${{ env.ORT_NIGHTLY_VERSION }}/build/native/include ort/ + mv microsoft.ml.onnxruntime/${{ env.ORT_NIGHTLY_VERSION }}/runtimes/linux-x64/native/* ort/lib/ + cp ort/lib/libonnxruntime.so ort/lib/libonnxruntime.so.1 + + - name: Build with CMake and GCC + run: | + set -e -x + rm -rf build + cmake --preset linux_gcc_cpu_debug + cmake --build --preset linux_gcc_cpu_debug + + - name: Install the python wheel and test dependencies + run: | + python3 -m pip install -r test/python/requirements.txt --user + python3 -m pip install -r test/python/cpu/torch/requirements.txt --user + python3 -m pip install -r test/python/cpu/ort/requirements.txt --user + python3 -m pip install --user --no-index --no-deps --find-links build/cpu/wheel onnxruntime_genai + + - name: Use Dummy HuggingFace Token + run: | + echo "HF_TOKEN=12345" >> $GITHUB_ENV + + - name: Verify Build Artifacts + if: always() + continue-on-error: true + run: | + ls -l ${{ github.workspace }}/build/cpu + ls -l ${{ github.workspace }}/build/cpu/wheel + + # This will also download all the test models to the test/test_models directory + # These models are used by the python tests as well as C#, C++ and others. + - name: Run the python tests + run: | + export ORTGENAI_LOG_ORT_LIB=1 + python3 test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models + + - name: Build the C# API and Run the C# Tests + run: | + export ORTGENAI_LOG_ORT_LIB=1 + cd test/csharp + dotnet test /p:Configuration=Debug /p:NativeBuildOutputDir="../../build/cpu/" /p:OrtLibDir="../../ort/lib/" --verbosity normal + + - name: Run tests + run: | + set -e -x + export ORTGENAI_LOG_ORT_LIB=1 + export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/ort/lib + ./build/cpu/unit_tests diff --git a/.github/workflows/linux-gpu-x64-debug-build.yml b/.github/workflows/linux-gpu-x64-debug-build.yml new file mode 100644 index 000000000..deae5df96 --- /dev/null +++ b/.github/workflows/linux-gpu-x64-debug-build.yml @@ -0,0 +1,151 @@ +name: "Linux CUDA x64 Build" +on: + workflow_dispatch: + push: + branches: + - main + - rel-* + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime.Gpu.Linux&api-version=6.0-preview.1" + ORT_PACKAGE_NAME: Microsoft.ML.OnnxRuntime.Gpu.Linux + ORT_NIGHTLY_SOURCE: "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/nuget/v3/index.json" + DOTNET_INSTALL_DIR: "${{ github.workspace }}/dotnet" + +jobs: + linux-cuda-x64-build: + env : + PYTHON_EXECUTABLE: "/opt/python/cp310-cp310/bin/python3.10" + runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2204-A10" ] + steps: + - name: Checkout OnnxRuntime GenAI repo + uses: actions/checkout@v4 + with: + submodules: true +# We are using the same manylinux repo as the one used in the packaging build + - name: Checkout ManyLinux repo + uses: actions/checkout@v4 + with: + repository: pypa/manylinux + ref: 5eda9aded5462201e6310105728d33016e637ea7 + clean: true + path: manylinux + submodules: true + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Get the Latest OnnxRuntime Nightly Version + shell: pwsh + run: | + $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" + $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion + Write-Host "$ORT_NIGHTLY_VERSION" + "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Download OnnxRuntime Nightly + run: | + dotnet new console + dotnet add package ${{ env.ORT_PACKAGE_NAME }} --version ${{ env.ORT_NIGHTLY_VERSION }} --source ${{ env.ORT_NIGHTLY_SOURCE }} --package-directory . + dotnet build + continue-on-error: true + + - name: list files + shell: bash + run: | + ls -l + ls -R ${{ env.ORT_PACKAGE_NAME }} + continue-on-error: true + + - name: Extract OnnxRuntime library and header files + run: | + set -e -x + mkdir -p ort/lib + mv microsoft.ml.onnxruntime.gpu.linux/${{ env.ORT_NIGHTLY_VERSION }}/buildTransitive/native/include ort/ + mv microsoft.ml.onnxruntime.gpu.linux/${{ env.ORT_NIGHTLY_VERSION }}/runtimes/linux-x64/native/* ort/lib/ + cp ort/lib/libonnxruntime.so ort/lib/libonnxruntime.so.1 + + + - name: Get Docker Image + run: | + set -e -x + az login --identity --username 63b63039-6328-442f-954b-5a64d124e5b4 + az acr login --name onnxruntimebuildcache --subscription 00c06639-6ee4-454e-8058-8d8b1703bd87 + python3 tools/ci_build/get_docker_image.py --dockerfile tools/ci_build/github/linux/docker/manylinux/Dockerfile.manylinux2_28_cuda_12.2 \ + --context tools/ci_build/github/linux/docker/manylinux \ + --docker-build-args "--build-arg BUILD_UID=$( id -u )" \ + --container-registry onnxruntimebuildcache \ + --manylinux-src manylinux \ + --multiple_repos \ + --repository onnxruntimecudabuildx64 + + - name: Config with Cmake in Docker + run: | + set -e -x + docker run \ + --gpus all \ + --rm \ + --volume $GITHUB_WORKSPACE:/ort_genai_src \ + -w /ort_genai_src onnxruntimecudabuildx64 \ + bash -c " \ + /usr/bin/cmake --preset linux_gcc_cuda_debug \ + -DMANYLINUX=ON \ + -DPYTHON_EXECUTABLE=${{ env.PYTHON_EXECUTABLE }} " + + - name: Build with Cmake in Docker + run: | + set -e -x + docker run \ + --gpus all \ + --rm \ + --volume $GITHUB_WORKSPACE:/ort_genai_src \ + -w /ort_genai_src onnxruntimecudabuildx64 \ + bash -c " \ + /usr/bin/cmake --build --preset linux_gcc_cuda_debug" + + - name: Use Dummy HuggingFace Token + run: | + echo "HF_TOKEN=12345" >> $GITHUB_ENV + + - name: Install the onnxruntime-genai Python wheel and run python test + run: | + echo "Installing the onnxruntime-genai Python wheel and running the Python tests" + docker run \ + --gpus all \ + --rm \ + --volume /data/ortgenai_pytorch_models:/data/ortgenai_pytorch_models \ + --volume $GITHUB_WORKSPACE:/ort_genai_src \ + -e HF_TOKEN=$HF_TOKEN \ + -w /ort_genai_src onnxruntimecudabuildx64 bash -c " \ + ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/requirements.txt --user && \ + ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/cuda/torch/requirements.txt --user && \ + ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/cuda/ort/requirements.txt --user && \ + ${{ env.PYTHON_EXECUTABLE }} -m pip install /ort_genai_src/build/cuda/wheel/onnxruntime_genai*manylinux*.whl --no-deps --user && \ + ${{ env.PYTHON_EXECUTABLE }} test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models --e2e" + + # TODO: Enable this by adding dotnet to the docker image + # - name: Build the C# API and Run the C# Tests + # run: | + # echo "Building the C# API and running the C# tests" + # docker run \ + # --gpus all \ + # --rm \ + # --volume $GITHUB_WORKSPACE:/ort_genai_src \ + # -w /ort_genai_src/test/csharp onnxruntimecudabuildx64 bash -c " \ + # dotnet test /p:NativeBuildOutputDir='/ort_genai_src/build/cuda/'" + + - name: Docker -- Run unit tests + run: | + echo "Running docker image onnxruntimecudabuildx64" + docker run \ + --gpus all \ + --rm \ + --volume /data/ortgenai_pytorch_models:/data/ortgenai_pytorch_models \ + --volume $GITHUB_WORKSPACE:/ort_genai_src \ + -w /ort_genai_src onnxruntimecudabuildx64 bash -c "ORTGENAI_LOG_ORT_LIB=1 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/ort_genai_src/build/cuda/ /ort_genai_src/build/cuda/unit_tests" diff --git a/.github/workflows/win-cpu-arm64-debug-build.yml b/.github/workflows/win-cpu-arm64-debug-build.yml new file mode 100644 index 000000000..4ab184ed0 --- /dev/null +++ b/.github/workflows/win-cpu-arm64-debug-build.yml @@ -0,0 +1,89 @@ +name: "Windows CPU arm64 Build" +on: + workflow_dispatch: + push: + branches: + - main + - rel-* + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +env: + binaryDir: 'build/cpu/win-arm64' + ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" + ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" + +jobs: + windows-cpu-arm64-build: + runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-win11-arm64-cpu" ] + steps: + - name: Checkout OnnxRuntime GenAI repo + uses: actions/checkout@v4 + with: + submodules: true + + - name: Setup Visual Studio 2022 + uses: microsoft/setup-msbuild@v1.1 + with: + vs-version: '17.4' + msbuild-architecture: arm64 + + - uses: nuget/setup-nuget@v2 + with: + nuget-version: '5.x' + + - name: Download OnnxRuntime Nightly + shell: powershell + run: | + $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" + $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion + Write-Host "$ORT_NIGHTLY_VERSION" + "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append + nuget install ${{ env.ORT_PACKAGE_NAME }} -version $ORT_NIGHTLY_VERSION -x -NonInteractive + + - run: Get-ChildItem ${{ env.ORT_PACKAGE_NAME }} -Recurse + continue-on-error: true + + - name: Extract OnnxRuntime library and header files + run: | + mkdir ort/lib + move ${{ env.ORT_PACKAGE_NAME }}/build/native/include ort/ + move ${{ env.ORT_PACKAGE_NAME }}/runtimes/win-arm64/native/* ort/lib/ + + - name: Configure CMake + run: | + python -m pip install wheel + cmake --preset windows_arm64_cpu_debug + + - name: Build with CMake + run: | + cmake --build --preset windows_arm64_cpu_debug --parallel + + - name: Build the C# API and Run the C# Tests + run: | + cd test\csharp + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" + + - name: Install the Python Wheel and Test Dependencies + run: | + python -m pip install "numpy<2" coloredlogs flatbuffers packaging protobuf sympy pytest + python -m pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly-qnn + python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) --no-deps + + - name: Run the Python Tests + run: | + python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" + + - name: Verify Build Artifacts + if: always() + continue-on-error: true + run: | + Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse + Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir\test -Recurse + + - name: Run tests + run: | + copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Debug + & .\$env:binaryDir\Debug\unit_tests.exe \ No newline at end of file diff --git a/.github/workflows/win-cpu-x64-debug-build.yml b/.github/workflows/win-cpu-x64-debug-build.yml new file mode 100644 index 000000000..1e1f0f69c --- /dev/null +++ b/.github/workflows/win-cpu-x64-debug-build.yml @@ -0,0 +1,109 @@ +name: "Windows CPU x64 Build" +on: + workflow_dispatch: + push: + branches: + - main + - rel-* + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true +env: + binaryDir: 'build/cpu/win-x64' + ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" + ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" + +jobs: + windows-cpu-x64-build: + runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Win2022-CPU" ] + permissions: + security-events: write + actions: read + steps: + - name: Checkout OnnxRuntime GenAI repo + uses: actions/checkout@v4 + with: + submodules: true + + - uses: actions/setup-python@v5 + with: + python-version: '3.11.x' + architecture: 'x64' + + - name: Setup Visual Studio 2022 + uses: microsoft/setup-msbuild@v1.1 + with: + vs-version: '17.5' + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Download OnnxRuntime Nightly + shell: pwsh + run: | + $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" + $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion + Write-Host "$ORT_NIGHTLY_VERSION" + "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append + nuget install ${{ env.ORT_PACKAGE_NAME }} -version $ORT_NIGHTLY_VERSION -x -NonInteractive + + - run: Get-ChildItem ${{ env.ORT_PACKAGE_NAME }} -Recurse + continue-on-error: true + + - name: Extract OnnxRuntime library and header files + run: | + mkdir ort/lib + move ${{ env.ORT_PACKAGE_NAME }}/build/native/include ort/ + move ${{ env.ORT_PACKAGE_NAME }}/runtimes/win-x64/native/* ort/lib/ + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: 'cpp' + + - name: Configure CMake + run: | + cmake --preset windows_x64_cpu_debug + + - name: Build with CMake + run: | + cmake --build --preset windows_x64_cpu_debug --parallel + + - name: Install the python wheel and test dependencies + run: | + python3 -m pip install -r test\python\requirements.txt --user + python3 -m pip install -r test\python\cpu\torch\requirements.txt --user + python3 -m pip install -r test\python\cpu\ort\requirements.txt --user + python3 -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) --no-deps + + - name: Use Dummy HuggingFace Token + run: | + Add-Content -Path $env:GITHUB_ENV -Value "HF_TOKEN=12345" + + - name: Run the Python Tests + run: | + python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" + + - name: Build the C# API and Run the C# Tests + run: | + cd test\csharp + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" --verbosity normal + + - name: Verify Build Artifacts + if: always() + continue-on-error: true + run: | + Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse + Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir\test -Recurse + + - name: Run tests + run: | + copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Debug + & .\$env:binaryDir\Debug\unit_tests.exe + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + diff --git a/.github/workflows/win-cuda-x64-debug-build.yml b/.github/workflows/win-cuda-x64-debug-build.yml new file mode 100644 index 000000000..ab1fdeb88 --- /dev/null +++ b/.github/workflows/win-cuda-x64-debug-build.yml @@ -0,0 +1,109 @@ +name: "Windows CUDA x64 Build" +on: + workflow_dispatch: + push: + branches: + - main + - rel-* + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + AZCOPY_AUTO_LOGIN_TYPE: MSI + AZCOPY_MSI_CLIENT_ID: 63b63039-6328-442f-954b-5a64d124e5b4 + cuda_dir: "${{ github.workspace }}\\cuda_sdk" + cuda_version: "12.2" + CUDA_PATH: ${{ github.workspace }}\\cuda_sdk\\v12.2 + binaryDir: 'build/cuda/win-x64' + ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime.Gpu.Windows&api-version=6.0-preview.1" + ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime.Gpu.Windows" + +jobs: + windows-cuda-x64-build: + runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Win2022-GPU-A10" ] + steps: + - name: Checkout OnnxRuntime GenAI repo + uses: actions/checkout@v4 + with: + submodules: true + + - uses: actions/setup-python@v5 + with: + python-version: '3.11.x' + architecture: 'x64' + + - name: Download cuda + run: | + azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v${{ env.cuda_version }}" ${{ env.cuda_dir}} + + - uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Download OnnxRuntime Nightly + shell: pwsh + run: | + $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" + $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion + Write-Host "$ORT_NIGHTLY_VERSION" + "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append + nuget install ${{ env.ORT_PACKAGE_NAME }} -version $ORT_NIGHTLY_VERSION -ExcludeVersion -NonInteractive + + - run: Get-ChildItem ${{ env.ORT_PACKAGE_NAME }} -Recurse + continue-on-error: true + + - name: Extract OnnxRuntime library and header files + run: | + mkdir ort/lib + move ${{ env.ORT_PACKAGE_NAME }}/buildTransitive/native/include ort/ + move ${{ env.ORT_PACKAGE_NAME }}/runtimes/win-x64/native/* ort/lib/ + + - name: Configure CMake + run: | + cmake --preset windows_x64_cuda_debug -T cuda=${{ env.cuda_dir }}\\v${{ env.cuda_version }} + + - name: Build with CMake + run: | + cmake --build --preset windows_x64_cuda_debug --parallel + + - name: Add CUDA to PATH + run: | + echo "${{ env.cuda_dir }}\\v${{ env.cuda_version }}\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Install the Python Wheel and Test Dependencies + run: | + python -m pip install -r test\python\requirements.txt + python -m pip install -r test\python\cuda\torch\requirements.txt + python -m pip install -r test\python\cuda\ort\requirements.txt + python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) --no-deps + + - name: Use Dummy HuggingFace Token + run: | + Add-Content -Path $env:GITHUB_ENV -Value "HF_TOKEN=12345" + + - name: Run the Python Tests + run: | + python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" --e2e + + - name: Verify Build Artifacts + if: always() + continue-on-error: true + run: | + + Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse + + - name: Build the C# API and Run the C# Tests + run: | + $env:PATH = "${{ env.cuda_dir }}\\v${{ env.cuda_version }}\\bin;" + $env:PATH + cd test\csharp + dotnet test /p:Configuration=debug /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" + + - 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" + copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Debug + & .\$env:binaryDir\Debug\unit_tests.exe \ No newline at end of file From fffa1c764ced4a12087ecf36ce2d110f584fc5bf Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Tue, 3 Dec 2024 14:53:43 -0800 Subject: [PATCH 02/16] names --- .github/workflows/linux-cpu-arm64-debug-build.yml | 2 +- .github/workflows/linux-cpu-x64-debug-build.yml | 2 +- .github/workflows/linux-gpu-x64-debug-build.yml | 2 +- .github/workflows/win-cpu-arm64-debug-build.yml | 2 +- .github/workflows/win-cpu-x64-debug-build.yml | 2 +- .github/workflows/win-cuda-x64-debug-build.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/linux-cpu-arm64-debug-build.yml b/.github/workflows/linux-cpu-arm64-debug-build.yml index ea3ecda87..c678765ec 100644 --- a/.github/workflows/linux-cpu-arm64-debug-build.yml +++ b/.github/workflows/linux-cpu-arm64-debug-build.yml @@ -1,4 +1,4 @@ -name: "Linux CPU ARM64 Build" +name: "Linux CPU ARM64 Debug Build" on: workflow_dispatch: push: diff --git a/.github/workflows/linux-cpu-x64-debug-build.yml b/.github/workflows/linux-cpu-x64-debug-build.yml index d9ce2230c..30b65bc5a 100644 --- a/.github/workflows/linux-cpu-x64-debug-build.yml +++ b/.github/workflows/linux-cpu-x64-debug-build.yml @@ -1,4 +1,4 @@ -name: "Linux CPU x64 Build" +name: "Linux CPU x64 Debug Build" on: workflow_dispatch: push: diff --git a/.github/workflows/linux-gpu-x64-debug-build.yml b/.github/workflows/linux-gpu-x64-debug-build.yml index deae5df96..498425e5b 100644 --- a/.github/workflows/linux-gpu-x64-debug-build.yml +++ b/.github/workflows/linux-gpu-x64-debug-build.yml @@ -1,4 +1,4 @@ -name: "Linux CUDA x64 Build" +name: "Linux CUDA x64 Debug Build" on: workflow_dispatch: push: diff --git a/.github/workflows/win-cpu-arm64-debug-build.yml b/.github/workflows/win-cpu-arm64-debug-build.yml index 4ab184ed0..cb2bbf5af 100644 --- a/.github/workflows/win-cpu-arm64-debug-build.yml +++ b/.github/workflows/win-cpu-arm64-debug-build.yml @@ -1,4 +1,4 @@ -name: "Windows CPU arm64 Build" +name: "Windows CPU arm64 Debug Build" on: workflow_dispatch: push: diff --git a/.github/workflows/win-cpu-x64-debug-build.yml b/.github/workflows/win-cpu-x64-debug-build.yml index 1e1f0f69c..e1d42b19e 100644 --- a/.github/workflows/win-cpu-x64-debug-build.yml +++ b/.github/workflows/win-cpu-x64-debug-build.yml @@ -1,4 +1,4 @@ -name: "Windows CPU x64 Build" +name: "Windows CPU x64 Debug Build" on: workflow_dispatch: push: diff --git a/.github/workflows/win-cuda-x64-debug-build.yml b/.github/workflows/win-cuda-x64-debug-build.yml index ab1fdeb88..823313949 100644 --- a/.github/workflows/win-cuda-x64-debug-build.yml +++ b/.github/workflows/win-cuda-x64-debug-build.yml @@ -1,4 +1,4 @@ -name: "Windows CUDA x64 Build" +name: "Windows CUDA x64 Debug Build" on: workflow_dispatch: push: From 7b39688698b1d2d7e12296ebfa4d50ca3dbdf3bb Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Tue, 3 Dec 2024 14:58:42 -0800 Subject: [PATCH 03/16] run in debug delete speaparte debug --- .github/workflows/linux-cpu-arm64-build.yml | 4 +- .../workflows/linux-cpu-arm64-debug-build.yml | 95 ----------- .github/workflows/linux-cpu-x64-build.yml | 6 +- .../workflows/linux-cpu-x64-debug-build.yml | 104 ------------ .github/workflows/linux-gpu-x64-build.yml | 4 +- .../workflows/linux-gpu-x64-debug-build.yml | 151 ------------------ .github/workflows/win-cpu-arm64-build.yml | 10 +- .../workflows/win-cpu-arm64-debug-build.yml | 89 ----------- .github/workflows/win-cpu-x64-build.yml | 10 +- .github/workflows/win-cpu-x64-debug-build.yml | 109 ------------- .github/workflows/win-cuda-x64-build.yml | 10 +- .../workflows/win-cuda-x64-debug-build.yml | 109 ------------- 12 files changed, 22 insertions(+), 679 deletions(-) delete mode 100644 .github/workflows/linux-cpu-arm64-debug-build.yml delete mode 100644 .github/workflows/linux-cpu-x64-debug-build.yml delete mode 100644 .github/workflows/linux-gpu-x64-debug-build.yml delete mode 100644 .github/workflows/win-cpu-arm64-debug-build.yml delete mode 100644 .github/workflows/win-cpu-x64-debug-build.yml delete mode 100644 .github/workflows/win-cuda-x64-debug-build.yml diff --git a/.github/workflows/linux-cpu-arm64-build.yml b/.github/workflows/linux-cpu-arm64-build.yml index 362331591..ea3ecda87 100644 --- a/.github/workflows/linux-cpu-arm64-build.yml +++ b/.github/workflows/linux-cpu-arm64-build.yml @@ -74,13 +74,13 @@ jobs: run: | docker run --rm \ --volume $GITHUB_WORKSPACE:/onnxruntime_src \ - -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/usr/bin/cmake --preset linux_gcc_cpu_release" + -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/usr/bin/cmake --preset linux_gcc_cpu_debug" - name: Docker -- Build with CMake and GCC run: | docker run --rm \ --volume $GITHUB_WORKSPACE:/onnxruntime_src \ - -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/usr/bin/cmake --build --preset linux_gcc_cpu_release" + -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/usr/bin/cmake --build --preset linux_gcc_cpu_debug" - name: Docker -- Check test directory run: | diff --git a/.github/workflows/linux-cpu-arm64-debug-build.yml b/.github/workflows/linux-cpu-arm64-debug-build.yml deleted file mode 100644 index c678765ec..000000000 --- a/.github/workflows/linux-cpu-arm64-debug-build.yml +++ /dev/null @@ -1,95 +0,0 @@ -name: "Linux CPU ARM64 Debug Build" -on: - workflow_dispatch: - push: - branches: - - main - - rel-* - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true -env: - ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" - ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" - ORT_NIGHTLY_SOURCE: "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/nuget/v3/index.json" - DOTNET_INSTALL_DIR: "${{ github.workspace }}/dotnet" - -jobs: - linux-cpu-arm64-build: - runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2004-ARM-CPU" ] - steps: - - name: Checkout OnnxRuntime GenAI repo - uses: actions/checkout@v4 - with: - submodules: 'true' - - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - - name: Get the Latest OnnxRuntime Nightly Version - shell: pwsh - run: | - $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" - $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion - Write-Host "$ORT_NIGHTLY_VERSION" - "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Download OnnxRuntime Nightly - run: | - dotnet new console - dotnet add package ${{ env.ORT_PACKAGE_NAME }} --version ${{ env.ORT_NIGHTLY_VERSION }} --source ${{ env.ORT_NIGHTLY_SOURCE }} --package-directory . - dotnet build - continue-on-error: true - - - name: list files - shell: bash - run: | - ls -l - ls -R microsoft.ml.onnxruntime - continue-on-error: true - -# TODO: Find out why do we need to to have libonnxruntime.so.$ort_version - - name: Extract OnnxRuntime library and header files - run: | - mkdir -p ort/lib - mv microsoft.ml.onnxruntime/**/build/native/include ort/ - mv microsoft.ml.onnxruntime/**/runtimes/linux-arm64/native/* ort/lib/ - cp ort/lib/libonnxruntime.so ort/lib/libonnxruntime.so.1 - - - name: Download Docker Image - run: | - set -e -x - az login --identity --username 63b63039-6328-442f-954b-5a64d124e5b4 - az acr login --name onnxruntimebuildcache --subscription 00c06639-6ee4-454e-8058-8d8b1703bd87 - python3 tools/ci_build/get_docker_image.py --dockerfile tools/ci_build/github/linux/docker/inference/aarch64/default/cpu/Dockerfile \ - --context tools/ci_build/github/linux/docker/inference/aarch64/default/cpu \ - --docker-build-args "--build-arg BUILD_UID=$( id -u )" \ - --container-registry onnxruntimebuildcache \ - --repository ort_genai_linux_arm64_gha - - - name: Docker -- Configure with CMake and GCC - run: | - docker run --rm \ - --volume $GITHUB_WORKSPACE:/onnxruntime_src \ - -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/usr/bin/cmake --preset linux_gcc_cpu_debug" - - - name: Docker -- Build with CMake and GCC - run: | - docker run --rm \ - --volume $GITHUB_WORKSPACE:/onnxruntime_src \ - -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/usr/bin/cmake --build --preset linux_gcc_cpu_debug" - - - name: Docker -- Check test directory - run: | - docker run --rm \ - --volume $GITHUB_WORKSPACE:/onnxruntime_src \ - -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 "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/onnxruntime_src/ort/lib/ /onnxruntime_src/build/cpu/unit_tests" diff --git a/.github/workflows/linux-cpu-x64-build.yml b/.github/workflows/linux-cpu-x64-build.yml index cddfaea8b..d9ce2230c 100644 --- a/.github/workflows/linux-cpu-x64-build.yml +++ b/.github/workflows/linux-cpu-x64-build.yml @@ -62,8 +62,8 @@ jobs: run: | set -e -x rm -rf build - cmake --preset linux_gcc_cpu_release - cmake --build --preset linux_gcc_cpu_release + cmake --preset linux_gcc_cpu_debug + cmake --build --preset linux_gcc_cpu_debug - name: Install the python wheel and test dependencies run: | @@ -94,7 +94,7 @@ jobs: run: | export ORTGENAI_LOG_ORT_LIB=1 cd test/csharp - dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/cpu/" /p:OrtLibDir="../../ort/lib/" --verbosity normal + dotnet test /p:Configuration=Debug /p:NativeBuildOutputDir="../../build/cpu/" /p:OrtLibDir="../../ort/lib/" --verbosity normal - name: Run tests run: | diff --git a/.github/workflows/linux-cpu-x64-debug-build.yml b/.github/workflows/linux-cpu-x64-debug-build.yml deleted file mode 100644 index 30b65bc5a..000000000 --- a/.github/workflows/linux-cpu-x64-debug-build.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: "Linux CPU x64 Debug Build" -on: - workflow_dispatch: - push: - branches: - - main - - rel-* - pull_request: -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true -env: - ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" - ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" - ORT_NIGHTLY_SOURCE: "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/nuget/v3/index.json" - DOTNET_INSTALL_DIR: "${{ github.workspace }}/dotnet" -jobs: - linux_cpu_x64: - runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2204-AMD-CPU" ] - steps: - - name: Checkout OnnxRuntime GenAI repo - uses: actions/checkout@v4 - with: - submodules: true - - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - - name: Get the Latest OnnxRuntime Nightly Version - shell: pwsh - run: | - $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" - $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion - Write-Host "$ORT_NIGHTLY_VERSION" - "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Download OnnxRuntime Nightly - run: | - dotnet new console - dotnet add package ${{ env.ORT_PACKAGE_NAME }} --version ${{ env.ORT_NIGHTLY_VERSION }} --source ${{ env.ORT_NIGHTLY_SOURCE }} --package-directory . - dotnet build - continue-on-error: true - - - name: list files - shell: bash - run: | - ls -l - ls -R ${{ env.ORT_PACKAGE_NAME }} - continue-on-error: true - -# TODO: Find out why do we need to to have libonnxruntime.so.$ort_version - - name: Extract OnnxRuntime library and header files - run: | - set -e -x - mkdir -p ort/lib - mv microsoft.ml.onnxruntime/${{ env.ORT_NIGHTLY_VERSION }}/build/native/include ort/ - mv microsoft.ml.onnxruntime/${{ env.ORT_NIGHTLY_VERSION }}/runtimes/linux-x64/native/* ort/lib/ - cp ort/lib/libonnxruntime.so ort/lib/libonnxruntime.so.1 - - - name: Build with CMake and GCC - run: | - set -e -x - rm -rf build - cmake --preset linux_gcc_cpu_debug - cmake --build --preset linux_gcc_cpu_debug - - - name: Install the python wheel and test dependencies - run: | - python3 -m pip install -r test/python/requirements.txt --user - python3 -m pip install -r test/python/cpu/torch/requirements.txt --user - python3 -m pip install -r test/python/cpu/ort/requirements.txt --user - python3 -m pip install --user --no-index --no-deps --find-links build/cpu/wheel onnxruntime_genai - - - name: Use Dummy HuggingFace Token - run: | - echo "HF_TOKEN=12345" >> $GITHUB_ENV - - - name: Verify Build Artifacts - if: always() - continue-on-error: true - run: | - ls -l ${{ github.workspace }}/build/cpu - ls -l ${{ github.workspace }}/build/cpu/wheel - - # This will also download all the test models to the test/test_models directory - # These models are used by the python tests as well as C#, C++ and others. - - name: Run the python tests - run: | - export ORTGENAI_LOG_ORT_LIB=1 - python3 test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models - - - name: Build the C# API and Run the C# Tests - run: | - export ORTGENAI_LOG_ORT_LIB=1 - cd test/csharp - dotnet test /p:Configuration=Debug /p:NativeBuildOutputDir="../../build/cpu/" /p:OrtLibDir="../../ort/lib/" --verbosity normal - - - name: Run tests - run: | - set -e -x - export ORTGENAI_LOG_ORT_LIB=1 - export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/ort/lib - ./build/cpu/unit_tests diff --git a/.github/workflows/linux-gpu-x64-build.yml b/.github/workflows/linux-gpu-x64-build.yml index 843485fa9..deae5df96 100644 --- a/.github/workflows/linux-gpu-x64-build.yml +++ b/.github/workflows/linux-gpu-x64-build.yml @@ -94,7 +94,7 @@ jobs: --volume $GITHUB_WORKSPACE:/ort_genai_src \ -w /ort_genai_src onnxruntimecudabuildx64 \ bash -c " \ - /usr/bin/cmake --preset linux_gcc_cuda_release \ + /usr/bin/cmake --preset linux_gcc_cuda_debug \ -DMANYLINUX=ON \ -DPYTHON_EXECUTABLE=${{ env.PYTHON_EXECUTABLE }} " @@ -107,7 +107,7 @@ jobs: --volume $GITHUB_WORKSPACE:/ort_genai_src \ -w /ort_genai_src onnxruntimecudabuildx64 \ bash -c " \ - /usr/bin/cmake --build --preset linux_gcc_cuda_release" + /usr/bin/cmake --build --preset linux_gcc_cuda_debug" - name: Use Dummy HuggingFace Token run: | diff --git a/.github/workflows/linux-gpu-x64-debug-build.yml b/.github/workflows/linux-gpu-x64-debug-build.yml deleted file mode 100644 index 498425e5b..000000000 --- a/.github/workflows/linux-gpu-x64-debug-build.yml +++ /dev/null @@ -1,151 +0,0 @@ -name: "Linux CUDA x64 Debug Build" -on: - workflow_dispatch: - push: - branches: - - main - - rel-* - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime.Gpu.Linux&api-version=6.0-preview.1" - ORT_PACKAGE_NAME: Microsoft.ML.OnnxRuntime.Gpu.Linux - ORT_NIGHTLY_SOURCE: "https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/nuget/v3/index.json" - DOTNET_INSTALL_DIR: "${{ github.workspace }}/dotnet" - -jobs: - linux-cuda-x64-build: - env : - PYTHON_EXECUTABLE: "/opt/python/cp310-cp310/bin/python3.10" - runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Ubuntu2204-A10" ] - steps: - - name: Checkout OnnxRuntime GenAI repo - uses: actions/checkout@v4 - with: - submodules: true -# We are using the same manylinux repo as the one used in the packaging build - - name: Checkout ManyLinux repo - uses: actions/checkout@v4 - with: - repository: pypa/manylinux - ref: 5eda9aded5462201e6310105728d33016e637ea7 - clean: true - path: manylinux - submodules: true - - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - - name: Get the Latest OnnxRuntime Nightly Version - shell: pwsh - run: | - $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" - $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion - Write-Host "$ORT_NIGHTLY_VERSION" - "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Download OnnxRuntime Nightly - run: | - dotnet new console - dotnet add package ${{ env.ORT_PACKAGE_NAME }} --version ${{ env.ORT_NIGHTLY_VERSION }} --source ${{ env.ORT_NIGHTLY_SOURCE }} --package-directory . - dotnet build - continue-on-error: true - - - name: list files - shell: bash - run: | - ls -l - ls -R ${{ env.ORT_PACKAGE_NAME }} - continue-on-error: true - - - name: Extract OnnxRuntime library and header files - run: | - set -e -x - mkdir -p ort/lib - mv microsoft.ml.onnxruntime.gpu.linux/${{ env.ORT_NIGHTLY_VERSION }}/buildTransitive/native/include ort/ - mv microsoft.ml.onnxruntime.gpu.linux/${{ env.ORT_NIGHTLY_VERSION }}/runtimes/linux-x64/native/* ort/lib/ - cp ort/lib/libonnxruntime.so ort/lib/libonnxruntime.so.1 - - - - name: Get Docker Image - run: | - set -e -x - az login --identity --username 63b63039-6328-442f-954b-5a64d124e5b4 - az acr login --name onnxruntimebuildcache --subscription 00c06639-6ee4-454e-8058-8d8b1703bd87 - python3 tools/ci_build/get_docker_image.py --dockerfile tools/ci_build/github/linux/docker/manylinux/Dockerfile.manylinux2_28_cuda_12.2 \ - --context tools/ci_build/github/linux/docker/manylinux \ - --docker-build-args "--build-arg BUILD_UID=$( id -u )" \ - --container-registry onnxruntimebuildcache \ - --manylinux-src manylinux \ - --multiple_repos \ - --repository onnxruntimecudabuildx64 - - - name: Config with Cmake in Docker - run: | - set -e -x - docker run \ - --gpus all \ - --rm \ - --volume $GITHUB_WORKSPACE:/ort_genai_src \ - -w /ort_genai_src onnxruntimecudabuildx64 \ - bash -c " \ - /usr/bin/cmake --preset linux_gcc_cuda_debug \ - -DMANYLINUX=ON \ - -DPYTHON_EXECUTABLE=${{ env.PYTHON_EXECUTABLE }} " - - - name: Build with Cmake in Docker - run: | - set -e -x - docker run \ - --gpus all \ - --rm \ - --volume $GITHUB_WORKSPACE:/ort_genai_src \ - -w /ort_genai_src onnxruntimecudabuildx64 \ - bash -c " \ - /usr/bin/cmake --build --preset linux_gcc_cuda_debug" - - - name: Use Dummy HuggingFace Token - run: | - echo "HF_TOKEN=12345" >> $GITHUB_ENV - - - name: Install the onnxruntime-genai Python wheel and run python test - run: | - echo "Installing the onnxruntime-genai Python wheel and running the Python tests" - docker run \ - --gpus all \ - --rm \ - --volume /data/ortgenai_pytorch_models:/data/ortgenai_pytorch_models \ - --volume $GITHUB_WORKSPACE:/ort_genai_src \ - -e HF_TOKEN=$HF_TOKEN \ - -w /ort_genai_src onnxruntimecudabuildx64 bash -c " \ - ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/requirements.txt --user && \ - ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/cuda/torch/requirements.txt --user && \ - ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/cuda/ort/requirements.txt --user && \ - ${{ env.PYTHON_EXECUTABLE }} -m pip install /ort_genai_src/build/cuda/wheel/onnxruntime_genai*manylinux*.whl --no-deps --user && \ - ${{ env.PYTHON_EXECUTABLE }} test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models --e2e" - - # TODO: Enable this by adding dotnet to the docker image - # - name: Build the C# API and Run the C# Tests - # run: | - # echo "Building the C# API and running the C# tests" - # docker run \ - # --gpus all \ - # --rm \ - # --volume $GITHUB_WORKSPACE:/ort_genai_src \ - # -w /ort_genai_src/test/csharp onnxruntimecudabuildx64 bash -c " \ - # dotnet test /p:NativeBuildOutputDir='/ort_genai_src/build/cuda/'" - - - name: Docker -- Run unit tests - run: | - echo "Running docker image onnxruntimecudabuildx64" - docker run \ - --gpus all \ - --rm \ - --volume /data/ortgenai_pytorch_models:/data/ortgenai_pytorch_models \ - --volume $GITHUB_WORKSPACE:/ort_genai_src \ - -w /ort_genai_src onnxruntimecudabuildx64 bash -c "ORTGENAI_LOG_ORT_LIB=1 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/ort_genai_src/build/cuda/ /ort_genai_src/build/cuda/unit_tests" diff --git a/.github/workflows/win-cpu-arm64-build.yml b/.github/workflows/win-cpu-arm64-build.yml index 9450e10df..4ab184ed0 100644 --- a/.github/workflows/win-cpu-arm64-build.yml +++ b/.github/workflows/win-cpu-arm64-build.yml @@ -55,16 +55,16 @@ jobs: - name: Configure CMake run: | python -m pip install wheel - cmake --preset windows_arm64_cpu_release + cmake --preset windows_arm64_cpu_debug - name: Build with CMake run: | - cmake --build --preset windows_arm64_cpu_release --parallel + cmake --build --preset windows_arm64_cpu_debug --parallel - name: Build the C# API and Run the C# Tests run: | cd test\csharp - dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" - name: Install the Python Wheel and Test Dependencies run: | @@ -85,5 +85,5 @@ jobs: - name: Run tests run: | - copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Release - & .\$env:binaryDir\Release\unit_tests.exe \ No newline at end of file + copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Debug + & .\$env:binaryDir\Debug\unit_tests.exe \ No newline at end of file diff --git a/.github/workflows/win-cpu-arm64-debug-build.yml b/.github/workflows/win-cpu-arm64-debug-build.yml deleted file mode 100644 index cb2bbf5af..000000000 --- a/.github/workflows/win-cpu-arm64-debug-build.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: "Windows CPU arm64 Debug Build" -on: - workflow_dispatch: - push: - branches: - - main - - rel-* - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true -env: - binaryDir: 'build/cpu/win-arm64' - ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" - ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" - -jobs: - windows-cpu-arm64-build: - runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-win11-arm64-cpu" ] - steps: - - name: Checkout OnnxRuntime GenAI repo - uses: actions/checkout@v4 - with: - submodules: true - - - name: Setup Visual Studio 2022 - uses: microsoft/setup-msbuild@v1.1 - with: - vs-version: '17.4' - msbuild-architecture: arm64 - - - uses: nuget/setup-nuget@v2 - with: - nuget-version: '5.x' - - - name: Download OnnxRuntime Nightly - shell: powershell - run: | - $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" - $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion - Write-Host "$ORT_NIGHTLY_VERSION" - "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append - nuget install ${{ env.ORT_PACKAGE_NAME }} -version $ORT_NIGHTLY_VERSION -x -NonInteractive - - - run: Get-ChildItem ${{ env.ORT_PACKAGE_NAME }} -Recurse - continue-on-error: true - - - name: Extract OnnxRuntime library and header files - run: | - mkdir ort/lib - move ${{ env.ORT_PACKAGE_NAME }}/build/native/include ort/ - move ${{ env.ORT_PACKAGE_NAME }}/runtimes/win-arm64/native/* ort/lib/ - - - name: Configure CMake - run: | - python -m pip install wheel - cmake --preset windows_arm64_cpu_debug - - - name: Build with CMake - run: | - cmake --build --preset windows_arm64_cpu_debug --parallel - - - name: Build the C# API and Run the C# Tests - run: | - cd test\csharp - dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" - - - name: Install the Python Wheel and Test Dependencies - run: | - python -m pip install "numpy<2" coloredlogs flatbuffers packaging protobuf sympy pytest - python -m pip install -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ ort-nightly-qnn - python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) --no-deps - - - name: Run the Python Tests - run: | - python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" - - - name: Verify Build Artifacts - if: always() - continue-on-error: true - run: | - Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse - Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir\test -Recurse - - - name: Run tests - run: | - copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Debug - & .\$env:binaryDir\Debug\unit_tests.exe \ No newline at end of file diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index d6aeaed85..1e1f0f69c 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -66,11 +66,11 @@ jobs: - name: Configure CMake run: | - cmake --preset windows_x64_cpu_release + cmake --preset windows_x64_cpu_debug - name: Build with CMake run: | - cmake --build --preset windows_x64_cpu_release --parallel + cmake --build --preset windows_x64_cpu_debug --parallel - name: Install the python wheel and test dependencies run: | @@ -90,7 +90,7 @@ jobs: - name: Build the C# API and Run the C# Tests run: | cd test\csharp - dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" --verbosity normal + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" --verbosity normal - name: Verify Build Artifacts if: always() @@ -101,8 +101,8 @@ jobs: - name: Run tests run: | - copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Release - & .\$env:binaryDir\Release\unit_tests.exe + copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Debug + & .\$env:binaryDir\Debug\unit_tests.exe - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/win-cpu-x64-debug-build.yml b/.github/workflows/win-cpu-x64-debug-build.yml deleted file mode 100644 index e1d42b19e..000000000 --- a/.github/workflows/win-cpu-x64-debug-build.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: "Windows CPU x64 Debug Build" -on: - workflow_dispatch: - push: - branches: - - main - - rel-* - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true -env: - binaryDir: 'build/cpu/win-x64' - ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" - ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" - -jobs: - windows-cpu-x64-build: - runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Win2022-CPU" ] - permissions: - security-events: write - actions: read - steps: - - name: Checkout OnnxRuntime GenAI repo - uses: actions/checkout@v4 - with: - submodules: true - - - uses: actions/setup-python@v5 - with: - python-version: '3.11.x' - architecture: 'x64' - - - name: Setup Visual Studio 2022 - uses: microsoft/setup-msbuild@v1.1 - with: - vs-version: '17.5' - - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - - name: Download OnnxRuntime Nightly - shell: pwsh - run: | - $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" - $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion - Write-Host "$ORT_NIGHTLY_VERSION" - "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append - nuget install ${{ env.ORT_PACKAGE_NAME }} -version $ORT_NIGHTLY_VERSION -x -NonInteractive - - - run: Get-ChildItem ${{ env.ORT_PACKAGE_NAME }} -Recurse - continue-on-error: true - - - name: Extract OnnxRuntime library and header files - run: | - mkdir ort/lib - move ${{ env.ORT_PACKAGE_NAME }}/build/native/include ort/ - move ${{ env.ORT_PACKAGE_NAME }}/runtimes/win-x64/native/* ort/lib/ - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: 'cpp' - - - name: Configure CMake - run: | - cmake --preset windows_x64_cpu_debug - - - name: Build with CMake - run: | - cmake --build --preset windows_x64_cpu_debug --parallel - - - name: Install the python wheel and test dependencies - run: | - python3 -m pip install -r test\python\requirements.txt --user - python3 -m pip install -r test\python\cpu\torch\requirements.txt --user - python3 -m pip install -r test\python\cpu\ort\requirements.txt --user - python3 -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) --no-deps - - - name: Use Dummy HuggingFace Token - run: | - Add-Content -Path $env:GITHUB_ENV -Value "HF_TOKEN=12345" - - - name: Run the Python Tests - run: | - python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" - - - name: Build the C# API and Run the C# Tests - run: | - cd test\csharp - dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" --verbosity normal - - - name: Verify Build Artifacts - if: always() - continue-on-error: true - run: | - Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse - Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir\test -Recurse - - - name: Run tests - run: | - copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Debug - & .\$env:binaryDir\Debug\unit_tests.exe - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - diff --git a/.github/workflows/win-cuda-x64-build.yml b/.github/workflows/win-cuda-x64-build.yml index 5cda163d1..ab1fdeb88 100644 --- a/.github/workflows/win-cuda-x64-build.yml +++ b/.github/workflows/win-cuda-x64-build.yml @@ -63,11 +63,11 @@ jobs: - name: Configure CMake run: | - cmake --preset windows_x64_cuda_release -T cuda=${{ env.cuda_dir }}\\v${{ env.cuda_version }} + cmake --preset windows_x64_cuda_debug -T cuda=${{ env.cuda_dir }}\\v${{ env.cuda_version }} - name: Build with CMake run: | - cmake --build --preset windows_x64_cuda_release --parallel + cmake --build --preset windows_x64_cuda_debug --parallel - name: Add CUDA to PATH run: | @@ -99,11 +99,11 @@ jobs: run: | $env:PATH = "${{ env.cuda_dir }}\\v${{ env.cuda_version }}\\bin;" + $env:PATH cd test\csharp - dotnet test /p:Configuration=release /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" + dotnet test /p:Configuration=debug /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" - 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" - copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Release - & .\$env:binaryDir\Release\unit_tests.exe \ No newline at end of file + copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Debug + & .\$env:binaryDir\Debug\unit_tests.exe \ No newline at end of file diff --git a/.github/workflows/win-cuda-x64-debug-build.yml b/.github/workflows/win-cuda-x64-debug-build.yml deleted file mode 100644 index 823313949..000000000 --- a/.github/workflows/win-cuda-x64-debug-build.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: "Windows CUDA x64 Debug Build" -on: - workflow_dispatch: - push: - branches: - - main - - rel-* - pull_request: - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - -env: - AZCOPY_AUTO_LOGIN_TYPE: MSI - AZCOPY_MSI_CLIENT_ID: 63b63039-6328-442f-954b-5a64d124e5b4 - cuda_dir: "${{ github.workspace }}\\cuda_sdk" - cuda_version: "12.2" - CUDA_PATH: ${{ github.workspace }}\\cuda_sdk\\v12.2 - binaryDir: 'build/cuda/win-x64' - ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime.Gpu.Windows&api-version=6.0-preview.1" - ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime.Gpu.Windows" - -jobs: - windows-cuda-x64-build: - runs-on: [ "self-hosted", "1ES.Pool=onnxruntime-genai-Win2022-GPU-A10" ] - steps: - - name: Checkout OnnxRuntime GenAI repo - uses: actions/checkout@v4 - with: - submodules: true - - - uses: actions/setup-python@v5 - with: - python-version: '3.11.x' - architecture: 'x64' - - - name: Download cuda - run: | - azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v${{ env.cuda_version }}" ${{ env.cuda_dir}} - - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.0.x' - - - name: Download OnnxRuntime Nightly - shell: pwsh - run: | - $resp = Invoke-RestMethod "${{ env.ORT_NIGHTLY_REST_API }}" - $ORT_NIGHTLY_VERSION = $resp.value[0].versions[0].normalizedVersion - Write-Host "$ORT_NIGHTLY_VERSION" - "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append - nuget install ${{ env.ORT_PACKAGE_NAME }} -version $ORT_NIGHTLY_VERSION -ExcludeVersion -NonInteractive - - - run: Get-ChildItem ${{ env.ORT_PACKAGE_NAME }} -Recurse - continue-on-error: true - - - name: Extract OnnxRuntime library and header files - run: | - mkdir ort/lib - move ${{ env.ORT_PACKAGE_NAME }}/buildTransitive/native/include ort/ - move ${{ env.ORT_PACKAGE_NAME }}/runtimes/win-x64/native/* ort/lib/ - - - name: Configure CMake - run: | - cmake --preset windows_x64_cuda_debug -T cuda=${{ env.cuda_dir }}\\v${{ env.cuda_version }} - - - name: Build with CMake - run: | - cmake --build --preset windows_x64_cuda_debug --parallel - - - name: Add CUDA to PATH - run: | - echo "${{ env.cuda_dir }}\\v${{ env.cuda_version }}\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - - name: Install the Python Wheel and Test Dependencies - run: | - python -m pip install -r test\python\requirements.txt - python -m pip install -r test\python\cuda\torch\requirements.txt - python -m pip install -r test\python\cuda\ort\requirements.txt - python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) --no-deps - - - name: Use Dummy HuggingFace Token - run: | - Add-Content -Path $env:GITHUB_ENV -Value "HF_TOKEN=12345" - - - name: Run the Python Tests - run: | - python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" --e2e - - - name: Verify Build Artifacts - if: always() - continue-on-error: true - run: | - - Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse - - - name: Build the C# API and Run the C# Tests - run: | - $env:PATH = "${{ env.cuda_dir }}\\v${{ env.cuda_version }}\\bin;" + $env:PATH - cd test\csharp - dotnet test /p:Configuration=debug /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" - - - 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" - copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Debug - & .\$env:binaryDir\Debug\unit_tests.exe \ No newline at end of file From 95f17ae966f3ef560444f3d01a427c5d60958636 Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Tue, 3 Dec 2024 16:25:42 -0800 Subject: [PATCH 04/16] assert wrong but at least debug mode is working --- src/models/logits.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/models/logits.cpp b/src/models/logits.cpp index d4821c4b1..9e5be5b57 100644 --- a/src/models/logits.cpp +++ b/src/models/logits.cpp @@ -137,8 +137,6 @@ DeviceSpan Logits::Get() { } } - assert(shape_[1] == 1); - #if USE_DML // DML doesn't support on-device scoring yet, so we need to download some data to the CPU if (model_.device_type_ == DeviceType::DML) { From e34cceaae3492aba97f4c97032e6905d44a4cfca Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Tue, 3 Dec 2024 17:00:28 -0800 Subject: [PATCH 05/16] fixes --- .github/workflows/win-cpu-arm64-build.yml | 34 ++++++----------------- .github/workflows/win-cpu-x64-build.yml | 2 +- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/.github/workflows/win-cpu-arm64-build.yml b/.github/workflows/win-cpu-arm64-build.yml index 29e539374..9450e10df 100644 --- a/.github/workflows/win-cpu-arm64-build.yml +++ b/.github/workflows/win-cpu-arm64-build.yml @@ -34,18 +34,6 @@ jobs: with: nuget-version: '5.x' - - name: Setup Java 21 - uses: actions/setup-java@v4 - with: - java-version: '21' - distribution: 'temurin' - cache: 'gradle' - - - name: Setup Gradle - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: '8.6' - - name: Download OnnxRuntime Nightly shell: powershell run: | @@ -67,11 +55,16 @@ jobs: - name: Configure CMake run: | python -m pip install wheel - cmake --preset windows_arm64_cpu_debug + cmake --preset windows_arm64_cpu_release - name: Build with CMake run: | - cmake --build --preset windows_arm64_cpu_debug --parallel + cmake --build --preset windows_arm64_cpu_release --parallel + + - name: Build the C# API and Run the C# Tests + run: | + cd test\csharp + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" - name: Install the Python Wheel and Test Dependencies run: | @@ -83,15 +76,6 @@ jobs: run: | python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" - - name: Build the C# API and Run the C# Tests - run: | - cd test\csharp - dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" - - - name: Build the Java API and Run the Java Tests - run: | - python build.py --config=Release --build_dir $env:binaryDir --build_java --parallel - - name: Verify Build Artifacts if: always() continue-on-error: true @@ -101,5 +85,5 @@ jobs: - name: Run tests run: | - copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Debug - & .\$env:binaryDir\Debug\unit_tests.exe \ No newline at end of file + copy $env:GITHUB_WORKSPACE\ort\lib\* .\$env:binaryDir\Release + & .\$env:binaryDir\Release\unit_tests.exe \ No newline at end of file diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 13fca33be..a37b8608b 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -106,7 +106,7 @@ jobs: - name: Build the Java API and Run the Java Tests run: | - python3 build.py --config=Release --build_dir $env:binaryDir --build_java --parallel + python3 build.py --config=Debug --build_dir $env:binaryDir --build_java --parallel - name: Verify Build Artifacts if: always() From dc09f9eba70434fe25d9fa5f09bd307475f32c72 Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Fri, 6 Dec 2024 13:35:57 -0800 Subject: [PATCH 06/16] remove presets --- .github/workflows/linux-cpu-arm64-build.yml | 16 +- .github/workflows/linux-cpu-x64-build.yml | 19 +- .../workflows/linux-cpu-x64-nightly-build.yml | 11 +- .github/workflows/linux-gpu-x64-build.yml | 21 +- .github/workflows/mac-cpu-arm64-build.yml | 29 +- .github/workflows/win-cpu-arm64-build.yml | 11 +- .github/workflows/win-cpu-x64-build.yml | 16 +- .github/workflows/win-cuda-x64-build.yml | 14 +- .github/workflows/win-directml-x64-build.yml | 10 +- cmake/presets/CMakeLinuxBuildPresets.json | 137 ------- .../presets/CMakeLinuxClangConfigPresets.json | 87 ---- .../CMakeLinuxDefaultConfigPresets.json | 99 ----- cmake/presets/CMakeLinuxGccConfigPresets.json | 236 ----------- cmake/presets/CMakeMacOSBuildPresets.json | 28 -- cmake/presets/CMakeMacOSConfigPresets.json | 113 ------ cmake/presets/CMakeWinBuildPresets.json | 148 ------- cmake/presets/CMakeWinConfigPresets.json | 382 ------------------ 17 files changed, 43 insertions(+), 1334 deletions(-) delete mode 100644 cmake/presets/CMakeLinuxBuildPresets.json delete mode 100644 cmake/presets/CMakeLinuxClangConfigPresets.json delete mode 100644 cmake/presets/CMakeLinuxDefaultConfigPresets.json delete mode 100644 cmake/presets/CMakeLinuxGccConfigPresets.json delete mode 100644 cmake/presets/CMakeMacOSBuildPresets.json delete mode 100644 cmake/presets/CMakeMacOSConfigPresets.json delete mode 100644 cmake/presets/CMakeWinBuildPresets.json delete mode 100644 cmake/presets/CMakeWinConfigPresets.json diff --git a/.github/workflows/linux-cpu-arm64-build.yml b/.github/workflows/linux-cpu-arm64-build.yml index ea3ecda87..fa7e7bd66 100644 --- a/.github/workflows/linux-cpu-arm64-build.yml +++ b/.github/workflows/linux-cpu-arm64-build.yml @@ -70,26 +70,18 @@ jobs: --container-registry onnxruntimebuildcache \ --repository ort_genai_linux_arm64_gha - - name: Docker -- Configure with CMake and GCC + - name: Build with Python run: | - docker run --rm \ - --volume $GITHUB_WORKSPACE:/onnxruntime_src \ - -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/usr/bin/cmake --preset linux_gcc_cpu_debug" - - - name: Docker -- Build with CMake and GCC - run: | - docker run --rm \ - --volume $GITHUB_WORKSPACE:/onnxruntime_src \ - -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "/usr/bin/cmake --build --preset linux_gcc_cpu_debug" + python3 build.py --parallel --config=Debug - name: Docker -- Check test directory run: | docker run --rm \ --volume $GITHUB_WORKSPACE:/onnxruntime_src \ - -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "ls -l /onnxruntime_src/build/cpu/test/" + -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "ls -l /onnxruntime_src/build/Linux/Debug/test/" - name: Docker -- Run tests run: | docker run --rm \ --volume $GITHUB_WORKSPACE:/onnxruntime_src \ - -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/onnxruntime_src/ort/lib/ /onnxruntime_src/build/cpu/unit_tests" + -w /onnxruntime_src ort_genai_linux_arm64_gha bash -c "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/onnxruntime_src/ort/lib/ /onnxruntime_src/build/Linux/Debug/unit_tests" diff --git a/.github/workflows/linux-cpu-x64-build.yml b/.github/workflows/linux-cpu-x64-build.yml index 20126ab01..af2a78363 100644 --- a/.github/workflows/linux-cpu-x64-build.yml +++ b/.github/workflows/linux-cpu-x64-build.yml @@ -70,19 +70,16 @@ jobs: mv microsoft.ml.onnxruntime/${{ env.ORT_NIGHTLY_VERSION }}/runtimes/linux-x64/native/* ort/lib/ cp ort/lib/libonnxruntime.so ort/lib/libonnxruntime.so.1 - - name: Build with CMake and GCC + - name: Build with Python run: | - set -e -x - rm -rf build - cmake --preset linux_gcc_cpu_debug - cmake --build --preset linux_gcc_cpu_debug + python3 build.py --parallel --config=Debug --build_csharp - name: Install the python wheel and test dependencies run: | python3 -m pip install -r test/python/requirements.txt --user python3 -m pip install -r test/python/cpu/torch/requirements.txt --user python3 -m pip install -r test/python/cpu/ort/requirements.txt --user - python3 -m pip install --user --no-index --no-deps --find-links build/cpu/wheel onnxruntime_genai + python3 -m pip install --user --no-index --no-deps --find-links build/Linux/Debug/wheel onnxruntime_genai - name: Use Dummy HuggingFace Token run: | @@ -92,8 +89,8 @@ jobs: if: always() continue-on-error: true run: | - ls -l ${{ github.workspace }}/build/cpu - ls -l ${{ github.workspace }}/build/cpu/wheel + ls -l ${{ github.workspace }}/build/Linux/Debug + ls -l ${{ github.workspace }}/build/Linux/Debug/wheel # This will also download all the test models to the test/test_models directory # These models are used by the python tests as well as C#, C++ and others. @@ -106,16 +103,16 @@ jobs: run: | export ORTGENAI_LOG_ORT_LIB=1 cd test/csharp - dotnet test /p:Configuration=Debug /p:NativeBuildOutputDir="../../build/cpu/" /p:OrtLibDir="../../ort/lib/" --verbosity normal + dotnet test /p:Configuration=Debug /p:NativeBuildOutputDir="../../build/Linux/Debug/" /p:OrtLibDir="../../ort/lib/" --verbosity normal - name: Build the Java API and Run the Java Tests run: | set -e -x - python3 build.py --config=Release --build_dir build/cpu --build_java --parallel --cmake_generator "Ninja" + python3 build.py --config=Release --build_dir build/Linux/Debug --build_java --parallel --cmake_generator "Ninja" - name: Run tests run: | set -e -x export ORTGENAI_LOG_ORT_LIB=1 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GITHUB_WORKSPACE/ort/lib - ./build/cpu/unit_tests + ./build/Linux/Debug/unit_tests diff --git a/.github/workflows/linux-cpu-x64-nightly-build.yml b/.github/workflows/linux-cpu-x64-nightly-build.yml index 61be5eb6f..62722992e 100644 --- a/.github/workflows/linux-cpu-x64-nightly-build.yml +++ b/.github/workflows/linux-cpu-x64-nightly-build.yml @@ -22,8 +22,6 @@ jobs: - name: Checkout OnnxRuntime GenAI repo uses: actions/checkout@v2 - - - name: Download OnnxRuntime run: | curl -L -o ${{ env.ort_zip }} ${{ env.ort_url }} @@ -41,19 +39,16 @@ jobs: run: | git submodule update --init --recursive - - name: Build with CMake and clang + - name: Build with Python run: | - set -e -x - rm -rf build - cmake --preset linux_gcc_cpu_release - cmake --build --preset linux_gcc_cpu_release + python3 build.py --parallel --config=Release - name: Install the python wheel and test dependencies run: | python3 -m pip install -r test/python/requirements.txt --user python3 -m pip install -r test/python/cpu/torch/requirements.txt --user python3 -m pip install -r test/python/cpu/ort/requirements.txt --user - python3 -m pip install build/cpu/wheel/onnxruntime_genai*.whl --no-deps + python3 -m pip install build/Linux/Release/wheel/onnxruntime_genai*.whl --no-deps - name: Use Dummy HuggingFace Token run: | diff --git a/.github/workflows/linux-gpu-x64-build.yml b/.github/workflows/linux-gpu-x64-build.yml index deae5df96..aafcfe675 100644 --- a/.github/workflows/linux-gpu-x64-build.yml +++ b/.github/workflows/linux-gpu-x64-build.yml @@ -85,7 +85,7 @@ jobs: --multiple_repos \ --repository onnxruntimecudabuildx64 - - name: Config with Cmake in Docker + - name: Build with Python in Docker run: | set -e -x docker run \ @@ -94,20 +94,7 @@ jobs: --volume $GITHUB_WORKSPACE:/ort_genai_src \ -w /ort_genai_src onnxruntimecudabuildx64 \ bash -c " \ - /usr/bin/cmake --preset linux_gcc_cuda_debug \ - -DMANYLINUX=ON \ - -DPYTHON_EXECUTABLE=${{ env.PYTHON_EXECUTABLE }} " - - - name: Build with Cmake in Docker - run: | - set -e -x - docker run \ - --gpus all \ - --rm \ - --volume $GITHUB_WORKSPACE:/ort_genai_src \ - -w /ort_genai_src onnxruntimecudabuildx64 \ - bash -c " \ - /usr/bin/cmake --build --preset linux_gcc_cuda_debug" + ${{ env.PYTHON_EXECUTABLE }} build.py --use_cuda --parallel --config=Debug" - name: Use Dummy HuggingFace Token run: | @@ -126,7 +113,7 @@ jobs: ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/requirements.txt --user && \ ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/cuda/torch/requirements.txt --user && \ ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/cuda/ort/requirements.txt --user && \ - ${{ env.PYTHON_EXECUTABLE }} -m pip install /ort_genai_src/build/cuda/wheel/onnxruntime_genai*manylinux*.whl --no-deps --user && \ + ${{ env.PYTHON_EXECUTABLE }} -m pip install /ort_genai_src/build/Linux/Debug/wheel/onnxruntime_genai*manylinux*.whl --no-deps --user && \ ${{ env.PYTHON_EXECUTABLE }} test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models --e2e" # TODO: Enable this by adding dotnet to the docker image @@ -148,4 +135,4 @@ jobs: --rm \ --volume /data/ortgenai_pytorch_models:/data/ortgenai_pytorch_models \ --volume $GITHUB_WORKSPACE:/ort_genai_src \ - -w /ort_genai_src onnxruntimecudabuildx64 bash -c "ORTGENAI_LOG_ORT_LIB=1 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/ort_genai_src/build/cuda/ /ort_genai_src/build/cuda/unit_tests" + -w /ort_genai_src onnxruntimecudabuildx64 bash -c "ORTGENAI_LOG_ORT_LIB=1 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/ort_genai_src/build/Linux/Debug/ /ort_genai_src/build/Linux/Debug/unit_tests" diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index b675450ab..a54cd855c 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -52,14 +52,9 @@ jobs: mv ${{ env.ORT_PACKAGE_NAME }}/build/native/include ort/ mv ${{ env.ORT_PACKAGE_NAME }}/runtimes/osx-arm64/native/* ort/lib/ - - name: Configure CMake - run: | - cmake --preset macos_arm64_cpu_release - - - name: Build with CMake - run: | - cmake --build --preset macos_arm64_cpu_release --parallel - continue-on-error: false + - name: Build with Python + run: | + python3 build.py --parallel --config=Release --build_csharp --build_java --cmake_generator "Unix Makefiles" - name: Install the python wheel and test dependencies run: | @@ -68,7 +63,7 @@ jobs: python3 -m pip install -r test/python/requirements.txt python3 -m pip install -r test/python/macos/torch/requirements.txt python3 -m pip install -r test/python/macos/ort/requirements.txt - python3 -m pip install build/cpu/osx-arm64/wheel/onnxruntime_genai*.whl --no-deps + python3 -m pip install build/MacOSX/Release/wheel/onnxruntime_genai*.whl --no-deps - name: Remove the ort lib and header files run: | @@ -78,8 +73,8 @@ jobs: if: always() continue-on-error: true run: | - ls -l ${{ github.workspace }}/build/cpu/osx-arm64 - ls -l ${{ github.workspace }}/build/cpu/osx-arm64/wheel + ls -l ${{ github.workspace }}/build/MacOSX/Release + ls -l ${{ github.workspace }}/build/MacOSX/Release/wheel # This will also download all the test models to the test/test_models directory # These models are used by the python tests as well as C#, C++ and others. @@ -95,17 +90,11 @@ jobs: run: | export ORTGENAI_LOG_ORT_LIB=1 cd test/csharp - dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/cpu/osx-arm64" --verbosity normal - - - name: Build the Java API and Run the Java Tests - run: | - set -e -x - source genai-macos-venv/bin/activate - python3 build.py --config=Release --build_dir build/cpu/osx-arm64 --build_java --parallel --cmake_generator "Unix Makefiles" + dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOSX/Release" --verbosity normal - name: Run tests run: | set -e -x export ORTGENAI_LOG_ORT_LIB=1 - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/build/cpu/osx-arm64 - ./build/cpu/osx-arm64/unit_tests + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/build/MacOSX/Release + ./build/MacOSX/Release/unit_tests diff --git a/.github/workflows/win-cpu-arm64-build.yml b/.github/workflows/win-cpu-arm64-build.yml index 9450e10df..730ebce9f 100644 --- a/.github/workflows/win-cpu-arm64-build.yml +++ b/.github/workflows/win-cpu-arm64-build.yml @@ -11,7 +11,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true env: - binaryDir: 'build/cpu/win-arm64' + binaryDir: 'build/Windows/Release' ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" @@ -52,14 +52,9 @@ jobs: move ${{ env.ORT_PACKAGE_NAME }}/build/native/include ort/ move ${{ env.ORT_PACKAGE_NAME }}/runtimes/win-arm64/native/* ort/lib/ - - name: Configure CMake + - name: Build with Python run: | - python -m pip install wheel - cmake --preset windows_arm64_cpu_release - - - name: Build with CMake - run: | - cmake --build --preset windows_arm64_cpu_release --parallel + python build.py --parallel --config=Release --build_csharp - name: Build the C# API and Run the C# Tests run: | diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index a37b8608b..7570f3469 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -11,7 +11,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true env: - binaryDir: 'build/cpu/win-x64' + binaryDir: 'build/Windows/Debug' ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" @@ -76,13 +76,9 @@ jobs: with: languages: 'cpp' - - name: Configure CMake + - name: Build with Python run: | - cmake --preset windows_x64_cpu_debug - - - name: Build with CMake - run: | - cmake --build --preset windows_x64_cpu_debug --parallel + python3 build.py --parallel --config=Debug --build_csharp --build_java - name: Install the python wheel and test dependencies run: | @@ -102,11 +98,7 @@ jobs: - name: Build the C# API and Run the C# Tests run: | cd test\csharp - dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" --verbosity normal - - - name: Build the Java API and Run the Java Tests - run: | - python3 build.py --config=Debug --build_dir $env:binaryDir --build_java --parallel + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" --verbosity normal - name: Verify Build Artifacts if: always() diff --git a/.github/workflows/win-cuda-x64-build.yml b/.github/workflows/win-cuda-x64-build.yml index ab1fdeb88..33ecdcff1 100644 --- a/.github/workflows/win-cuda-x64-build.yml +++ b/.github/workflows/win-cuda-x64-build.yml @@ -17,7 +17,7 @@ env: cuda_dir: "${{ github.workspace }}\\cuda_sdk" cuda_version: "12.2" CUDA_PATH: ${{ github.workspace }}\\cuda_sdk\\v12.2 - binaryDir: 'build/cuda/win-x64' + binaryDir: 'build/Windows/Debug' ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime.Gpu.Windows&api-version=6.0-preview.1" ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime.Gpu.Windows" @@ -61,18 +61,14 @@ jobs: move ${{ env.ORT_PACKAGE_NAME }}/buildTransitive/native/include ort/ move ${{ env.ORT_PACKAGE_NAME }}/runtimes/win-x64/native/* ort/lib/ - - name: Configure CMake - run: | - cmake --preset windows_x64_cuda_debug -T cuda=${{ env.cuda_dir }}\\v${{ env.cuda_version }} - - - name: Build with CMake - run: | - cmake --build --preset windows_x64_cuda_debug --parallel - - name: Add CUDA to PATH run: | echo "${{ env.cuda_dir }}\\v${{ env.cuda_version }}\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Build with Python + run: | + python build.py --cuda_home=${{ env.cuda_dir }}\\v${{ env.cuda_version }} --parallel --config=Debug + - name: Install the Python Wheel and Test Dependencies run: | python -m pip install -r test\python\requirements.txt diff --git a/.github/workflows/win-directml-x64-build.yml b/.github/workflows/win-directml-x64-build.yml index 678573606..2cf0b8fc6 100644 --- a/.github/workflows/win-directml-x64-build.yml +++ b/.github/workflows/win-directml-x64-build.yml @@ -22,7 +22,7 @@ env: d3d12_dir: "Microsoft.Direct3D.D3D12.1.614.1" d3d12_zip: "Microsoft.Direct3D.D3D12.1.614.1.zip" d3d12_url: "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.614.1" - binaryDir: 'build/directml/win-x64' + binaryDir: 'build/Windows/Release' jobs: @@ -78,13 +78,9 @@ jobs: mv $env:d3d12_dir\build\native\bin\x64\D3D12Core.dll ort\lib mv $env:dml_dir\include\DirectML.h ort\include - - name: Configure CMake + - name: Build with Python run: | - cmake --preset windows_x64_directml_release -DTEST_PHI2=False - - - name: Build with CMake - run: | - cmake --build --preset windows_x64_directml_release --parallel + python build.py --parallel --config=Release --use_dml - name: Install the Python Wheel and Test Dependencies run: | diff --git a/cmake/presets/CMakeLinuxBuildPresets.json b/cmake/presets/CMakeLinuxBuildPresets.json deleted file mode 100644 index 47a0ec704..000000000 --- a/cmake/presets/CMakeLinuxBuildPresets.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "version": 6, - "include": [ - "CMakeLinuxGccConfigPresets.json", - "CMakeLinuxClangConfigPresets.json" - ], - "buildPresets": [ - { - "name": "linux_gcc_cpu_release_asan", - "configurePreset": "linux_gcc_cpu_release_asan" - }, - { - "name": "linux_gcc_cpu_debug_asan", - "configurePreset": "linux_gcc_cpu_debug_asan" - }, - { - "name": "linux_gcc_cpu_relwithdebinfo_asan", - "configurePreset": "linux_gcc_cpu_relwithdebinfo_asan" - }, - { - "name": "linux_gcc_cpu_minsizerel_asan", - "configurePreset": "linux_gcc_cpu_minsizerel_asan" - }, - { - "name": "linux_gcc_cpu_release", - "configurePreset": "linux_gcc_cpu_release" - }, - { - "name": "linux_gcc_cpu_debug", - "configurePreset": "linux_gcc_cpu_debug" - }, - { - "name": "linux_gcc_cpu_relwithdebinfo", - "configurePreset": "linux_gcc_cpu_relwithdebinfo" - }, - { - "name": "linux_gcc_cpu_minsizerel", - "configurePreset": "linux_gcc_cpu_minsizerel" - }, - { - "name": "linux_clang_cpu_release_asan", - "configurePreset": "linux_clang_cpu_release_asan" - }, - { - "name": "linux_clang_cpu_debug_asan", - "configurePreset": "linux_clang_cpu_debug_asan" - }, - { - "name": "linux_clang_cpu_relwithdebinfo_asan", - "configurePreset": "linux_clang_cpu_relwithdebinfo_asan" - }, - { - "name": "linux_clang_cpu_minsizerel_asan", - "configurePreset": "linux_clang_cpu_minsizerel_asan" - }, - { - "name": "linux_clang_cpu_release", - "configurePreset": "linux_clang_cpu_release" - }, - { - "name": "linux_clang_cpu_debug", - "configurePreset": "linux_clang_cpu_debug" - }, - { - "name": "linux_clang_cpu_relwithdebinfo", - "configurePreset": "linux_clang_cpu_relwithdebinfo" - }, - { - "name": "linux_clang_cpu_minsizerel", - "configurePreset": "linux_clang_cpu_minsizerel" - }, - { - "name": "linux_gcc_cuda_release_asan", - "configurePreset": "linux_gcc_cuda_release_asan" - }, - { - "name": "linux_gcc_cuda_debug_asan", - "configurePreset": "linux_gcc_cuda_debug_asan" - }, - { - "name": "linux_gcc_cuda_relwithdebinfo_asan", - "configurePreset": "linux_gcc_cuda_relwithdebinfo_asan" - }, - { - "name": "linux_gcc_cuda_minsizerel_asan", - "configurePreset": "linux_gcc_cuda_minsizerel_asan" - }, - { - "name": "linux_gcc_cuda_release", - "configurePreset": "linux_gcc_cuda_release" - }, - { - "name": "linux_gcc_cuda_debug", - "configurePreset": "linux_gcc_cuda_debug" - }, - { - "name": "linux_gcc_cuda_relwithdebinfo", - "configurePreset": "linux_gcc_cuda_relwithdebinfo" - }, - { - "name": "linux_gcc_cuda_minsizerel", - "configurePreset": "linux_gcc_cuda_minsizerel" - }, - { - "name": "linux_gcc_rocm_release_asan", - "configurePreset": "linux_gcc_rocm_release_asan" - }, - { - "name": "linux_gcc_rocm_debug_asan", - "configurePreset": "linux_gcc_rocm_debug_asan" - }, - { - "name": "linux_gcc_rocm_relwithdebinfo_asan", - "configurePreset": "linux_gcc_rocm_relwithdebinfo_asan" - }, - { - "name": "linux_gcc_rocm_minsizerel_asan", - "configurePreset": "linux_gcc_rocm_minsizerel_asan" - }, - { - "name": "linux_gcc_rocm_release", - "configurePreset": "linux_gcc_rocm_release" - }, - { - "name": "linux_gcc_rocm_debug", - "configurePreset": "linux_gcc_rocm_debug" - }, - { - "name": "linux_gcc_rocm_relwithdebinfo", - "configurePreset": "linux_gcc_rocm_relwithdebinfo" - }, - { - "name": "linux_gcc_rocm_minsizerel", - "configurePreset": "linux_gcc_rocm_minsizerel" - } - ] -} \ No newline at end of file diff --git a/cmake/presets/CMakeLinuxClangConfigPresets.json b/cmake/presets/CMakeLinuxClangConfigPresets.json deleted file mode 100644 index ce607d2f1..000000000 --- a/cmake/presets/CMakeLinuxClangConfigPresets.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "version": 6, - "include": [ - "CMakeLinuxDefaultConfigPresets.json" - ], - "configurePresets": [ - { - "name": "linux_clang_cpu_release_asan", - "displayName": "linux clang cpu release asan", - "inherits": [ - "linux_clang_asan_default", - "linux_release_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_clang_cpu_debug_asan", - "displayName": "linux clang cpu debug asan", - "inherits": [ - "linux_clang_asan_default", - "linux_debug_default" - ], - "binaryDir": "${sourceDir}/build/cpu", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_C_FLAGS": "-ggdb3 -O0 -fsanitize=address", - "CMAKE_CXX_FLAGS": "-ggdb3 -O0 -fsanitize=address" - } - }, - { - "name": "linux_clang_cpu_relwithdebinfo_asan", - "displayName": "linux clang cpu relwithdebinfo asan", - "inherits": [ - "linux_clang_asan_default", - "linux_relwithdebinfo_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_clang_cpu_minsizerel_asan", - "displayName": "linux clang cpu minsizerel asan", - "inherits": [ - "linux_clang_default", - "linux_minsizerel_default" - ], - "binaryDir": "${sourceDir}/build/cpu", - "cacheVariables": {} - }, - { - "name": "linux_clang_cpu_release", - "displayName": "linux clang cpu release", - "inherits": [ - "linux_clang_default", - "linux_release_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_clang_cpu_debug", - "displayName": "linux clang cpu debug", - "inherits": [ - "linux_clang_default", - "linux_debug_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_clang_cpu_relwithdebinfo", - "displayName": "linux clang cpu relwithdebinfo", - "inherits": [ - "linux_clang_default", - "linux_relwithdebinfo_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_clang_cpu_minsizerel", - "displayName": "linux clang cpu minsizerel", - "inherits": [ - "linux_clang_default", - "linux_minsizerel_default" - ], - "binaryDir": "${sourceDir}/build/cpu", - "cacheVariables": {} - } - ] -} \ No newline at end of file diff --git a/cmake/presets/CMakeLinuxDefaultConfigPresets.json b/cmake/presets/CMakeLinuxDefaultConfigPresets.json deleted file mode 100644 index c2816213f..000000000 --- a/cmake/presets/CMakeLinuxDefaultConfigPresets.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "version": 6, - "configurePresets": [ - { - "name": "linux_gcc_default", - "generator": "Ninja", - "cacheVariables": { - "CMAKE_POSITION_INDEPENDENT_CODE": "ON", - "CMAKE_EXE_LINKER_FLAGS_INIT": "-Wl,-z,now", - "CMAKE_MODULE_LINKER_FLAGS_INIT": "-Wl,-z,now", - "CMAKE_SHARED_LINKER_FLAGS_INIT": "-Wl,-z,now", - "USE_CUDA": "OFF", - "USE_ROCM": "OFF" - }, - "environment": { - "CC": "gcc", - "CXX": "g++" - }, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Linux" - } - }, - { - "name": "linux_gcc_cuda_default", - "inherits": "linux_gcc_default", - "cacheVariables": { - "USE_CUDA": "ON", - "CMAKE_CUDA_ARCHITECTURES": "60;61;70;75;80;86" - } - }, - { - "name": "linux_gcc_rocm_default", - "inherits": "linux_gcc_default", - "cacheVariables": { - "USE_ROCM": "ON" - } - }, - { - "name": "linux_clang_default", - "inherits": "linux_gcc_default", - "environment": { - "CC": "clang", - "CXX": "clang++" - } - }, - { - "name": "linux_gcc_asan_default", - "inherits": "linux_gcc_default", - "cacheVariables": { - "CMAKE_EXE_LINKER_FLAGS_INIT": "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fsanitize=address", - "CMAKE_MODULE_LINKER_FLAGS_INIT": "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fsanitize=address", - "CMAKE_SHARED_LINKER_FLAGS_INIT": "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fsanitize=address" - } - }, - { - "name": "linux_clang_asan_default", - "inherits": "linux_clang_default", - "cacheVariables": { - "CMAKE_EXE_LINKER_FLAGS_INIT": "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fsanitize=address -L\\usr\\lib64\\x86_64-unknown-linux-gnu", - "CMAKE_MODULE_LINKER_FLAGS_INIT": "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fsanitize=address -L\\usr\\lib64\\x86_64-unknown-linux-gnu", - "CMAKE_SHARED_LINKER_FLAGS_INIT": "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -fsanitize=address -L\\usr\\lib64\\x86_64-unknown-linux-gnu" - } - }, - { - "name": "linux_release_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_C_FLAGS": "-DNDEBUG -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -O3 -pipe ", - "CMAKE_CXX_FLAGS": "-DNDEBUG -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -O3 -pipe" - } - }, - { - "name": "linux_relwithdebinfo_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo", - "CMAKE_C_FLAGS": "-DNDEBUG -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -O3 -pipe -ggdb3", - "CMAKE_CXX_FLAGS": "-DNDEBUG -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -O3 -pipe -ggdb3" - } - }, - { - "name": "linux_debug_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_C_FLAGS": "-ggdb3 -O0", - "CMAKE_CXX_FLAGS": "-ggdb3 -O0 -D_GLIBCXX_DEBUG" - } - }, - { - "name": "linux_minsizerel_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "MinSizeRel", - "CMAKE_C_FLAGS": "-DNDEBUG -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -Os -pipe -ggdb3", - "CMAKE_CXX_FLAGS": "-DNDEBUG -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -Os -pipe -ggdb3" - } - } - ] -} \ No newline at end of file diff --git a/cmake/presets/CMakeLinuxGccConfigPresets.json b/cmake/presets/CMakeLinuxGccConfigPresets.json deleted file mode 100644 index bdd58f6c1..000000000 --- a/cmake/presets/CMakeLinuxGccConfigPresets.json +++ /dev/null @@ -1,236 +0,0 @@ -{ - "version": 6, - "include": [ - "CMakeLinuxDefaultConfigPresets.json" - ], - "configurePresets": [ - { - "name": "linux_gcc_cpu_release_asan", - "displayName": "linux gcc cpu release asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_default", - "linux_release_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_gcc_cpu_debug_asan", - "displayName": "linux gcc cpu debug asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_default", - "linux_debug_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_gcc_cpu_relwithdebinfo_asan", - "displayName": "linux gcc cpu relwithdebinfo asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_default", - "linux_relwithdebinfo_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_gcc_cpu_minsizerel_asan", - "displayName": "linux gcc cpu minsizerel asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_default", - "linux_minsizerel_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_gcc_cpu_release", - "displayName": "linux gcc cpu release", - "inherits": [ - "linux_gcc_default", - "linux_release_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_gcc_cpu_debug", - "displayName": "linux gcc cpu debug", - "inherits": [ - "linux_gcc_default", - "linux_debug_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_gcc_cpu_relwithdebinfo", - "displayName": "linux gcc cpu relwithdebinfo", - "inherits": [ - "linux_gcc_default", - "linux_relwithdebinfo_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_gcc_cpu_minsizerel", - "displayName": "linux gcc cpu minsizerel", - "inherits": [ - "linux_gcc_default", - "linux_minsizerel_default" - ], - "binaryDir": "${sourceDir}/build/cpu" - }, - { - "name": "linux_gcc_cuda_release_asan", - "displayName": "linux gcc cuda release asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_cuda_default", - "linux_release_default" - ], - "binaryDir": "${sourceDir}/build/cuda" - }, - { - "name": "linux_gcc_cuda_debug_asan", - "displayName": "linux gcc cuda debug asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_cuda_default", - "linux_debug_default" - ], - "binaryDir": "${sourceDir}/build/cuda" - }, - { - "name": "linux_gcc_cuda_relwithdebinfo_asan", - "displayName": "linux gcc cuda relwithdebinfo asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_cuda_default", - "linux_relwithdebinfo_default" - ], - "binaryDir": "${sourceDir}/build/cuda" - }, - { - "name": "linux_gcc_cuda_minsizerel_asan", - "displayName": "linux gcc cuda minsizerel asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_cuda_default", - "linux_minsizerel_default" - ], - "binaryDir": "${sourceDir}/build/cuda" - }, - { - "name": "linux_gcc_cuda_release", - "displayName": "linux gcc cuda release", - "inherits": [ - "linux_gcc_cuda_default", - "linux_release_default" - ], - "binaryDir": "${sourceDir}/build/cuda" - }, - { - "name": "linux_gcc_cuda_debug", - "displayName": "linux gcc cuda debug", - "inherits": [ - "linux_gcc_cuda_default", - "linux_debug_default" - ], - "binaryDir": "${sourceDir}/build/cuda" - }, - { - "name": "linux_gcc_cuda_relwithdebinfo", - "displayName": "linux gcc cuda relwithdebinfo", - "inherits": [ - "linux_gcc_cuda_default", - "linux_relwithdebinfo_default" - ], - "binaryDir": "${sourceDir}/build/cuda" - }, - { - "name": "linux_gcc_cuda_minsizerel", - "displayName": "linux gcc cuda minsizerel", - "inherits": [ - "linux_gcc_cuda_default", - "linux_minsizerel_default" - ], - "binaryDir": "${sourceDir}/build/cuda" - }, - { - "name": "linux_gcc_rocm_release_asan", - "displayName": "linux gcc rocm release asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_rocm_default", - "linux_release_default" - ], - "binaryDir": "${sourceDir}/build/rocm" - }, - { - "name": "linux_gcc_rocm_debug_asan", - "displayName": "linux gcc rocm debug asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_rocm_default", - "linux_debug_default" - ], - "binaryDir": "${sourceDir}/build/rocm" - }, - { - "name": "linux_gcc_rocm_relwithdebinfo_asan", - "displayName": "linux gcc rocm relwithdebinfo asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_rocm_default", - "linux_relwithdebinfo_default" - ], - "binaryDir": "${sourceDir}/build/rocm" - }, - { - "name": "linux_gcc_rocm_minsizerel_asan", - "displayName": "linux gcc rocm minsizerel asan", - "inherits": [ - "linux_gcc_asan_default", - "linux_gcc_rocm_default", - "linux_minsizerel_default" - ], - "binaryDir": "${sourceDir}/build/rocm" - }, - { - "name": "linux_gcc_rocm_release", - "displayName": "linux gcc rocm release", - "inherits": [ - "linux_gcc_rocm_default", - "linux_release_default" - ], - "binaryDir": "${sourceDir}/build/rocm" - }, - { - "name": "linux_gcc_rocm_debug", - "displayName": "linux gcc rocm debug", - "inherits": [ - "linux_gcc_rocm_default", - "linux_debug_default" - ], - "binaryDir": "${sourceDir}/build/rocm" - }, - { - "name": "linux_gcc_rocm_relwithdebinfo", - "displayName": "linux gcc rocm relwithdebinfo", - "inherits": [ - "linux_gcc_rocm_default", - "linux_relwithdebinfo_default" - ], - "binaryDir": "${sourceDir}/build/rocm" - }, - { - "name": "linux_gcc_rocm_minsizerel", - "displayName": "linux gcc rocm minsizerel", - "inherits": [ - "linux_gcc_rocm_default", - "linux_minsizerel_default" - ], - "binaryDir": "${sourceDir}/build/rocm" - } - ] -} \ No newline at end of file diff --git a/cmake/presets/CMakeMacOSBuildPresets.json b/cmake/presets/CMakeMacOSBuildPresets.json deleted file mode 100644 index d3634c3d2..000000000 --- a/cmake/presets/CMakeMacOSBuildPresets.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "version": 6, - "include": [ - "CMakeMacOSConfigPresets.json" - ], - "buildPresets": [ - { - "name": "macos_x64_cpu_release", - "configurePreset": "macos_x64_cpu_release" - }, - { - "name": "macos_arm64_cpu_release", - "configurePreset": "macos_arm64_cpu_release" - }, - { - "name": "macos_cpu_debug", - "configurePreset": "macos_cpu_debug" - }, - { - "name": "macos_cpu_relwithdebinfo", - "configurePreset": "macos_cpu_relwithdebinfo" - }, - { - "name": "macos_cpu_minsizerel", - "configurePreset": "macos_cpu_minsizerel" - } - ] -} \ No newline at end of file diff --git a/cmake/presets/CMakeMacOSConfigPresets.json b/cmake/presets/CMakeMacOSConfigPresets.json deleted file mode 100644 index 7de4f39a9..000000000 --- a/cmake/presets/CMakeMacOSConfigPresets.json +++ /dev/null @@ -1,113 +0,0 @@ -{ - "version": 6, - "include": [ - "CMakeLinuxDefaultConfigPresets.json" - ], - "configurePresets": [ - { - "name": "macos_default", - "generator": "Unix Makefiles", - "binaryDir": "${sourceDir}/build/cpu", - "cacheVariables": { - "CMAKE_POSITION_INDEPENDENT_CODE": "ON", - "USE_CUDA": "OFF", - "USE_ROCM": "OFF" - }, - "environment": { - "CC": "clang", - "CXX": "clang++" - }, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Darwin" - } - }, - { - "name": "macos_release_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_C_FLAGS": " -O3 -pipe", - "CMAKE_CXX_FLAGS": " -O3 -pipe" - } - }, - { - "name": "macos_relwithdebinfo_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo", - "CMAKE_C_FLAGS": "-O3 -pipe -ggdb3", - "CMAKE_CXX_FLAGS": "-O3 -pipe -ggdb3" - } - }, - { - "name": "macos_debug_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_C_FLAGS": "-ggdb3 -O0", - "CMAKE_CXX_FLAGS": "-ggdb3 -O0 -D_GLIBCXX_DEBUG" - } - }, - { - "name": "macos_minsizerel_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "MinSizeRel", - "CMAKE_C_FLAGS": "-Os -pipe -ggdb3", - "CMAKE_CXX_FLAGS": "-Os -pipe -ggdb3" - } - }, - { - "name": "macos_cpu_release", - "displayName": "macos cpu release", - "inherits": [ - "macos_default", - "macos_release_default" - ] - }, - { - "name": "macos_cpu_debug", - "displayName": "macos cpu debug", - "inherits": [ - "macos_default", - "macos_debug_default" - ] - }, - { - "name": "macos_cpu_relwithdebinfo", - "displayName": "macos cpu relwithdebinfo", - "inherits": [ - "macos_default", - "macos_relwithdebinfo_default" - ] - }, - { - "name": "macos_cpu_minsizerel", - "displayName": "macos cpu minsizerel", - "inherits": [ - "macos_default", - "macos_minsizerel_default" - ] - }, - { - "name": "macos_x64_cpu_release", - "inherits": [ - "macos_cpu_release" - ], - "cacheVariables": { - "CMAKE_OSX_ARCHITECTURES": "x86_64" - }, - "displayName": "macos x64 cpu release", - "binaryDir": "${sourceDir}/build/cpu/osx-x64" - }, - { - "name": "macos_arm64_cpu_release", - "inherits": [ - "macos_cpu_release" - ], - "cacheVariables": { - "CMAKE_OSX_ARCHITECTURES": "arm64" - }, - "displayName": "macos arm64 cpu release", - "binaryDir": "${sourceDir}/build/cpu/osx-arm64" - } - ] -} \ No newline at end of file diff --git a/cmake/presets/CMakeWinBuildPresets.json b/cmake/presets/CMakeWinBuildPresets.json deleted file mode 100644 index f7ac7616a..000000000 --- a/cmake/presets/CMakeWinBuildPresets.json +++ /dev/null @@ -1,148 +0,0 @@ -{ - "version": 6, - "include": [ - "CMakeWinConfigPresets.json" - ], - "buildPresets": [ - { - "name": "windows_x64_cpu_release_asan", - "configuration": "Release", - "configurePreset": "windows_x64_cpu_release_asan" - }, - { - "name": "windows_x64_cpu_debug_asan", - "configuration": "Debug", - "configurePreset": "windows_x64_cpu_debug_asan" - }, - { - "name": "windows_x64_cpu_relwithdebinfo_asan", - "configuration": "RelWithDebInfo", - "configurePreset": "windows_x64_cpu_relwithdebinfo_asan" - }, - { - "name": "windows_x64_cpu_minsizerel_asan", - "configuration": "MinSizeRel", - "configurePreset": "windows_x64_cpu_minsizerel_asan" - }, - { - "name": "windows_x64_cpu_release", - "configuration": "Release", - "configurePreset": "windows_x64_cpu_release" - }, - { - "name": "windows_x64_cpu_debug", - "configuration": "Debug", - "configurePreset": "windows_x64_cpu_debug" - }, - { - "name": "windows_x64_cpu_relwithdebinfo", - "configuration": "RelWithDebInfo", - "configurePreset": "windows_x64_cpu_relwithdebinfo" - }, - { - "name": "windows_x64_cpu_minsizerel", - "configuration": "MinSizeRel", - "configurePreset": "windows_x64_cpu_minsizerel" - }, - { - "name": "windows_x64_cuda_release_asan", - "configuration": "Release", - "configurePreset": "windows_x64_cuda_release_asan" - }, - { - "name": "windows_x64_cuda_debug_asan", - "configuration": "Debug", - "configurePreset": "windows_x64_cuda_debug_asan" - }, - { - "name": "windows_x64_cuda_relwithdebinfo_asan", - "configuration": "RelWithDebInfo", - "configurePreset": "windows_x64_cuda_relwithdebinfo_asan" - }, - { - "name": "windows_x64_cuda_minsizerel_asan", - "configuration": "MinSizeRel", - "configurePreset": "windows_x64_cuda_minsizerel_asan" - }, - { - "name": "windows_x64_cuda_release", - "configuration": "Release", - "configurePreset": "windows_x64_cuda_release" - }, - { - "name": "windows_x64_cuda_debug", - "configuration": "Debug", - "configurePreset": "windows_x64_cuda_debug" - }, - { - "name": "windows_x64_cuda_relwithdebinfo", - "configuration": "RelWithDebInfo", - "configurePreset": "windows_x64_cuda_relwithdebinfo" - }, - { - "name": "windows_x64_cuda_minsizerel", - "configuration": "MinSizeRel", - "configurePreset": "windows_x64_cuda_minsizerel" - }, - { - "name": "windows_x64_directml_release_asan", - "configuration": "Release", - "configurePreset": "windows_x64_directml_release_asan" - }, - { - "name": "windows_x64_directml_debug_asan", - "configuration": "Debug", - "configurePreset": "windows_x64_directml_debug_asan" - }, - { - "name": "windows_x64_directml_relwithdebinfo_asan", - "configuration": "RelWithDebInfo", - "configurePreset": "windows_x64_directml_relwithdebinfo_asan" - }, - { - "name": "windows_x64_directml_minsizerel_asan", - "configuration": "MinSizeRel", - "configurePreset": "windows_x64_directml_minsizerel_asan" - }, - { - "name": "windows_x64_directml_release", - "configuration": "Release", - "configurePreset": "windows_x64_directml_release" - }, - { - "name": "windows_x64_directml_debug", - "configuration": "Debug", - "configurePreset": "windows_x64_directml_debug" - }, - { - "name": "windows_x64_directml_relwithdebinfo", - "configuration": "RelWithDebInfo", - "configurePreset": "windows_x64_directml_relwithdebinfo" - }, - { - "name": "windows_x64_directml_minsizerel", - "configuration": "MinSizeRel", - "configurePreset": "windows_x64_directml_minsizerel" - }, - { - "name": "windows_arm64_cpu_relwithdebinfo", - "configuration": "RelWithDebInfo", - "configurePreset": "windows_arm64_cpu_relwithdebinfo" - }, - { - "name": "windows_arm64_cpu_release", - "configuration": "Release", - "configurePreset": "windows_arm64_cpu_release" - }, - { - "name": "windows_arm64_directml_relwithdebinfo", - "configuration": "RelWithDebInfo", - "configurePreset": "windows_arm64_directml_relwithdebinfo" - }, - { - "name": "windows_arm64_directml_release", - "configuration": "Release", - "configurePreset": "windows_arm64_directml_release" - } - ] -} \ No newline at end of file diff --git a/cmake/presets/CMakeWinConfigPresets.json b/cmake/presets/CMakeWinConfigPresets.json deleted file mode 100644 index 3ff252456..000000000 --- a/cmake/presets/CMakeWinConfigPresets.json +++ /dev/null @@ -1,382 +0,0 @@ -{ - "version": 6, - "configurePresets": [ - { - "name": "windows_cpu_default", - "generator": "Visual Studio 17 2022", - "architecture": "x64", - "cacheVariables": { - "CMAKE_EXE_LINKER_FLAGS_INIT": "/profile /DYNAMICBASE", - "CMAKE_MODULE_LINKER_FLAGS_INIT": "/profile /DYNAMICBASE", - "CMAKE_SHARED_LINKER_FLAGS_INIT": "/profile /DYNAMICBASE", - "USE_CUDA": "OFF", - "USE_ROCM": "OFF" - }, - "condition": { - "type": "equals", - "lhs": "${hostSystemName}", - "rhs": "Windows" - } - }, - { - "name": "windows_cuda_default", - "inherits": "windows_cpu_default", - "cacheVariables": { - "USE_CUDA": "ON", - "CMAKE_CUDA_ARCHITECTURES": "60;61;70;75;80;86", - "CMAKE_CUDA_FLAGS_INIT": "/DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 -Xcompiler=\" /MP /guard:cf /Qspectre \" -allow-unsupported-compiler" - } - }, - { - "name": "windows_directml_default", - "inherits": "windows_cpu_default", - "cacheVariables": { - "USE_DML": "ON" - } - }, - { - "name": "windows_release_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Release", - "CMAKE_C_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O2 /Ob2 /DNDEBUG", - "CMAKE_CXX_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O2 /Ob2 /DNDEBUG" - } - }, - { - "name": "windows_debug_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "Debug", - "CMAKE_C_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Ob0 /Od /RTC1", - "CMAKE_CXX_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Ob0 /Od /RTC1" - } - }, - { - "name": "windows_relwithdebinfo_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "RelWithDebInfo", - "CMAKE_C_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O2 /Ob1 /DNDEBUG", - "CMAKE_CXX_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O2 /Ob1 /DNDEBUG" - } - }, - { - "name": "windows_minsizerel_default", - "cacheVariables": { - "CMAKE_BUILD_TYPE": "MinSizeRel", - "CMAKE_C_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O1 /Ob1 /DNDEBUG", - "CMAKE_CXX_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O1 /Ob1 /DNDEBUG" - } - }, - { - "name": "windows_release_asan_default", - "inherits": "windows_release_default", - "cacheVariables": { - "CMAKE_C_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O2 /Ob2 /DNDEBUG /fsanitize=address", - "CMAKE_CXX_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O2 /Ob2 /DNDEBUG /fsanitize=address" - } - }, - { - "name": "windows_debug_asan_default", - "inherits": "windows_debug_default", - "cacheVariables": { - "CMAKE_C_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Ob0 /Od /RTC1 /fsanitize=address", - "CMAKE_CXX_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Ob0 /Od /RTC1 /fsanitize=address" - } - }, - { - "name": "windows_relwithdebinfo_asan_default", - "inherits": "windows_relwithdebinfo_default", - "cacheVariables": { - "CMAKE_C_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O2 /Ob1 /DNDEBUG /fsanitize=address", - "CMAKE_CXX_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O2 /Ob1 /DNDEBUG /fsanitize=address" - } - }, - { - "name": "windows_minsizerel_asan_default", - "inherits": "windows_minsizerel_default", - "cacheVariables": { - "CMAKE_C_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O1 /Ob1 /DNDEBUG /fsanitize=address", - "CMAKE_CXX_FLAGS": "/EHsc /Qspectre /MP /guard:cf /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /O1 /Ob1 /DNDEBUG /fsanitize=address" - } - }, - { - "name": "windows_x64_cpu_release_asan", - "inherits": [ - "windows_release_asan_default", - "windows_cpu_default" - ], - "displayName": "windows x64 cpu release asan", - "binaryDir": "${sourceDir}/build/cpu_asan" - }, - { - "name": "windows_x64_cpu_debug_asan", - "inherits": [ - "windows_debug_asan_default", - "windows_cpu_default" - ], - "displayName": "windows x64 cpu debug asan", - "binaryDir": "${sourceDir}/build/cpu_asan" - }, - { - "name": "windows_x64_cpu_relwithdebinfo_asan", - "inherits": [ - "windows_relwithdebinfo_asan_default", - "windows_cpu_default" - ], - "displayName": "windows x64 cpu relwithdebinfo asan", - "binaryDir": "${sourceDir}/build/cpu_asan" - }, - { - "name": "windows_x64_cpu_minsizerel_asan", - "inherits": [ - "windows_minsizerel_asan_default", - "windows_cpu_default" - ], - "displayName": "windows x64 cpu minsizerel asan", - "binaryDir": "${sourceDir}/build/cpu_asan" - }, - { - "name": "windows_x64_cpu_release", - "inherits": [ - "windows_release_default", - "windows_cpu_default" - ], - "displayName": "windows x64 cpu release", - "binaryDir": "${sourceDir}/build/cpu/win-x64" - }, - { - "name": "windows_x64_cpu_debug", - "inherits": [ - "windows_debug_default", - "windows_cpu_default" - ], - "displayName": "windows x64 cpu debug", - "binaryDir": "${sourceDir}/build/cpu/win-x64" - }, - { - "name": "windows_x64_cpu_relwithdebinfo", - "inherits": [ - "windows_relwithdebinfo_default", - "windows_cpu_default" - ], - "displayName": "windows x64 cpu relwithdebinfo", - "binaryDir": "${sourceDir}/build/cpu/win-x64" - }, - { - "name": "windows_x64_cpu_minsizerel", - "inherits": [ - "windows_minsizerel_default", - "windows_cpu_default" - ], - "displayName": "windows x64 cpu minsizerel", - "binaryDir": "${sourceDir}/build/cpu/win-x64" - }, - { - "name": "windows_x64_cuda_release_asan", - "inherits": [ - "windows_release_asan_default", - "windows_cuda_default" - ], - "displayName": "windows x64 cuda release asan", - "binaryDir": "${sourceDir}/build/cuda_asan", - "cacheVariables": { - "USE_CUDA": "ON" - } - }, - { - "name": "windows_x64_cuda_debug_asan", - "inherits": [ - "windows_debug_asan_default", - "windows_cuda_default" - ], - "displayName": "windows x64 cuda debug asan", - "binaryDir": "${sourceDir}/build/cuda_asan", - "cacheVariables": { - "USE_CUDA": "ON" - } - }, - { - "name": "windows_x64_cuda_relwithdebinfo_asan", - "inherits": [ - "windows_relwithdebinfo_asan_default", - "windows_cuda_default" - ], - "displayName": "windows x64 cuda relwithdebinfo asan", - "binaryDir": "${sourceDir}/build/cuda_asan", - "cacheVariables": { - "USE_CUDA": "ON" - } - }, - { - "name": "windows_x64_cuda_minsizerel_asan", - "inherits": [ - "windows_minsizerel_asan_default", - "windows_cuda_default" - ], - "displayName": "windows x64 cuda minsizerel asan", - "binaryDir": "${sourceDir}/build/cuda_asan", - "cacheVariables": { - "USE_CUDA": "ON" - } - }, - { - "name": "windows_x64_cuda_release", - "inherits": [ - "windows_release_default", - "windows_cuda_default" - ], - "displayName": "windows x64 cuda release", - "binaryDir": "${sourceDir}/build/cuda/win-x64", - "cacheVariables": { - "USE_CUDA": "ON" - } - }, - { - "name": "windows_x64_cuda_debug", - "inherits": [ - "windows_debug_default", - "windows_cuda_default" - ], - "displayName": "windows x64 cuda debug", - "binaryDir": "${sourceDir}/build/cuda/win-x64", - "cacheVariables": { - "USE_CUDA": "ON" - } - }, - { - "name": "windows_x64_cuda_relwithdebinfo", - "inherits": [ - "windows_relwithdebinfo_default", - "windows_cuda_default" - ], - "displayName": "windows x64 cuda relwithdebinfo", - "binaryDir": "${sourceDir}/build/cuda/win-x64", - "cacheVariables": { - "USE_CUDA": "ON" - } - }, - { - "name": "windows_x64_cuda_minsizerel", - "inherits": [ - "windows_minsizerel_default", - "windows_cuda_default" - ], - "displayName": "windows x64 cuda minsizerel", - "binaryDir": "${sourceDir}/build/cuda/win-x64", - "cacheVariables": { - "USE_CUDA": "ON" - } - }, - { - "name": "windows_x64_directml_release_asan", - "inherits": [ - "windows_release_asan_default", - "windows_directml_default" - ], - "displayName": "windows x64 directml release asan", - "binaryDir": "${sourceDir}/build/directml_asan" - }, - { - "name": "windows_x64_directml_debug_asan", - "inherits": [ - "windows_debug_asan_default", - "windows_directml_default" - ], - "displayName": "windows x64 directml debug asan", - "binaryDir": "${sourceDir}/build/directml_asan" - }, - { - "name": "windows_x64_directml_relwithdebinfo_asan", - "inherits": [ - "windows_relwithdebinfo_asan_default", - "windows_directml_default" - ], - "displayName": "windows x64 directml relwithdebinfo asan", - "binaryDir": "${sourceDir}/build/directml_asan" - }, - { - "name": "windows_x64_directml_minsizerel_asan", - "inherits": [ - "windows_minsizerel_asan_default", - "windows_directml_default" - ], - "displayName": "windows x64 directml minsizerel asan", - "binaryDir": "${sourceDir}/build/directml_asan" - }, - { - "name": "windows_x64_directml_release", - "inherits": [ - "windows_release_default", - "windows_directml_default" - ], - "displayName": "windows x64 directml release", - "binaryDir": "${sourceDir}/build/directml/win-x64" - }, - { - "name": "windows_x64_directml_debug", - "inherits": [ - "windows_debug_default", - "windows_directml_default" - ], - "displayName": "windows x64 directml debug", - "binaryDir": "${sourceDir}/build/directml/win-x64" - }, - { - "name": "windows_x64_directml_relwithdebinfo", - "inherits": [ - "windows_relwithdebinfo_default", - "windows_directml_default" - ], - "displayName": "windows x64 directml relwithdebinfo", - "binaryDir": "${sourceDir}/build/directml/win-x64" - }, - { - "name": "windows_x64_directml_minsizerel", - "inherits": [ - "windows_minsizerel_default", - "windows_directml_default" - ], - "displayName": "windows x64 directml minsizerel", - "binaryDir": "${sourceDir}/build/directml/win-x64" - }, - { - "name": "windows_arm64_cpu_relwithdebinfo", - "inherits": [ - "windows_relwithdebinfo_default", - "windows_cpu_default" - ], - "displayName": "windows arm64 cpu relwithdebinfo", - "binaryDir": "${sourceDir}/build/cpu/win-arm64", - "architecture": "arm64" - }, - { - "name": "windows_arm64_cpu_release", - "inherits": [ - "windows_release_default", - "windows_cpu_default" - ], - "displayName": "windows arm64 cpu release", - "binaryDir": "${sourceDir}/build/cpu/win-arm64", - "architecture": "arm64" - }, - { - "name": "windows_arm64_directml_relwithdebinfo", - "inherits": [ - "windows_relwithdebinfo_default", - "windows_directml_default" - ], - "displayName": "windows arm64 directml relwithdebinfo", - "binaryDir": "${sourceDir}/build/directml/win-arm64", - "architecture": "arm64" - }, - { - "name": "windows_arm64_directml_release", - "inherits": [ - "windows_release_default", - "windows_directml_default" - ], - "displayName": "windows arm64 directml release", - "binaryDir": "${sourceDir}/build/directml/win-arm64", - "architecture": "arm64" - } - ] -} \ No newline at end of file From 7cc1f7dc926c45537d76518ce014060d7d9d742d Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Fri, 6 Dec 2024 14:01:14 -0800 Subject: [PATCH 07/16] fixes --- .github/workflows/linux-cpu-x64-build.yml | 5 +++-- .github/workflows/linux-cpu-x64-nightly-build.yml | 1 + .github/workflows/linux-gpu-x64-build.yml | 1 + .github/workflows/mac-cpu-arm64-build.yml | 6 +++--- .github/workflows/win-cpu-arm64-build.yml | 1 + .github/workflows/win-cpu-x64-build.yml | 1 + .github/workflows/win-cuda-x64-build.yml | 1 + .github/workflows/win-directml-x64-build.yml | 1 + 8 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux-cpu-x64-build.yml b/.github/workflows/linux-cpu-x64-build.yml index af2a78363..21561a5fa 100644 --- a/.github/workflows/linux-cpu-x64-build.yml +++ b/.github/workflows/linux-cpu-x64-build.yml @@ -72,7 +72,8 @@ jobs: - name: Build with Python run: | - python3 build.py --parallel --config=Debug --build_csharp + python -m pip install requests + python3 build.py --parallel --config=Debug --build_csharp --cmake_generator "Ninja" - name: Install the python wheel and test dependencies run: | @@ -108,7 +109,7 @@ jobs: - name: Build the Java API and Run the Java Tests run: | set -e -x - python3 build.py --config=Release --build_dir build/Linux/Debug --build_java --parallel --cmake_generator "Ninja" + python3 build.py --config=Debug --build_dir build/Linux/Debug --build_java --parallel --cmake_generator "Ninja" - name: Run tests run: | diff --git a/.github/workflows/linux-cpu-x64-nightly-build.yml b/.github/workflows/linux-cpu-x64-nightly-build.yml index 62722992e..08e6173e4 100644 --- a/.github/workflows/linux-cpu-x64-nightly-build.yml +++ b/.github/workflows/linux-cpu-x64-nightly-build.yml @@ -41,6 +41,7 @@ jobs: - name: Build with Python run: | + python3 -m pip install requests python3 build.py --parallel --config=Release - name: Install the python wheel and test dependencies diff --git a/.github/workflows/linux-gpu-x64-build.yml b/.github/workflows/linux-gpu-x64-build.yml index aafcfe675..c5e6c74cc 100644 --- a/.github/workflows/linux-gpu-x64-build.yml +++ b/.github/workflows/linux-gpu-x64-build.yml @@ -94,6 +94,7 @@ jobs: --volume $GITHUB_WORKSPACE:/ort_genai_src \ -w /ort_genai_src onnxruntimecudabuildx64 \ bash -c " \ + ${{ env.PYTHON_EXECUTABLE }} -m pip install requests && \ ${{ env.PYTHON_EXECUTABLE }} build.py --use_cuda --parallel --config=Debug" - name: Use Dummy HuggingFace Token diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index a54cd855c..228f783be 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -52,9 +52,9 @@ jobs: mv ${{ env.ORT_PACKAGE_NAME }}/build/native/include ort/ mv ${{ env.ORT_PACKAGE_NAME }}/runtimes/osx-arm64/native/* ort/lib/ - - name: Build with Python - run: | - python3 build.py --parallel --config=Release --build_csharp --build_java --cmake_generator "Unix Makefiles" + - name: Build with Python + run: | + python3 build.py --parallel --config=Release --build_csharp --build_java --cmake_generator "Unix Makefiles" - name: Install the python wheel and test dependencies run: | diff --git a/.github/workflows/win-cpu-arm64-build.yml b/.github/workflows/win-cpu-arm64-build.yml index 730ebce9f..85fb08ae3 100644 --- a/.github/workflows/win-cpu-arm64-build.yml +++ b/.github/workflows/win-cpu-arm64-build.yml @@ -54,6 +54,7 @@ jobs: - name: Build with Python run: | + python -m pip install requests python build.py --parallel --config=Release --build_csharp - name: Build the C# API and Run the C# Tests diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 7570f3469..0d170bcd7 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -78,6 +78,7 @@ jobs: - name: Build with Python run: | + python3 -m pip install requests python3 build.py --parallel --config=Debug --build_csharp --build_java - name: Install the python wheel and test dependencies diff --git a/.github/workflows/win-cuda-x64-build.yml b/.github/workflows/win-cuda-x64-build.yml index 33ecdcff1..a7f5b724b 100644 --- a/.github/workflows/win-cuda-x64-build.yml +++ b/.github/workflows/win-cuda-x64-build.yml @@ -67,6 +67,7 @@ jobs: - name: Build with Python run: | + python -m pip install requests python build.py --cuda_home=${{ env.cuda_dir }}\\v${{ env.cuda_version }} --parallel --config=Debug - name: Install the Python Wheel and Test Dependencies diff --git a/.github/workflows/win-directml-x64-build.yml b/.github/workflows/win-directml-x64-build.yml index 2cf0b8fc6..4789535c5 100644 --- a/.github/workflows/win-directml-x64-build.yml +++ b/.github/workflows/win-directml-x64-build.yml @@ -80,6 +80,7 @@ jobs: - name: Build with Python run: | + python -m pip install requests python build.py --parallel --config=Release --use_dml - name: Install the Python Wheel and Test Dependencies From b33a98edacdef0a9cbf6d63fc9eba9c5f71c1542 Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Mon, 9 Dec 2024 10:50:41 -0800 Subject: [PATCH 08/16] fixes maybe --- .github/workflows/linux-gpu-x64-build.yml | 2 +- .github/workflows/mac-cpu-arm64-build.yml | 2 ++ .github/workflows/win-cpu-arm64-build.yml | 1 + .github/workflows/win-cpu-x64-build.yml | 1 + 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux-gpu-x64-build.yml b/.github/workflows/linux-gpu-x64-build.yml index c5e6c74cc..664f26f82 100644 --- a/.github/workflows/linux-gpu-x64-build.yml +++ b/.github/workflows/linux-gpu-x64-build.yml @@ -95,7 +95,7 @@ jobs: -w /ort_genai_src onnxruntimecudabuildx64 \ bash -c " \ ${{ env.PYTHON_EXECUTABLE }} -m pip install requests && \ - ${{ env.PYTHON_EXECUTABLE }} build.py --use_cuda --parallel --config=Debug" + ${{ env.PYTHON_EXECUTABLE }} build.py --use_cuda --cuda_home=/usr/local/cuda-12.2 --parallel --config=Debug" - name: Use Dummy HuggingFace Token run: | diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index 228f783be..1941770f4 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -54,6 +54,8 @@ jobs: - name: Build with Python run: | + python3 -m pip install requests + python3 -m pip install wheel python3 build.py --parallel --config=Release --build_csharp --build_java --cmake_generator "Unix Makefiles" - name: Install the python wheel and test dependencies diff --git a/.github/workflows/win-cpu-arm64-build.yml b/.github/workflows/win-cpu-arm64-build.yml index 85fb08ae3..4ce1cc71d 100644 --- a/.github/workflows/win-cpu-arm64-build.yml +++ b/.github/workflows/win-cpu-arm64-build.yml @@ -55,6 +55,7 @@ jobs: - name: Build with Python run: | python -m pip install requests + python -m pip install wheel python build.py --parallel --config=Release --build_csharp - name: Build the C# API and Run the C# Tests diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 0d170bcd7..92897dd75 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -79,6 +79,7 @@ jobs: - name: Build with Python run: | python3 -m pip install requests + python3 -m pip install wheel python3 build.py --parallel --config=Debug --build_csharp --build_java - name: Install the python wheel and test dependencies From d96f13075e6c4c5858ff150f233c536a909357f9 Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Mon, 9 Dec 2024 14:08:26 -0800 Subject: [PATCH 09/16] f --- .github/workflows/linux-gpu-x64-build.yml | 2 +- .github/workflows/win-cpu-arm64-build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-gpu-x64-build.yml b/.github/workflows/linux-gpu-x64-build.yml index 664f26f82..ff816020c 100644 --- a/.github/workflows/linux-gpu-x64-build.yml +++ b/.github/workflows/linux-gpu-x64-build.yml @@ -114,7 +114,7 @@ jobs: ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/requirements.txt --user && \ ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/cuda/torch/requirements.txt --user && \ ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/cuda/ort/requirements.txt --user && \ - ${{ env.PYTHON_EXECUTABLE }} -m pip install /ort_genai_src/build/Linux/Debug/wheel/onnxruntime_genai*manylinux*.whl --no-deps --user && \ + ${{ env.PYTHON_EXECUTABLE }} -m pip install /ort_genai_src/build/Linux/Debug/wheel/onnxruntime_genai*linux*.whl --no-deps --user && \ ${{ env.PYTHON_EXECUTABLE }} test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models --e2e" # TODO: Enable this by adding dotnet to the docker image diff --git a/.github/workflows/win-cpu-arm64-build.yml b/.github/workflows/win-cpu-arm64-build.yml index 4ce1cc71d..366eb471d 100644 --- a/.github/workflows/win-cpu-arm64-build.yml +++ b/.github/workflows/win-cpu-arm64-build.yml @@ -56,7 +56,7 @@ jobs: run: | python -m pip install requests python -m pip install wheel - python build.py --parallel --config=Release --build_csharp + python build.py --parallel --config=Release - name: Build the C# API and Run the C# Tests run: | From 2dc637d99f86a6a58e03d99578f115b134f3cc89 Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Mon, 9 Dec 2024 14:37:34 -0800 Subject: [PATCH 10/16] trys --- .github/workflows/linux-cpu-x64-build.yml | 4 ++-- .github/workflows/mac-cpu-arm64-build.yml | 2 +- .github/workflows/win-cpu-x64-build.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux-cpu-x64-build.yml b/.github/workflows/linux-cpu-x64-build.yml index 21561a5fa..3c4d1279c 100644 --- a/.github/workflows/linux-cpu-x64-build.yml +++ b/.github/workflows/linux-cpu-x64-build.yml @@ -73,7 +73,7 @@ jobs: - name: Build with Python run: | python -m pip install requests - python3 build.py --parallel --config=Debug --build_csharp --cmake_generator "Ninja" + python3 build.py --parallel --config=Debug - name: Install the python wheel and test dependencies run: | @@ -109,7 +109,7 @@ jobs: - name: Build the Java API and Run the Java Tests run: | set -e -x - python3 build.py --config=Debug --build_dir build/Linux/Debug --build_java --parallel --cmake_generator "Ninja" + python3 build.py --config=Debug --build_dir build/Linux/Debug --build_java --parallel - name: Run tests run: | diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index 1941770f4..4b0aefa87 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -56,7 +56,7 @@ jobs: run: | python3 -m pip install requests python3 -m pip install wheel - python3 build.py --parallel --config=Release --build_csharp --build_java --cmake_generator "Unix Makefiles" + python3 build.py --parallel --config=Release --build_java --cmake_generator "Unix Makefiles" - name: Install the python wheel and test dependencies run: | diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 92897dd75..fe322f283 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -80,7 +80,7 @@ jobs: run: | python3 -m pip install requests python3 -m pip install wheel - python3 build.py --parallel --config=Debug --build_csharp --build_java + python3 build.py --parallel --config=Debug --build_java - name: Install the python wheel and test dependencies run: | From da7ddd3087bf36602bd6142c29af9421c6b88625 Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Tue, 10 Dec 2024 10:25:26 -0800 Subject: [PATCH 11/16] mac --- .github/workflows/mac-cpu-arm64-build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index 4b0aefa87..389e72baa 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -56,7 +56,7 @@ jobs: run: | python3 -m pip install requests python3 -m pip install wheel - python3 build.py --parallel --config=Release --build_java --cmake_generator "Unix Makefiles" + python3 build.py --parallel --config=Release --cmake_generator "Unix Makefiles" - name: Install the python wheel and test dependencies run: | @@ -94,6 +94,13 @@ jobs: cd test/csharp dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOSX/Release" --verbosity normal + - name: Build the Java API and Run the Java Tests + run: | + set -e -x + source genai-macos-venv/bin/activate + python3 build.py --config=Release --build_dir build/cpu/osx-arm64 --build_java --parallel --cmake_generator "Unix Makefiles" + dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOSX/Release" --verbosity normal + - name: Run tests run: | set -e -x From 9e6bea752b0c2bcb18766b5f7cb9bf7a40c5ca91 Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Tue, 10 Dec 2024 12:50:59 -0800 Subject: [PATCH 12/16] baijus fixes --- .github/workflows/mac-cpu-arm64-build.yml | 16 ++++++++-------- .github/workflows/win-cpu-x64-build.yml | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index 389e72baa..117243820 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -65,7 +65,7 @@ jobs: python3 -m pip install -r test/python/requirements.txt python3 -m pip install -r test/python/macos/torch/requirements.txt python3 -m pip install -r test/python/macos/ort/requirements.txt - python3 -m pip install build/MacOSX/Release/wheel/onnxruntime_genai*.whl --no-deps + python3 -m pip install build/MacOS/Release/wheel/onnxruntime_genai*.whl --no-deps - name: Remove the ort lib and header files run: | @@ -75,8 +75,8 @@ jobs: if: always() continue-on-error: true run: | - ls -l ${{ github.workspace }}/build/MacOSX/Release - ls -l ${{ github.workspace }}/build/MacOSX/Release/wheel + ls -l ${{ github.workspace }}/build/MacOS/Release + ls -l ${{ github.workspace }}/build/MacOS/Release/wheel # This will also download all the test models to the test/test_models directory # These models are used by the python tests as well as C#, C++ and others. @@ -92,18 +92,18 @@ jobs: run: | export ORTGENAI_LOG_ORT_LIB=1 cd test/csharp - dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOSX/Release" --verbosity normal + dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOS/Release" --verbosity normal - name: Build the Java API and Run the Java Tests run: | set -e -x source genai-macos-venv/bin/activate - python3 build.py --config=Release --build_dir build/cpu/osx-arm64 --build_java --parallel --cmake_generator "Unix Makefiles" - dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOSX/Release" --verbosity normal + python3 build.py --config=Release --build_java --parallel --cmake_generator "Unix Makefiles" + dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOS/Release" --verbosity normal - name: Run tests run: | set -e -x export ORTGENAI_LOG_ORT_LIB=1 - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/build/MacOSX/Release - ./build/MacOSX/Release/unit_tests + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/build/MacOS/Release + ./build/MacOS/Release/unit_tests diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index fe322f283..7a4cf5f59 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -11,7 +11,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true env: - binaryDir: 'build/Windows/Debug' + binaryDir: 'build/Windows/Debug/Debug' ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" From 16ec768719028671bdcb50dd9cca4eda7ff02112 Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Tue, 10 Dec 2024 15:57:09 -0800 Subject: [PATCH 13/16] trya gian --- .github/workflows/mac-cpu-arm64-build.yml | 2 +- .github/workflows/win-cpu-x64-build.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index 117243820..0436617a1 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -56,7 +56,7 @@ jobs: run: | python3 -m pip install requests python3 -m pip install wheel - python3 build.py --parallel --config=Release --cmake_generator "Unix Makefiles" + python3 build.py --parallel --use_csharp --config=Release --cmake_generator "Unix Makefiles" - name: Install the python wheel and test dependencies run: | diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 7a4cf5f59..ab2b7b30c 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -11,7 +11,7 @@ concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true env: - binaryDir: 'build/Windows/Debug/Debug' + binaryDir: 'build/Windows/Debug' ORT_NIGHTLY_REST_API: "https://feeds.dev.azure.com/aiinfra/PublicPackages/_apis/packaging/Feeds/ORT-Nightly/packages?packageNameQuery=Microsoft.ML.OnnxRuntime&api-version=6.0-preview.1" ORT_PACKAGE_NAME: "Microsoft.ML.OnnxRuntime" @@ -100,13 +100,13 @@ jobs: - name: Build the C# API and Run the C# Tests run: | cd test\csharp - dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" --verbosity normal + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Debug" /p:OrtLibDir="$env:GITHUB_WORKSPACE\ort\lib" --verbosity normal - name: Verify Build Artifacts if: always() continue-on-error: true run: | - Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir -Recurse + Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir\Debug -Recurse Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:binaryDir\test -Recurse - name: Run tests From d468734291a9ff259af703f4ac1651b37df4ba20 Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Wed, 11 Dec 2024 12:25:28 -0800 Subject: [PATCH 14/16] fixes --- .github/workflows/linux-cpu-arm64-build.yml | 10 +++++++++- .github/workflows/linux-gpu-x64-build.yml | 4 ++-- .github/workflows/mac-cpu-arm64-build.yml | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linux-cpu-arm64-build.yml b/.github/workflows/linux-cpu-arm64-build.yml index fa7e7bd66..7a09d4f33 100644 --- a/.github/workflows/linux-cpu-arm64-build.yml +++ b/.github/workflows/linux-cpu-arm64-build.yml @@ -72,7 +72,15 @@ jobs: - name: Build with Python run: | - python3 build.py --parallel --config=Debug + set -e -x + docker run \ + --rm \ + --volume $GITHUB_WORKSPACE:/onnxruntime_src \ + -w /onnxruntime_src ort_genai_linux_arm64_gha \ + bash -c " \ + ${{ env.PYTHON_EXECUTABLE }} -m pip install wheel && \ + ${{ env.PYTHON_EXECUTABLE }} -m pip install requests && \ + ${{ env.PYTHON_EXECUTABLE }} build.py --parallel --config=Debug" - name: Docker -- Check test directory run: | diff --git a/.github/workflows/linux-gpu-x64-build.yml b/.github/workflows/linux-gpu-x64-build.yml index ff816020c..96ef30074 100644 --- a/.github/workflows/linux-gpu-x64-build.yml +++ b/.github/workflows/linux-gpu-x64-build.yml @@ -95,7 +95,7 @@ jobs: -w /ort_genai_src onnxruntimecudabuildx64 \ bash -c " \ ${{ env.PYTHON_EXECUTABLE }} -m pip install requests && \ - ${{ env.PYTHON_EXECUTABLE }} build.py --use_cuda --cuda_home=/usr/local/cuda-12.2 --parallel --config=Debug" + ${{ env.PYTHON_EXECUTABLE }} build.py --use_cuda --cuda_home=/usr/local/cuda-12.2 --parallel --config=Debug --cmake_extra_defines=MANYLINUX=ON" - name: Use Dummy HuggingFace Token run: | @@ -114,7 +114,7 @@ jobs: ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/requirements.txt --user && \ ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/cuda/torch/requirements.txt --user && \ ${{ env.PYTHON_EXECUTABLE }} -m pip install -r test/python/cuda/ort/requirements.txt --user && \ - ${{ env.PYTHON_EXECUTABLE }} -m pip install /ort_genai_src/build/Linux/Debug/wheel/onnxruntime_genai*linux*.whl --no-deps --user && \ + ${{ env.PYTHON_EXECUTABLE }} -m pip install /ort_genai_src/build/Linux/Debug/wheel/onnxruntime_genai*manylinux*.whl --no-deps --user && \ ${{ env.PYTHON_EXECUTABLE }} test/python/test_onnxruntime_genai.py --cwd test/python --test_models test/test_models --e2e" # TODO: Enable this by adding dotnet to the docker image diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index 0436617a1..fa47d7281 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -56,7 +56,7 @@ jobs: run: | python3 -m pip install requests python3 -m pip install wheel - python3 build.py --parallel --use_csharp --config=Release --cmake_generator "Unix Makefiles" + python3 build.py --parallel --build_csharp --config=Release --cmake_generator "Unix Makefiles" - name: Install the python wheel and test dependencies run: | From 1fac9a1cb86b149ea5889c21745623ccf520b0bf Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Wed, 11 Dec 2024 14:43:41 -0800 Subject: [PATCH 15/16] try --- .github/workflows/linux-cpu-arm64-build.yml | 6 +++--- .github/workflows/linux-gpu-x64-build.yml | 3 ++- .github/workflows/mac-cpu-arm64-build.yml | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux-cpu-arm64-build.yml b/.github/workflows/linux-cpu-arm64-build.yml index 7a09d4f33..692b340b3 100644 --- a/.github/workflows/linux-cpu-arm64-build.yml +++ b/.github/workflows/linux-cpu-arm64-build.yml @@ -78,9 +78,9 @@ jobs: --volume $GITHUB_WORKSPACE:/onnxruntime_src \ -w /onnxruntime_src ort_genai_linux_arm64_gha \ bash -c " \ - ${{ env.PYTHON_EXECUTABLE }} -m pip install wheel && \ - ${{ env.PYTHON_EXECUTABLE }} -m pip install requests && \ - ${{ env.PYTHON_EXECUTABLE }} build.py --parallel --config=Debug" + python3 -m pip install wheel && \ + python3 -m pip install requests && \ + python3 build.py --parallel --config=Debug" - name: Docker -- Check test directory run: | diff --git a/.github/workflows/linux-gpu-x64-build.yml b/.github/workflows/linux-gpu-x64-build.yml index 96ef30074..027643acc 100644 --- a/.github/workflows/linux-gpu-x64-build.yml +++ b/.github/workflows/linux-gpu-x64-build.yml @@ -95,7 +95,8 @@ jobs: -w /ort_genai_src onnxruntimecudabuildx64 \ bash -c " \ ${{ env.PYTHON_EXECUTABLE }} -m pip install requests && \ - ${{ env.PYTHON_EXECUTABLE }} build.py --use_cuda --cuda_home=/usr/local/cuda-12.2 --parallel --config=Debug --cmake_extra_defines=MANYLINUX=ON" + ${{ env.PYTHON_EXECUTABLE }} -m pip install wheel && \ + ${{ env.PYTHON_EXECUTABLE }} build.py --use_cuda --cuda_home=/usr/local/cuda-12.2 --parallel --config=Debug --cmake_extra_defines=\"MANYLINUX=ON\"" - name: Use Dummy HuggingFace Token run: | diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index fa47d7281..117243820 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -56,7 +56,7 @@ jobs: run: | python3 -m pip install requests python3 -m pip install wheel - python3 build.py --parallel --build_csharp --config=Release --cmake_generator "Unix Makefiles" + python3 build.py --parallel --config=Release --cmake_generator "Unix Makefiles" - name: Install the python wheel and test dependencies run: | From 1d8081e8602b07ffbf5c443174a43099464e4f4a Mon Sep 17 00:00:00 2001 From: aciddelgado Date: Wed, 11 Dec 2024 16:46:59 -0800 Subject: [PATCH 16/16] maybes --- .github/workflows/linux-gpu-x64-build.yml | 2 +- .github/workflows/mac-cpu-arm64-build.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux-gpu-x64-build.yml b/.github/workflows/linux-gpu-x64-build.yml index 027643acc..8a2463ad7 100644 --- a/.github/workflows/linux-gpu-x64-build.yml +++ b/.github/workflows/linux-gpu-x64-build.yml @@ -96,7 +96,7 @@ jobs: bash -c " \ ${{ env.PYTHON_EXECUTABLE }} -m pip install requests && \ ${{ env.PYTHON_EXECUTABLE }} -m pip install wheel && \ - ${{ env.PYTHON_EXECUTABLE }} build.py --use_cuda --cuda_home=/usr/local/cuda-12.2 --parallel --config=Debug --cmake_extra_defines=\"MANYLINUX=ON\"" + ${{ env.PYTHON_EXECUTABLE }} build.py --use_cuda --cuda_home=/usr/local/cuda-12.2 --parallel --config=Debug" - name: Use Dummy HuggingFace Token run: | diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index 117243820..e0f7bfd62 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -92,18 +92,18 @@ jobs: run: | export ORTGENAI_LOG_ORT_LIB=1 cd test/csharp - dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOS/Release" --verbosity normal + dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOS/Release/Release" --verbosity normal - name: Build the Java API and Run the Java Tests run: | set -e -x source genai-macos-venv/bin/activate python3 build.py --config=Release --build_java --parallel --cmake_generator "Unix Makefiles" - dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOS/Release" --verbosity normal + dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="../../build/MacOS/Release/Release" --verbosity normal - name: Run tests run: | set -e -x export ORTGENAI_LOG_ORT_LIB=1 - export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/build/MacOS/Release - ./build/MacOS/Release/unit_tests + export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$GITHUB_WORKSPACE/build/MacOS/Release/Release + ./build/MacOS/Release/Release/unit_tests