diff --git a/.github/workflows/linux-cpu-x64-build.yml b/.github/workflows/linux-cpu-x64-build.yml index 061885e3a3..102b9a7900 100644 --- a/.github/workflows/linux-cpu-x64-build.yml +++ b/.github/workflows/linux-cpu-x64-build.yml @@ -70,7 +70,7 @@ jobs: 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 --find-links build/cpu/wheel onnxruntime_genai + python3 -m pip install --user --no-index --no-deps --find-links build/cpu/wheel onnxruntime_genai - name: Use Dummy HuggingFace Token run: | @@ -81,6 +81,7 @@ jobs: 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. diff --git a/.github/workflows/linux-gpu-x64-build.yml b/.github/workflows/linux-gpu-x64-build.yml index 50f94157ba..843485fa96 100644 --- a/.github/workflows/linux-gpu-x64-build.yml +++ b/.github/workflows/linux-gpu-x64-build.yml @@ -20,7 +20,7 @@ env: jobs: linux-cuda-x64-build: env : - PYTHON_EXECUTABLE: "/opt/python/cp38-cp38/bin/python3.8" + 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 diff --git a/.github/workflows/mac-cpu-arm64-build.yml b/.github/workflows/mac-cpu-arm64-build.yml index c37c5fa0fe..fe5a72c688 100644 --- a/.github/workflows/mac-cpu-arm64-build.yml +++ b/.github/workflows/mac-cpu-arm64-build.yml @@ -28,7 +28,7 @@ jobs: - name: Get the Latest OnnxRuntime Nightly Version run: | ORT_NIGHTLY_VERSION=$(curl -s "${{ env.ORT_NIGHTLY_REST_API }}" | jq -r '.value[0].versions[0].normalizedVersion') - echo "$ORT_NIGHTLY_VERSION" + echo "$ORT_NIGHTLY_VERSION" echo "ORT_NIGHTLY_VERSION=$ORT_NIGHTLY_VERSION" >> $GITHUB_ENV - name: Download OnnxRuntime Nightly run: | @@ -67,6 +67,7 @@ jobs: continue-on-error: true run: | ls -l ${{ github.workspace }}/build/cpu/osx-arm64 + ls -l ${{ github.workspace }}/build/cpu/osx-arm64/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. diff --git a/.pipelines/codeql.yaml b/.pipelines/codeql.yaml index 6558f4996f..2a95822935 100644 --- a/.pipelines/codeql.yaml +++ b/.pipelines/codeql.yaml @@ -41,6 +41,7 @@ stages: - task: onebranch.pipeline.tsaoptions@1 displayName: 'OneBranch TSAOptions' inputs: + tsaConfigFilePath: '$(Build.Repository.LocalPath)/.config/tsaoptions.json' appendSourceBranchName: false - task: CredScan@3 displayName: 🔍 Run CredScan @@ -63,4 +64,5 @@ stages: condition: and (succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/main')) continueOnError: true inputs: + tsaConfigFilePath: '$(Build.Repository.LocalPath)/.config/tsaoptions.json' GdnPublishTsaOnboard: true diff --git a/.pipelines/nuget-publishing.yml b/.pipelines/nuget-publishing.yml index 1888d1234d..7692770981 100644 --- a/.pipelines/nuget-publishing.yml +++ b/.pipelines/nuget-publishing.yml @@ -51,17 +51,17 @@ parameters: - name: ort_version displayName: 'OnnxRuntime version' type: string - default: '1.19.0-dev-20240805-1630-ee2fe87e2d' + default: '1.20.0-dev-20241023-1635-2d00351d7b' - name: ort_cuda_version displayName: 'OnnxRuntime GPU version' type: string - default: '1.19.0-dev-20240805-0337-88c811b638' + default: '1.20.0-dev-20241022-1606-2d00351d7b' - name: ort_dml_version displayName: 'OnnxRuntime DML version' type: string - default: '1.19.0-dev-20240805-1630-ee2fe87e2d' + default: '1.20.0-dev-20241023-1635-2d00351d7b' - name: cuda_version displayName: 'CUDA version' diff --git a/.pipelines/pypl-publishing.yml b/.pipelines/pypl-publishing.yml index 099679cc3a..d627da7a50 100644 --- a/.pipelines/pypl-publishing.yml +++ b/.pipelines/pypl-publishing.yml @@ -37,38 +37,13 @@ parameters: - name: enable_linux_rocm displayName: 'Whether Linux ROCm package is built.' type: boolean - default: true + default: false - name: enable_macos_cpu displayName: 'Whether MacOS CPU package is built.' type: boolean default: true -- name: ort_version - displayName: 'OnnxRuntime version' - type: string - default: '1.19.0-dev-20240805-1630-ee2fe87e2d' - -- name: ort_cuda_118_version - displayName: 'OnnxRuntime GPU version for CUDA 11.8' - type: string - default: '1.18.0-dev-20240426-0614-b842effa29' - -- name: ort_cuda_122_version - displayName: 'OnnxRuntime GPU version for CUDA 12.2' - type: string - default: '1.19.0-dev-20240805-0337-88c811b638' - -- name: ort_dml_version - displayName: 'OnnxRuntime DML version' - type: string - default: '1.19.0-dev-20240805-1630-ee2fe87e2d' - -- name: ort_rocm_version - displayName: 'OnnxRuntime ROCm version' - type: string - default: '1.19.0-dev-20240805-0337-88c811b638' - - name: cuda_versions displayName: 'CUDA versions' type: string @@ -103,11 +78,6 @@ stages: enable_win_dml: ${{ parameters.enable_win_dml }} enable_win_arm64_cpu: ${{ parameters.enable_win_arm64_cpu }} enable_macos_cpu: ${{ parameters.enable_macos_cpu }} - ort_version: ${{ parameters.ort_version }} - ort_cuda_118_version: ${{ parameters.ort_cuda_118_version }} - ort_cuda_122_version: ${{ parameters.ort_cuda_122_version }} - ort_rocm_version: ${{ parameters.ort_rocm_version }} - ort_dml_version: ${{ parameters.ort_dml_version }} cuda_versions: ${{ parameters.cuda_versions }} build_config: ${{ parameters.build_config }} - ${{ if eq(parameters.enable_post_packaging_validation, true) }}: @@ -120,10 +90,5 @@ stages: enable_win_dml: ${{ parameters.enable_win_dml }} enable_win_arm64_cpu: ${{ parameters.enable_win_arm64_cpu }} enable_macos_cpu: ${{ parameters.enable_macos_cpu }} - ort_version: ${{ parameters.ort_version }} - ort_cuda_118_version: ${{ parameters.ort_cuda_118_version }} - ort_cuda_122_version: ${{ parameters.ort_cuda_122_version }} - ort_rocm_version: ${{ parameters.ort_rocm_version }} - ort_dml_version: ${{ parameters.ort_dml_version }} cuda_versions: ${{ parameters.cuda_versions }} SpecificArtifact: false \ No newline at end of file diff --git a/.pipelines/stages/jobs/capi-packaging-job.yml b/.pipelines/stages/jobs/capi-packaging-job.yml index 8759d2b69c..e837a070ca 100644 --- a/.pipelines/stages/jobs/capi-packaging-job.yml +++ b/.pipelines/stages/jobs/capi-packaging-job.yml @@ -62,36 +62,6 @@ jobs: value: ${{ parameters.os }} - name: feed_name value: '7982ae20-ed19-4a35-a362-a96ac99897b7' - - name: ort_filename - ${{ if eq(parameters.ep, 'cpu') }}: - value: 'Microsoft.ML.OnnxRuntime' - ${{ elseif eq(parameters.ep, 'cuda') }}: - ${{if eq(parameters.os, 'win') }}: - value: 'Microsoft.ML.OnnxRuntime.Gpu.Windows' - ${{ else }}: - value: 'Microsoft.ML.OnnxRuntime.Gpu.Linux' - ${{ elseif eq(parameters.ep, 'directml')}}: - value: 'Microsoft.ML.OnnxRuntime.DirectML' - ${{ elseif eq(parameters.ep, 'rocm')}}: - value: 'Microsoft.ML.OnnxRuntime.ROCm' - ${{ else }}: - value: 'Microsoft.ML.OnnxRuntime' - - - name: ortHome - value: 'ort' - - name: dml_dir - value: 'Microsoft.AI.DirectML.1.15.1' - - name: dml_zip - value: 'Microsoft.AI.DirectML.1.15.1.zip' - - name: dml_url - value: "https://www.nuget.org/api/v2/package/Microsoft.AI.DirectML/1.15.1" - - - name: d3d12_dir - value: 'Microsoft.Direct3D.D3D12.1.614.0' - - name: d3d12_zip - value: 'Microsoft.Direct3D.D3D12.1.614.0.zip' - - name: d3d12_url - value: "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.614.0" workspace: clean: all @@ -107,18 +77,11 @@ jobs: displayName: Copy python 3.11.0 version to agent tools directory condition: and(eq(variables['arch'], 'arm64'), eq(variables['os'], 'win')) - - ${{ if eq(parameters.arch, 'arm64') }}: - - task: UsePythonVersion@0 - inputs: - versionSpec: 3.11 - addToPath: true - architecture: $(arch) - - ${{ else }}: - - task: UsePythonVersion@0 - inputs: - versionSpec: 3.10 - addToPath: true - architecture: $(arch) + - task: UsePythonVersion@0 + inputs: + versionSpec: 3.11 + addToPath: true + architecture: $(arch) - ${{ if eq(parameters.os, 'linux') }}: - template: steps/capi-linux-step.yml diff --git a/.pipelines/stages/jobs/py-packaging-job.yml b/.pipelines/stages/jobs/py-packaging-job.yml index db39b9afb7..79397ba2a5 100644 --- a/.pipelines/stages/jobs/py-packaging-job.yml +++ b/.pipelines/stages/jobs/py-packaging-job.yml @@ -3,8 +3,6 @@ parameters: type: string - name: ep type: string -- name: ort_version - type: string - name: cuda_version type: string default: '' @@ -53,12 +51,6 @@ jobs: PyNoDotVer: '312' ${{ else }}: matrix: - Python38: - PyDotVer: '3.8' - PyNoDotVer: '38' - Python39: - PyDotVer: '3.9' - PyNoDotVer: '39' Python310: PyDotVer: '3.10' PyNoDotVer: '310' @@ -68,7 +60,10 @@ jobs: Python312: PyDotVer: '3.12' PyNoDotVer: '312' - + Python313: + PyDotVer: '3.13' + PyNoDotVer: '313' + timeoutInMinutes: 240 workspace: clean: all @@ -93,46 +88,15 @@ jobs: value: ${{ parameters.cuda_version }} - name: ep value: ${{ parameters.ep }} - - name: ort_version - value: ${{ parameters.ort_version }} - name: os value: ${{ parameters.os }} - name: feed_name value: '7982ae20-ed19-4a35-a362-a96ac99897b7' - - name: ort_filename - ${{ if eq(parameters.ep, 'cpu') }}: - value: 'Microsoft.ML.OnnxRuntime' - ${{ elseif eq(parameters.ep, 'cuda') }}: - ${{if eq(parameters.os, 'win') }}: - value: 'Microsoft.ML.OnnxRuntime.Gpu.Windows' - ${{ else }}: - value: 'Microsoft.ML.OnnxRuntime.Gpu.Linux' - ${{ elseif eq(parameters.ep, 'directml')}}: - value: 'Microsoft.ML.OnnxRuntime.DirectML' - ${{ elseif eq(parameters.ep, 'rocm')}}: - value: 'Microsoft.ML.OnnxRuntime.ROCm' - ${{ else }}: - value: 'Microsoft.ML.OnnxRuntime' - - - name: dml_dir - value: 'Microsoft.AI.DirectML.1.15.1' - - name: dml_zip - value: 'Microsoft.AI.DirectML.1.15.1.zip' - - name: dml_url - value: "https://www.nuget.org/api/v2/package/Microsoft.AI.DirectML/1.15.1" - - - name: d3d12_dir - value: 'Microsoft.Direct3D.D3D12.1.614.0' - - name: d3d12_zip - value: 'Microsoft.Direct3D.D3D12.1.614.0.zip' - - name: d3d12_url - value: "https://www.nuget.org/api/v2/package/Microsoft.Direct3D.D3D12/1.614.0" - steps: - script: | - MKDIR $(Agent.ToolsDirectory)\Python\3.12.3\arm64 + MKDIR $(Agent.ToolsDirectory)\Python\3.12.3\arm64 XCOPY /s /y /h /e /c /q "C:\Python\Python312\*.*" $(Agent.ToolsDirectory)\Python\3.12.3\arm64\ COPY NUL $(Agent.ToolsDirectory)\Python\3.12.3\arm64.complete DIR $(Agent.ToolsDirectory)\Python diff --git a/.pipelines/stages/jobs/py-validation-job.yml b/.pipelines/stages/jobs/py-validation-job.yml index 8657bab669..2afb279a75 100644 --- a/.pipelines/stages/jobs/py-validation-job.yml +++ b/.pipelines/stages/jobs/py-validation-job.yml @@ -11,8 +11,6 @@ parameters: type: string - name: ep type: string -- name: ort_version - type: string - name: cuda_version type: string default: '' @@ -73,23 +71,11 @@ jobs: value: ${{ parameters.cuda_version }} - name: ep value: ${{ parameters.ep }} - - name: ort_version - value: ${{ parameters.ort_version }} - name: os value: ${{ parameters.os }} - name: py_dot_ver - ${{ if eq(parameters.ep, 'cpu') }}: - ${{ if eq(parameters.arch, 'arm64') }}: - value: '3.12' - ${{ else }}: - value: '3.9' - ${{ elseif eq(parameters.ep, 'cuda') }}: - value: '3.10' - ${{ elseif eq(parameters.ep, 'directml')}}: - value: '3.11' - ${{ else }}: - value: '3.9' + value: '3.12' - name: pip_package_name ${{ if eq(parameters.ep, 'cpu') }}: @@ -231,8 +217,8 @@ jobs: python -m pip install -r test/python/cuda/ort/requirements.txt } elseif ("$(ep)" -eq "directml") { - python -m pip install -r test/python/requirements-torch-directml.txt - python -m pip install -r test/python/requirements-torch-directml.txt + python -m pip install -r test/python/directml/torch/requirements.txt + python -m pip install -r test/python/directml/ort/requirements.txt } else { python -m pip install -r test/python/cpu/torch/requirements.txt diff --git a/.pipelines/stages/jobs/steps/capi-linux-step.yml b/.pipelines/stages/jobs/steps/capi-linux-step.yml index 8e418dd623..5de3eca48c 100644 --- a/.pipelines/stages/jobs/steps/capi-linux-step.yml +++ b/.pipelines/stages/jobs/steps/capi-linux-step.yml @@ -34,7 +34,6 @@ steps: - bash: | echo "arch=$(arch)" - echo "ort_filename=$(ort_filename)" echo "ort_version=$(ort_version)" echo "ep=$(ep)" echo "cuda_version=$(cuda_version)" diff --git a/.pipelines/stages/jobs/steps/capi-macos-step.yml b/.pipelines/stages/jobs/steps/capi-macos-step.yml index 92b4dd85c3..e90b3bcafd 100644 --- a/.pipelines/stages/jobs/steps/capi-macos-step.yml +++ b/.pipelines/stages/jobs/steps/capi-macos-step.yml @@ -22,7 +22,6 @@ steps: - bash: | echo "arch=$(arch)" - echo "ort_filename=$(ort_filename)" echo "ort_version=$(ort_version)" echo "ep=$(ep)" echo "cuda_version=$(cuda_version)" diff --git a/.pipelines/stages/jobs/steps/capi-win-step.yml b/.pipelines/stages/jobs/steps/capi-win-step.yml index 37313651d2..168fa47c7f 100644 --- a/.pipelines/stages/jobs/steps/capi-win-step.yml +++ b/.pipelines/stages/jobs/steps/capi-win-step.yml @@ -26,13 +26,13 @@ steps: - task: onebranch.pipeline.tsaoptions@1 displayName: 'OneBranch TSAOptions' inputs: + tsaConfigFilePath: '$(Build.Repository.LocalPath)\.config\tsaoptions.json' appendSourceBranchName: false - template: utils/set-nightly-build-option-variable.yml - script: | echo "arch=$(arch)" - echo "ort_filename=$(ort_filename)" echo "ort_version=$(ort_version)" echo "ep=$(ep)" echo "cuda_version=$(cuda_version)" @@ -40,24 +40,6 @@ steps: echo "build_config=${{ parameters.build_config }}" displayName: 'Print Parameters' -- ${{ if eq(parameters.ep, 'directml') }}: - - powershell: | - Invoke-WebRequest -Uri $(dml_url) -OutFile $(dml_zip) - Expand-Archive $(dml_zip) -DestinationPath $(dml_dir) - Remove-Item -Path $(dml_zip) - Get-ChildItem -Recurse $(dml_dir) - mv $(dml_dir)\bin\$(arch)-win\DirectML.dll ort\lib - mv $(dml_dir)\include\DirectML.h ort\include - - Invoke-WebRequest -Uri $(d3d12_url) -OutFile $(d3d12_zip) - Expand-Archive $(d3d12_zip) -DestinationPath $(d3d12_dir) - Remove-Item -Path $(d3d12_zip) - Get-ChildItem -Recurse $(d3d12_dir) - mv $(d3d12_dir)\build\native\bin\$(arch)\D3D12Core.dll ort\lib - workingDirectory: '$(Build.Repository.LocalPath)' - displayName: 'Download DirectML & Direct3D DLLs' - continueOnError: true - - powershell: | azcopy.exe cp --recursive "https://lotusscus.blob.core.windows.net/models/cuda_sdk/v$(cuda_version)" 'cuda_sdk' displayName: 'Download CUDA $(cuda_version)' diff --git a/.pipelines/stages/py-packaging-stage.yml b/.pipelines/stages/py-packaging-stage.yml index d7bab62c8b..74dfc347aa 100644 --- a/.pipelines/stages/py-packaging-stage.yml +++ b/.pipelines/stages/py-packaging-stage.yml @@ -15,16 +15,6 @@ parameters: type: boolean - name: enable_macos_cpu type: boolean -- name: ort_version - type: string -- name: ort_cuda_118_version - type: string -- name: ort_cuda_122_version - type: string -- name: ort_rocm_version - type: string -- name: ort_dml_version - type: string - name: cuda_versions type: string default: '11.8,12.2' @@ -41,7 +31,6 @@ stages: parameters: arch: 'x64' ep: 'cpu' - ort_version: ${{ parameters.ort_version }} os: 'win' build_config: ${{ parameters.build_config }} @@ -50,7 +39,6 @@ stages: parameters: arch: 'arm64' ep: 'cpu' - ort_version: ${{ parameters.ort_version }} os: 'win' build_config: ${{ parameters.build_config }} @@ -59,7 +47,6 @@ stages: parameters: arch: 'x64' ep: 'directml' - ort_version: ${{ parameters.ort_dml_version }} os: 'win' build_config: ${{ parameters.build_config }} @@ -70,7 +57,6 @@ stages: cuda_version: '11.8' cuda_display_version: '118' ep: 'cuda' - ort_version: ${{ parameters.ort_cuda_118_version }} os: 'win' build_config: ${{ parameters.build_config }} @@ -81,7 +67,6 @@ stages: cuda_version: '12.2' cuda_display_version: '122' ep: 'cuda' - ort_version: ${{ parameters.ort_cuda_122_version }} os: 'win' build_config: ${{ parameters.build_config }} @@ -90,7 +75,6 @@ stages: parameters: arch: 'x64' ep: 'cpu' - ort_version: ${{ parameters.ort_version }} os: 'linux' build_config: ${{ parameters.build_config }} @@ -101,7 +85,6 @@ stages: cuda_version: '11.8' cuda_display_version: '118' ep: 'cuda' - ort_version: ${{ parameters.ort_cuda_118_version }} os: 'linux' - ${{ if and(eq(parameters.enable_linux_cuda, true), contains(parameters.cuda_versions, '12.2')) }}: @@ -111,7 +94,6 @@ stages: cuda_version: '12.2' cuda_display_version: '122' ep: 'cuda' - ort_version: ${{ parameters.ort_cuda_122_version }} os: 'linux' build_config: ${{ parameters.build_config }} @@ -120,7 +102,6 @@ stages: parameters: arch: 'x64' ep: 'rocm' - ort_version: ${{ parameters.ort_rocm_version }} os: 'linux' build_config: ${{ parameters.build_config }} - ${{ if eq(parameters.enable_macos_cpu, true) }}: @@ -128,13 +109,11 @@ stages: parameters: arch: 'x64' ep: 'cpu' - ort_version: ${{ parameters.ort_version }} os: 'osx' build_config: ${{ parameters.build_config }} - template: jobs/py-packaging-job.yml parameters: arch: 'arm64' ep: 'cpu' - ort_version: ${{ parameters.ort_version }} os: 'osx' build_config: ${{ parameters.build_config }} diff --git a/.pipelines/stages/py-validation-stage.yml b/.pipelines/stages/py-validation-stage.yml index 0b6abda5a4..11696ec24a 100644 --- a/.pipelines/stages/py-validation-stage.yml +++ b/.pipelines/stages/py-validation-stage.yml @@ -21,16 +21,6 @@ parameters: type: boolean - name: enable_macos_cpu type: boolean -- name: ort_version - type: string -- name: ort_cuda_118_version - type: string -- name: ort_cuda_122_version - type: string -- name: ort_rocm_version - type: string -- name: ort_dml_version - type: string - name: cuda_versions type: string default: '11.8,12.2' @@ -44,7 +34,6 @@ stages: parameters: arch: 'x64' ep: 'cpu' - ort_version: ${{ parameters.ort_version }} os: 'win' SpecificArtifact: ${{ parameters.SpecificArtifact }} BuildId: ${{ parameters.BuildId }} @@ -54,7 +43,6 @@ stages: parameters: arch: 'arm64' ep: 'cpu' - ort_version: ${{ parameters.ort_version }} os: 'win' SpecificArtifact: ${{ parameters.SpecificArtifact }} BuildId: ${{ parameters.BuildId }} @@ -64,7 +52,6 @@ stages: parameters: arch: 'x64' ep: 'directml' - ort_version: ${{ parameters.ort_dml_version }} os: 'win' SpecificArtifact: ${{ parameters.SpecificArtifact }} BuildId: ${{ parameters.BuildId }} @@ -76,7 +63,6 @@ stages: cuda_version: '11.8' cuda_display_version: '118' ep: 'cuda' - ort_version: ${{ parameters.ort_cuda_118_version }} os: 'win' SpecificArtifact: ${{ parameters.SpecificArtifact }} BuildId: ${{ parameters.BuildId }} @@ -88,7 +74,6 @@ stages: cuda_version: '12.2' cuda_display_version: '122' ep: 'cuda' - ort_version: ${{ parameters.ort_cuda_122_version }} os: 'win' SpecificArtifact: ${{ parameters.SpecificArtifact }} BuildId: ${{ parameters.BuildId }} @@ -98,7 +83,6 @@ stages: parameters: arch: 'x64' ep: 'cpu' - ort_version: ${{ parameters.ort_version }} os: 'linux' SpecificArtifact: ${{ parameters.SpecificArtifact }} BuildId: ${{ parameters.BuildId }} @@ -110,7 +94,6 @@ stages: cuda_version: '11.8' cuda_display_version: '118' ep: 'cuda' - ort_version: ${{ parameters.ort_cuda_118_version }} os: 'linux' SpecificArtifact: ${{ parameters.SpecificArtifact }} BuildId: ${{ parameters.BuildId }} @@ -121,7 +104,6 @@ stages: cuda_version: '12.2' cuda_display_version: '122' ep: 'cuda' - ort_version: ${{ parameters.ort_cuda_122_version }} os: 'linux' SpecificArtifact: ${{ parameters.SpecificArtifact }} BuildId: ${{ parameters.BuildId }} @@ -131,7 +113,6 @@ stages: parameters: arch: 'x64' ep: 'cpu' - ort_version: ${{ parameters.ort_version }} os: 'osx' SpecificArtifact: ${{ parameters.SpecificArtifact }} BuildId: ${{ parameters.BuildId }} \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 90519fdec6..60076364d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,12 @@ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. -cmake_minimum_required(VERSION 3.28) +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + # For xcframework support + cmake_minimum_required(VERSION 3.28) +else() + cmake_minimum_required(VERSION 3.26) +endif() include(FetchContent) include(CMakeDependentOption) project(Generators LANGUAGES C CXX) diff --git a/cmake/package.cmake b/cmake/package.cmake index e515621fb5..35efc3ea8d 100644 --- a/cmake/package.cmake +++ b/cmake/package.cmake @@ -14,6 +14,14 @@ install(TARGETS PUBLIC_HEADER DESTINATION include FRAMEWORK DESTINATION ${CMAKE_INSTALL_BINDIR} ) +if(USE_CUDA) + install(TARGETS + onnxruntime-genai-cuda + LIBRARY DESTINATION lib + RUNTIME DESTINATION lib + ARCHIVE DESTINATION lib + ) +endif() if (WIN32) install(FILES $ DESTINATION lib CONFIGURATIONS RelWithDebInfo Debug) diff --git a/examples/csharp/HelloPhi/HelloPhi.csproj b/examples/csharp/HelloPhi/HelloPhi.csproj index 3cc34b8e90..1ee51abefd 100644 --- a/examples/csharp/HelloPhi/HelloPhi.csproj +++ b/examples/csharp/HelloPhi/HelloPhi.csproj @@ -10,9 +10,9 @@ - - - + + + diff --git a/src/python/setup.py.in b/src/python/setup.py.in index b08c200d6f..6df075952e 100644 --- a/src/python/setup.py.in +++ b/src/python/setup.py.in @@ -26,22 +26,21 @@ package_name = '@TARGET_NAME@' def _onnxruntime_dependency() -> str: dependency = None # Use stable version as default - ort_version = os.environ.get("ONNXRUNTIME_VERSION", "1.19.0") - is_nightly = True if "dev" in ort_version else False + ort_version = os.environ.get("ONNXRUNTIME_VERSION", "1.20.0") if package_name == "onnxruntime-genai": - dependency = "onnxruntime" if not is_nightly else "ort-nightly" + dependency = "onnxruntime" import platform # win arm64 whls are only available in onnxruntime-qnn if platform.machine() == "ARM64" and sys.platform.startswith("win"): - dependency = "onnxruntime-qnn" if not is_nightly else "ort-nightly-qnn" + dependency = "onnxruntime-qnn" elif package_name == "onnxruntime-genai-cuda": - dependency = "onnxruntime-gpu" if not is_nightly else "ort-nightly-gpu" + dependency = "onnxruntime-gpu" elif package_name == "onnxruntime-genai-directml": - dependency = "onnxruntime-directml" if not is_nightly else "ort-nightly-directml" + dependency = "onnxruntime-directml" elif package_name == "onnxruntime-genai-rocm": - dependency = "onnxruntime-rocm" if not is_nightly else "ort-nightly-rocm" + dependency = "onnxruntime-rocm" else: raise ValueError(f'Unable to determine the onnxruntime dependency for {package_name}.') diff --git a/test/python/cuda/ort/requirements.txt b/test/python/cuda/ort/requirements.txt index db83e9abb6..afc5aa7aed 100644 --- a/test/python/cuda/ort/requirements.txt +++ b/test/python/cuda/ort/requirements.txt @@ -1,2 +1,2 @@ -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ -ort-nightly-gpu==1.20.0.dev20241007001 +onnxruntime-gpu==1.20.0.dev20241016001 diff --git a/test/python/directml/ort/requirements.txt b/test/python/directml/ort/requirements.txt index 5b4d862183..44a6f1003d 100644 --- a/test/python/directml/ort/requirements.txt +++ b/test/python/directml/ort/requirements.txt @@ -1,2 +1,2 @@ -i https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/ORT-Nightly/pypi/simple/ -ort-nightly-directml==1.20.0.dev20241006001 +onnxruntime-directml==1.20.0.dev20241016004 diff --git a/tools/nuget/generate_nuspec_for_native_nuget.py b/tools/nuget/generate_nuspec_for_native_nuget.py index 00b7dfd086..3bb5050eb9 100644 --- a/tools/nuget/generate_nuspec_for_native_nuget.py +++ b/tools/nuget/generate_nuspec_for_native_nuget.py @@ -103,7 +103,7 @@ def generate_dependencies(xml_text, package_version, ort_package_name, ort_packa xml_text.append(f'') xml_text.append(f'') if ort_package_name.endswith("DirectML"): - xml_text.append(f'') + xml_text.append(f'') xml_text.append("") xml_text.append("") @@ -127,9 +127,12 @@ def add_native_artifact_if_exists(xml_lines, runtime, artifact): if runtime.startswith("win"): add_native_artifact_if_exists(lines, runtime, "onnxruntime-genai.lib") add_native_artifact_if_exists(lines, runtime, "onnxruntime-genai.dll") + add_native_artifact_if_exists(lines, runtime, "onnxruntime-genai-cuda.lib") + add_native_artifact_if_exists(lines, runtime, "onnxruntime-genai-cuda.dll") add_native_artifact_if_exists(lines, runtime, "d3d12core.dll") elif runtime.startswith("linux"): add_native_artifact_if_exists(lines, runtime, "libonnxruntime-genai.so") + add_native_artifact_if_exists(lines, runtime, "libonnxruntime-genai-cuda.so") elif runtime.startswith("osx"): add_native_artifact_if_exists(lines, runtime, "libonnxruntime-genai.dylib") elif runtime.startswith("ios"):