mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-09 00:30:53 +00:00
* update ONNX * update onnx + register kernels for reduction ops * bug fix kernel reg * update cgmanifests * revert unsqueeze op 13 registration * filter ops which are not implemented yet * filter some tests * update onnx commit to include conv transpose bug fix * update docker images * undo not required test changes * fix test failures
322 lines
15 KiB
YAML
322 lines
15 KiB
YAML
parameters:
|
|
DoEsrp: 'false'
|
|
PackageName: 'Microsoft.ML.OnnxRuntime.Gpu'
|
|
|
|
jobs:
|
|
- template: ../../templates/win-ci-2019.yml
|
|
parameters:
|
|
AgentPool : 'Win-GPU-2019'
|
|
ArtifactName: 'drop-nuget'
|
|
JobName: 'Windows_CI_GPU_CUDA_Dev'
|
|
BuildCommand: --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --enable_onnx_tests --use_telemetry --cmake_generator "Visual Studio 16 2019" --use_cuda --cuda_version=10.2 --cuda_home="C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2" --cudnn_home="C:\local\cudnn-10.2-windows10-x64-v8.0.3.33\cuda"
|
|
BuildArch: 'x64'
|
|
msbuildArchitecture: 'amd64'
|
|
EnvSetupScript: 'setup_env_cuda.bat'
|
|
sln_platform: 'x64'
|
|
DoDebugBuild: 'false'
|
|
DoNugetPack : 'true'
|
|
DoCompliance: 'false'
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
CudaVersion: '10.2'
|
|
OrtPackageId: 'Microsoft.ML.OnnxRuntime.Gpu'
|
|
NuPackScript: |
|
|
msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.Gpu
|
|
copy $(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory)
|
|
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory)
|
|
mkdir $(Build.ArtifactStagingDirectory)\testdata
|
|
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\custom_op_library.* $(Build.ArtifactStagingDirectory)\testdata
|
|
|
|
- template: ../../templates/win-ci-2019.yml
|
|
parameters:
|
|
AgentPool : 'Win-GPU-2019'
|
|
ArtifactName: 'drop-nuget-dml'
|
|
JobName: 'Windows_CI_GPU_DML_Dev'
|
|
BuildCommand: --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --use_winml --cmake_generator "Visual Studio 16 2019"
|
|
BuildArch: 'x64'
|
|
msbuildArchitecture: 'amd64'
|
|
EnvSetupScript: 'setup_env_cuda.bat'
|
|
sln_platform: 'x64'
|
|
DoDebugBuild: 'false'
|
|
DoNugetPack : 'true'
|
|
DoCompliance: 'false'
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
CudaVersion: '10.2'
|
|
OrtPackageId: 'Microsoft.ML.OnnxRuntime.DirectML'
|
|
NuPackScript: |
|
|
msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML
|
|
copy $(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory)
|
|
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\*.nupkg $(Build.ArtifactStagingDirectory)
|
|
mkdir $(Build.ArtifactStagingDirectory)\testdata
|
|
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\custom_op_library.* $(Build.ArtifactStagingDirectory)\testdata
|
|
|
|
- template: ../../templates/win-ci-2019.yml
|
|
parameters:
|
|
AgentPool : 'Win-GPU-2019'
|
|
ArtifactName: 'drop-win-dml-x86-zip'
|
|
JobName: 'Windows_CI_GPU_DML_Dev_x86'
|
|
BuildCommand: --build_dir $(Build.BinariesDirectory) --x86 --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --use_winml --cmake_generator "Visual Studio 16 2019"
|
|
BuildArch: 'x86'
|
|
EnvSetupScript: 'setup_env_x86.bat'
|
|
sln_platform: 'Win32'
|
|
DoDebugBuild: 'false'
|
|
DoNugetPack : 'true'
|
|
DoCompliance: ${{ parameters.DoCompliance }}
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
RunTests: 'false'
|
|
NuPackScript: |
|
|
msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /p:TargetArchitecture=x86 /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML
|
|
cd $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\
|
|
ren Microsoft.ML.OnnxRuntime.DirectML.* win-dml-x86.zip
|
|
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\win-dml-x86.zip $(Build.ArtifactStagingDirectory)
|
|
mkdir $(Build.ArtifactStagingDirectory)\testdata
|
|
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\custom_op_library.* $(Build.ArtifactStagingDirectory)\testdata
|
|
|
|
- job: 'Linux_CI_GPU_Dev'
|
|
workspace:
|
|
clean: all
|
|
timeoutInMinutes: 120
|
|
pool: 'Linux-GPU-CUDA10'
|
|
steps:
|
|
- template: ../../templates/set-version-number-variables-step.yml
|
|
- template: ../../templates/linux-set-variables-and-download.yml
|
|
- task: Docker@2
|
|
displayName: login
|
|
inputs:
|
|
containerRegistry: onnxruntimeregistry
|
|
command: login
|
|
addPipelineData: false
|
|
- task: CmdLine@2
|
|
inputs:
|
|
script: |
|
|
mkdir -p $HOME/.onnx
|
|
docker run --gpus all -e NVIDIA_VISIBLE_DEVICES=all --rm --volume /data/onnx:/data/onnx:ro --volume $(Build.SourcesDirectory):/onnxruntime_src --volume $(Build.BinariesDirectory):/build --volume /data/models:/build/models:ro --volume $HOME/.onnx:/home/onnxruntimedev/.onnx -e NIGHTLY_BUILD onnxruntimeregistry.azurecr.io/internal/azureml/onnxruntimecentosgpubuild:ch9q \
|
|
/bin/bash -c "python3 /onnxruntime_src/tools/ci_build/build.py --build_dir /build --config Release --skip_submodule_sync --parallel --build_shared_lib --use_cuda --cuda_version=10.2 --cuda_home=/usr/local/cuda-10.2 --cudnn_home=/usr/local/cuda-10.2 --enable_onnx_tests && cd /build/Release && make install DESTDIR=/build/linux-x64"
|
|
- task: Docker@2
|
|
displayName: logout
|
|
inputs:
|
|
containerRegistry: onnxruntimeregistry
|
|
command: logout
|
|
addPipelineData: false
|
|
- script: |
|
|
set -e -x
|
|
mv $(Build.BinariesDirectory)/linux-x64/usr/local/lib64 $(Build.BinariesDirectory)/linux-x64/linux-x64
|
|
cd $(Build.BinariesDirectory)/linux-x64
|
|
zip -r linux-x64.zip linux-x64
|
|
cp $(Build.BinariesDirectory)/linux-x64/linux*.zip $(Build.ArtifactStagingDirectory)
|
|
mkdir $(Build.ArtifactStagingDirectory)/testdata
|
|
cp $(Build.BinariesDirectory)/Release/libcustom_op_library.so* $(Build.ArtifactStagingDirectory)/testdata
|
|
ls -al $(Build.ArtifactStagingDirectory)
|
|
displayName: 'Create Artifacts'
|
|
- task: PublishPipelineArtifact@0
|
|
displayName: 'Publish Pipeline Artifact'
|
|
inputs:
|
|
artifactName: 'drop-linux'
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
- template: ../../templates/component-governance-component-detection-steps.yml
|
|
parameters :
|
|
condition : 'succeeded'
|
|
- template: ../../templates/clean-agent-build-directory-step.yml
|
|
|
|
- job: NuGet_Packaging
|
|
workspace:
|
|
clean: all
|
|
pool: 'Win-GPU-2019'
|
|
dependsOn:
|
|
- Windows_CI_GPU_CUDA_Dev
|
|
- Windows_CI_GPU_DML_Dev
|
|
- Windows_CI_GPU_DML_Dev_x86
|
|
- Linux_CI_GPU_Dev
|
|
condition: succeeded()
|
|
steps:
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - NuGet CUDA'
|
|
inputs:
|
|
artifactName: 'drop-nuget'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - NuGet DirectML'
|
|
inputs:
|
|
artifactName: 'drop-nuget-dml'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact-dml'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - NuGet DirectML x86'
|
|
inputs:
|
|
artifactName: 'drop-win-dml-x86-zip'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact-dml'
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - Linux'
|
|
inputs:
|
|
artifactName: 'drop-linux'
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact'
|
|
|
|
- script: |
|
|
pushd $(Build.BinariesDirectory)\nuget-artifact
|
|
dir
|
|
powershell -Command "Invoke-WebRequest http://stahlworks.com/dev/unzip.exe -OutFile unzip.exe"
|
|
powershell -Command "Invoke-WebRequest http://stahlworks.com/dev/zip.exe -OutFile zip.exe"
|
|
set PATH=%CD%;%PATH%
|
|
SETLOCAL EnableDelayedExpansion
|
|
FOR /R %%i IN (*.nupkg) do (
|
|
set filename=%%~ni
|
|
IF NOT "!filename:~25,7!"=="Managed" (
|
|
rename %%~ni.nupkg %%~ni.zip
|
|
unzip %%~ni.zip -d %%~ni
|
|
del /Q %%~ni.zip
|
|
unzip linux-x64.zip -d linux-x64
|
|
mkdir %%~ni\runtimes\linux-x64
|
|
mkdir %%~ni\runtimes\linux-x64\native
|
|
move linux-x64\linux-x64\libonnxruntime.so %%~ni\runtimes\linux-x64\native\libonnxruntime.so
|
|
pushd %%~ni
|
|
zip -r ..\%%~ni.zip .
|
|
popd
|
|
move %%~ni.zip %%~ni.nupkg
|
|
)
|
|
)
|
|
popd
|
|
copy $(Build.BinariesDirectory)\nuget-artifact\*.nupkg $(Build.ArtifactStagingDirectory)
|
|
displayName: 'Bundle Native NuGet and other binaries'
|
|
|
|
- script: |
|
|
pushd $(Build.BinariesDirectory)\nuget-artifact-dml
|
|
dir
|
|
powershell -Command "Invoke-WebRequest http://stahlworks.com/dev/unzip.exe -OutFile unzip.exe"
|
|
powershell -Command "Invoke-WebRequest http://stahlworks.com/dev/zip.exe -OutFile zip.exe"
|
|
set PATH=%CD%;%PATH%
|
|
SETLOCAL EnableDelayedExpansion
|
|
FOR /R %%i IN (*.nupkg) do (
|
|
set filename=%%~ni
|
|
IF NOT "!filename:~25,7!"=="Managed" (
|
|
rename %%~ni.nupkg %%~ni.zip
|
|
unzip %%~ni.zip -d %%~ni
|
|
del /Q %%~ni.zip
|
|
|
|
unzip win-dml-x86.zip -d win-x86
|
|
mkdir %%~ni\runtimes\win-x86
|
|
mkdir %%~ni\runtimes\win-x86\native
|
|
|
|
move win-x86\runtimes\win-x86\native\onnxruntime.dll %%~ni\runtimes\win-x86\native\onnxruntime.dll
|
|
move win-x86\runtimes\win-x86\native\onnxruntime.lib %%~ni\runtimes\win-x86\native\onnxruntime.lib
|
|
move win-x86\runtimes\win-x86\native\onnxruntime.pdb %%~ni\runtimes\win-x86\native\onnxruntime.pdb
|
|
move win-x86\runtimes\win-x86\native\directml.dll %%~ni\runtimes\win-x86\native\DirectML.dll
|
|
move win-x86\runtimes\win-x86\native\directml.pdb %%~ni\runtimes\win-x86\native\DirectML.pdb
|
|
|
|
pushd %%~ni
|
|
zip -r ..\%%~ni.zip .
|
|
popd
|
|
move %%~ni.zip %%~ni.nupkg
|
|
)
|
|
)
|
|
popd
|
|
copy $(Build.BinariesDirectory)\nuget-artifact-dml\Microsoft.ML.OnnxRuntime.DirectML*nupkg $(Build.ArtifactStagingDirectory)
|
|
displayName: 'Bundle DML NuGet and other binaries'
|
|
|
|
- template: ../../templates/esrp_nuget.yml
|
|
parameters:
|
|
DisplayName: 'ESRP - sign NuGet package'
|
|
FolderPath: '$(Build.ArtifactStagingDirectory)'
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
|
|
- template: ../../templates/validate-nuget.yml
|
|
parameters:
|
|
NugetPath: '$(Build.ArtifactStagingDirectory)'
|
|
NugetPackage: 'Microsoft.ML.OnnxRuntime.Gpu*nupkg'
|
|
PlatformsSupported: 'win-x64,linux-x64'
|
|
VerifyNugetSigning: ${{ parameters.DoEsrp }}
|
|
|
|
- template: ../../templates/validate-nuget.yml
|
|
parameters:
|
|
NugetPath: '$(Build.ArtifactStagingDirectory)'
|
|
NugetPackage: 'Microsoft.ML.OnnxRuntime.DirectML*nupkg'
|
|
PlatformsSupported: 'win-x64,win-x86'
|
|
VerifyNugetSigning: ${{ parameters.DoEsrp }}
|
|
|
|
- task: PublishPipelineArtifact@0
|
|
displayName: 'Publish Pipeline NuGet Artifact'
|
|
inputs:
|
|
artifactName: 'drop-signed-nuget'
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
- template: test_win.yml
|
|
parameters:
|
|
AgentPool : 'Win-GPU-2019'
|
|
Skipx86Tests: 'true'
|
|
|
|
- template: test_linux.yml
|
|
parameters:
|
|
AgentPool : 'Linux-GPU-CUDA10'
|
|
TestGPU : 'true'
|
|
|
|
- job: Publish_NuGet_Package_And_Report
|
|
workspace:
|
|
clean: all
|
|
pool: 'Win-CPU-2019'
|
|
variables:
|
|
- name: GDN_CODESIGN_TARGETDIRECTORY
|
|
value: '$(Build.BinariesDirectory)/nuget-artifact/final-package'
|
|
condition: and (succeeded(), and (${{ parameters.DoEsrp }}, eq(variables['Build.SourceBranch'], 'refs/heads/master')))
|
|
dependsOn:
|
|
- NuGet_Test_Win
|
|
- NuGet_Test_Linux
|
|
steps:
|
|
- template: ../../templates/set-version-number-variables-step.yml
|
|
|
|
- task: DownloadPipelineArtifact@0
|
|
displayName: 'Download Pipeline Artifact - Signed NuGet Package'
|
|
inputs:
|
|
artifactName: 'drop-signed-nuget'
|
|
targetPath: $(Build.BinariesDirectory)/nuget-artifact/final-package
|
|
|
|
- template: get-nuget-package-version-as-variable.yml
|
|
parameters:
|
|
packageFolder: '$(Build.BinariesDirectory)/nuget-artifact/final-package'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'Copy Signed Native NuGet Package to Internal NuGet Feed'
|
|
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
|
|
inputs:
|
|
command: 'push'
|
|
searchPatternPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.Gpu.$(NuGetPackageVersionNumber).nupkg'
|
|
feedPublish: 'OnnxRuntime'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'Copy Signed Managed NuGet Package to Internal NuGet Feed'
|
|
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
|
|
inputs:
|
|
command: 'push'
|
|
searchPatternPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.Managed.$(NuGetPackageVersionNumber).nupkg'
|
|
feedPublish: 'OnnxRuntime'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'Copy Signed DirectML NuGet Package to Internal NuGet Feed'
|
|
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
|
|
inputs:
|
|
command: 'push'
|
|
searchPatternPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.DirectML.$(DirectMLNuGetPackageVersionNumber).nupkg'
|
|
feedPublish: 'OnnxRuntime'
|
|
|
|
- task: NuGetCommand@2
|
|
displayName: 'Copy Signed Native NuGet Package to ORT-NIGHTLY'
|
|
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
|
|
inputs:
|
|
command: 'push'
|
|
packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.Gpu.$(NuGetPackageVersionNumber).nupkg'
|
|
publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/7982ae20-ed19-4a35-a362-a96ac99897b7'
|
|
|
|
- task: NuGetCommand@2
|
|
displayName: 'Copy Signed Managed NuGet Package to ORT-NIGHTLY'
|
|
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
|
|
inputs:
|
|
command: 'push'
|
|
packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.Managed.$(NuGetPackageVersionNumber).nupkg'
|
|
publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/7982ae20-ed19-4a35-a362-a96ac99897b7'
|
|
|
|
- task: NuGetCommand@2
|
|
displayName: 'Copy Signed DirectML NuGet Package to ORT-NIGHTLY'
|
|
condition: ne(variables['IsReleaseBuild'], 'true') # release build has a different package naming scheme
|
|
inputs:
|
|
command: 'push'
|
|
packagesToPush: '$(Build.BinariesDirectory)/nuget-artifact/final-package/Microsoft.ML.OnnxRuntime.DirectML.$(DirectMLNuGetPackageVersionNumber).nupkg'
|
|
publishVstsFeed: '2692857e-05ef-43b4-ba9c-ccf1c22c437c/7982ae20-ed19-4a35-a362-a96ac99897b7'
|