Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/linux-cpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ jobs:
- 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/requirements-cpu.txt --user
python3 -m pip install build/cpu/wheel/onnxruntime_genai*.whl --user --no-deps
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: |
Expand All @@ -80,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.
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/linux-cpu-x64-nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ jobs:
- 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/requirements-cpu.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

- name: Use Dummy HuggingFace Token
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/linux-gpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -124,7 +124,8 @@ jobs:
-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/requirements-cuda.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"

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/mac-cpu-arm64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -54,7 +54,8 @@ jobs:
python3 -m venv genai-macos-venv
source genai-macos-venv/bin/activate
python3 -m pip install -r test/python/requirements.txt
python3 -m pip install -r test/python/requirements-macos.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

- name: Remove the ort lib and header files
Expand All @@ -66,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.
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/win-cpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ jobs:
- 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\requirements-cpu.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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/win-cuda-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ jobs:
- 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\requirements-cuda.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
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/win-directml-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ jobs:
- 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\requirements-directml.txt
python -m pip install -r test\python\directml\torch\requirements.txt
python -m pip install -r test\python\directml\ort\requirements.txt
python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) --no-deps

- name: Verify Build Artifacts
Expand Down
2 changes: 2 additions & 0 deletions .pipelines/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
6 changes: 3 additions & 3 deletions .pipelines/nuget-publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
37 changes: 1 addition & 36 deletions .pipelines/pypl-publishing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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) }}:
Expand All @@ -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
47 changes: 5 additions & 42 deletions .pipelines/stages/jobs/capi-packaging-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand 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
Expand Down
9 changes: 7 additions & 2 deletions .pipelines/stages/jobs/nuget-validation-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ jobs:
SpecificArtifact: ${{ parameters.specificArtifact }}
BuildId: ${{ parameters.BuildId }}

- task: Docker@2
inputs:
containerRegistry: onnxruntimebuildcache
command: "login"
addPipelineData: false
displayName: "Log in to container registry"

- ${{ if eq(parameters.os, 'win') }}:
- ${{ if eq(parameters.ep, 'cuda') }}:
- powershell: |
Expand Down Expand Up @@ -180,8 +187,6 @@ jobs:
- ${{ if eq(parameters.ep, 'cuda') }}:
- bash: |
set -e -x
az login --identity --username 63b63039-6328-442f-954b-5a64d124e5b4
az acr login --name onnxruntimebuildcache --subscription 00c06639-6ee4-454e-8058-8d8b1703bd87
docker pull $(cuda_docker_image)

docker run \
Expand Down
46 changes: 5 additions & 41 deletions .pipelines/stages/jobs/py-packaging-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ parameters:
type: string
- name: ep
type: string
- name: ort_version
type: string
- name: cuda_version
type: string
default: ''
Expand Down Expand Up @@ -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'
Expand All @@ -68,7 +60,10 @@ jobs:
Python312:
PyDotVer: '3.12'
PyNoDotVer: '312'

Python313:
PyDotVer: '3.13'
PyNoDotVer: '313'

timeoutInMinutes: 240
workspace:
clean: all
Expand 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
Expand Down
Loading