|
|
|
|
@ -82,210 +82,226 @@ variables:
|
|
|
|
|
value: $(Agent.TempDirectory)\${{ variables.win_trt_folder_cuda11 }}
|
|
|
|
|
- name: win_cuda_home
|
|
|
|
|
value: $(Agent.TempDirectory)\v11.8
|
|
|
|
|
|
|
|
|
|
stages:
|
|
|
|
|
- template: stages/set_packaging_variables_stage.yml
|
|
|
|
|
extends:
|
|
|
|
|
# The pipeline extends the 1ES PT which will inject different SDL and compliance tasks.
|
|
|
|
|
# For non-production pipelines, use "Unofficial" as defined below.
|
|
|
|
|
# For productions pipelines, use "Official".
|
|
|
|
|
template: v1/1ES.Official.PipelineTemplate.yml@1esPipelines
|
|
|
|
|
parameters:
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
PreReleaseVersionSuffixString: ${{ parameters.PreReleaseVersionSuffixString }}
|
|
|
|
|
PreReleaseVersionSuffixNumber: ${{ parameters.PreReleaseVersionSuffixNumber }}
|
|
|
|
|
sdl:
|
|
|
|
|
sourceAnalysisPool:
|
|
|
|
|
name: onnxruntime-Win-CPU-2022
|
|
|
|
|
os: windows
|
|
|
|
|
|
|
|
|
|
- template: stages/download-java-tools-stage.yml
|
|
|
|
|
stages:
|
|
|
|
|
- template: stages/set_packaging_variables_stage.yml
|
|
|
|
|
parameters:
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
PreReleaseVersionSuffixString: ${{ parameters.PreReleaseVersionSuffixString }}
|
|
|
|
|
PreReleaseVersionSuffixNumber: ${{ parameters.PreReleaseVersionSuffixNumber }}
|
|
|
|
|
|
|
|
|
|
- template: templates/c-api-cpu.yml
|
|
|
|
|
parameters:
|
|
|
|
|
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
|
|
|
|
|
DoCompliance: ${{ parameters.DoCompliance }}
|
|
|
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
${{ if eq(parameters.NugetPackageSuffix, 'NONE') }}:
|
|
|
|
|
OrtNugetPackageId: 'Microsoft.ML.OnnxRuntime'
|
|
|
|
|
${{ else }}:
|
|
|
|
|
OrtNugetPackageId: 'Microsoft.ML.OnnxRuntime${{ parameters.NugetPackageSuffix }}'
|
|
|
|
|
AdditionalBuildFlags: ''
|
|
|
|
|
AdditionalWinBuildFlags: '--enable_onnx_tests --enable_wcos ${{parameters.AdditionalBuildFlag}}'
|
|
|
|
|
BuildVariant: 'default'
|
|
|
|
|
SpecificArtifact: ${{ parameters.SpecificArtifact }}
|
|
|
|
|
BuildId: ${{ parameters.BuildId }}
|
|
|
|
|
QnnSDKVersion: ${{ parameters.QnnSdk }}
|
|
|
|
|
- template: stages/download-java-tools-stage.yml
|
|
|
|
|
|
|
|
|
|
- template: stages/java-cuda-packaging-stage.yml
|
|
|
|
|
parameters:
|
|
|
|
|
CudaVersion: 11.8
|
|
|
|
|
SpecificArtifact: ${{ parameters.SpecificArtifact }}
|
|
|
|
|
BuildId: ${{ parameters.BuildId }}
|
|
|
|
|
|
|
|
|
|
- template: stages/nuget-combine-cuda-stage.yml
|
|
|
|
|
parameters:
|
|
|
|
|
DoCompliance: ${{ parameters.DoCompliance }}
|
|
|
|
|
CudaVersion: 11.8
|
|
|
|
|
- template: templates/c-api-cpu.yml
|
|
|
|
|
parameters:
|
|
|
|
|
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
|
|
|
|
|
UseIncreasedTimeoutForTests: ${{ parameters.UseIncreasedTimeoutForTests }}
|
|
|
|
|
win_trt_home: ${{ variables.win_trt_home }}
|
|
|
|
|
win_cuda_home: ${{ variables.win_cuda_home }}
|
|
|
|
|
DoCompliance: ${{ parameters.DoCompliance }}
|
|
|
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
buildJava: true
|
|
|
|
|
buildNodejs: true
|
|
|
|
|
${{ if eq(parameters.NugetPackageSuffix, 'NONE') }}:
|
|
|
|
|
OrtNugetPackageId: 'Microsoft.ML.OnnxRuntime'
|
|
|
|
|
${{ else }}:
|
|
|
|
|
OrtNugetPackageId: 'Microsoft.ML.OnnxRuntime${{ parameters.NugetPackageSuffix }}'
|
|
|
|
|
AdditionalBuildFlags: ''
|
|
|
|
|
AdditionalWinBuildFlags: '--enable_onnx_tests --enable_wcos ${{parameters.AdditionalBuildFlag}}'
|
|
|
|
|
BuildVariant: 'default'
|
|
|
|
|
SpecificArtifact: ${{ parameters.SpecificArtifact }}
|
|
|
|
|
BuildId: ${{ parameters.BuildId }}
|
|
|
|
|
QnnSDKVersion: ${{ parameters.QnnSdk }}
|
|
|
|
|
|
|
|
|
|
- template: stages/java-cuda-packaging-stage.yml
|
|
|
|
|
parameters:
|
|
|
|
|
CudaVersion: 11.8
|
|
|
|
|
SpecificArtifact: ${{ parameters.SpecificArtifact }}
|
|
|
|
|
BuildId: ${{ parameters.BuildId }}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- template: nuget/templates/dml-vs-2022.yml
|
|
|
|
|
parameters:
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
ArtifactName: 'drop-nuget-dml'
|
|
|
|
|
StageName: '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 --build_nodejs --cmake_generator "Visual Studio 17 2022" --use_vcpkg
|
|
|
|
|
BuildArch: 'x64'
|
|
|
|
|
msbuildArchitecture: 'amd64'
|
|
|
|
|
EnvSetupScript: 'setup_env.bat'
|
|
|
|
|
sln_platform: 'x64'
|
|
|
|
|
DoDebugBuild: 'false'
|
|
|
|
|
DoNugetPack: 'true'
|
|
|
|
|
DoCompliance: 'false'
|
|
|
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
|
|
|
NuPackScript: |
|
|
|
|
|
msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} /p:CurrentData=$(BuildDate) /p:CurrentTime=$(BuildTime)
|
|
|
|
|
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: nuget/templates/dml-vs-2022.yml
|
|
|
|
|
parameters:
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
ArtifactName: 'drop-win-dml-x86-zip'
|
|
|
|
|
StageName: 'Windows_CI_GPU_DML_Dev_x86'
|
|
|
|
|
BuildCommand: --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --cmake_generator "Visual Studio 17 2022" --use_vcpkg
|
|
|
|
|
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 /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
- template: nuget/templates/dml-vs-2022.yml
|
|
|
|
|
parameters:
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
ArtifactName: 'drop-win-dml-arm64-zip'
|
|
|
|
|
StageName: 'Windows_CI_GPU_DML_Dev_arm64'
|
|
|
|
|
BuildCommand: --build_dir $(Build.BinariesDirectory) --arm64 --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --build_nodejs --cmake_generator "Visual Studio 17 2022" --use_vcpkg
|
|
|
|
|
BuildArch: 'x64'
|
|
|
|
|
EnvSetupScript: 'setup_env.bat'
|
|
|
|
|
sln_platform: 'arm64'
|
|
|
|
|
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=arm64 /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
|
|
|
|
cd $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\
|
|
|
|
|
ren Microsoft.ML.OnnxRuntime.DirectML.* win-dml-arm64.zip
|
|
|
|
|
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\win-dml-arm64.zip $(Build.ArtifactStagingDirectory)
|
|
|
|
|
mkdir $(Build.ArtifactStagingDirectory)\testdata
|
|
|
|
|
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\custom_op_library.* $(Build.ArtifactStagingDirectory)\testdata
|
|
|
|
|
|
|
|
|
|
- stage: NuGet_Packaging_DML
|
|
|
|
|
dependsOn:
|
|
|
|
|
- Windows_CI_GPU_DML_Dev
|
|
|
|
|
- Windows_CI_GPU_DML_Dev_x86
|
|
|
|
|
- Windows_CI_GPU_DML_Dev_arm64
|
|
|
|
|
condition: succeeded()
|
|
|
|
|
jobs:
|
|
|
|
|
- job: NuGet_Packaging_DML
|
|
|
|
|
workspace:
|
|
|
|
|
clean: all
|
|
|
|
|
pool: 'onnxruntime-Win2022-GPU-dml-A10'
|
|
|
|
|
steps:
|
|
|
|
|
- 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 - NuGet DirectML arm64'
|
|
|
|
|
inputs:
|
|
|
|
|
artifactName: 'drop-win-dml-arm64-zip'
|
|
|
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact-dml'
|
|
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
|
|
unzip win-dml-arm64.zip -d win-arm64
|
|
|
|
|
mkdir %%~ni\runtimes\win-arm64
|
|
|
|
|
mkdir %%~ni\runtimes\win-arm64\native
|
|
|
|
|
|
|
|
|
|
move win-arm64\runtimes\win-arm64\native\onnxruntime.dll %%~ni\runtimes\win-arm64\native\onnxruntime.dll
|
|
|
|
|
move win-arm64\runtimes\win-arm64\native\onnxruntime.lib %%~ni\runtimes\win-arm64\native\onnxruntime.lib
|
|
|
|
|
move win-arm64\runtimes\win-arm64\native\onnxruntime.pdb %%~ni\runtimes\win-arm64\native\onnxruntime.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)'
|
|
|
|
|
- template: stages/nuget-combine-cuda-stage.yml
|
|
|
|
|
parameters:
|
|
|
|
|
DoCompliance: ${{ parameters.DoCompliance }}
|
|
|
|
|
CudaVersion: 11.8
|
|
|
|
|
RunOnnxRuntimeTests: ${{ parameters.RunOnnxRuntimeTests }}
|
|
|
|
|
UseIncreasedTimeoutForTests: ${{ parameters.UseIncreasedTimeoutForTests }}
|
|
|
|
|
win_trt_home: ${{ variables.win_trt_home }}
|
|
|
|
|
win_cuda_home: ${{ variables.win_cuda_home }}
|
|
|
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
buildJava: true
|
|
|
|
|
buildNodejs: true
|
|
|
|
|
SpecificArtifact: ${{ parameters.SpecificArtifact }}
|
|
|
|
|
BuildId: ${{ parameters.BuildId }}
|
|
|
|
|
|
|
|
|
|
- template: templates/validate-package.yml
|
|
|
|
|
parameters:
|
|
|
|
|
PackageType: 'nuget'
|
|
|
|
|
PackagePath: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
|
PackageName: 'Microsoft.ML.OnnxRuntime.DirectML*nupkg'
|
|
|
|
|
PlatformsSupported: 'win-x64,win-x86,win-arm64'
|
|
|
|
|
VerifyNugetSigning: ${{ parameters.DoEsrp }}
|
|
|
|
|
- template: nuget/templates/dml-vs-2022.yml
|
|
|
|
|
parameters:
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
ArtifactName: 'drop-nuget-dml'
|
|
|
|
|
StageName: '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 --build_nodejs --cmake_generator "Visual Studio 17 2022" --use_vcpkg
|
|
|
|
|
BuildArch: 'x64'
|
|
|
|
|
msbuildArchitecture: 'amd64'
|
|
|
|
|
EnvSetupScript: 'setup_env.bat'
|
|
|
|
|
sln_platform: 'x64'
|
|
|
|
|
DoDebugBuild: 'false'
|
|
|
|
|
DoNugetPack: 'true'
|
|
|
|
|
DoCompliance: 'false'
|
|
|
|
|
DoEsrp: ${{ parameters.DoEsrp }}
|
|
|
|
|
NuPackScript: |
|
|
|
|
|
msbuild $(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj /p:Configuration=RelWithDebInfo /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} /p:CurrentData=$(BuildDate) /p:CurrentTime=$(BuildTime)
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
- task: PublishPipelineArtifact@0
|
|
|
|
|
displayName: 'Publish Pipeline NuGet Artifact'
|
|
|
|
|
inputs:
|
|
|
|
|
artifactName: 'drop-signed-nuget-dml'
|
|
|
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
|
- template: templates/component-governance-component-detection-steps.yml
|
|
|
|
|
parameters:
|
|
|
|
|
condition: 'succeeded'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- template: nuget/templates/dml-vs-2022.yml
|
|
|
|
|
parameters:
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
ArtifactName: 'drop-win-dml-x86-zip'
|
|
|
|
|
StageName: 'Windows_CI_GPU_DML_Dev_x86'
|
|
|
|
|
BuildCommand: --build_dir $(Build.BinariesDirectory) --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --cmake_generator "Visual Studio 17 2022" --use_vcpkg
|
|
|
|
|
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 /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- template: nuget/templates/dml-vs-2022.yml
|
|
|
|
|
parameters:
|
|
|
|
|
IsReleaseBuild: ${{ parameters.IsReleaseBuild }}
|
|
|
|
|
ArtifactName: 'drop-win-dml-arm64-zip'
|
|
|
|
|
StageName: 'Windows_CI_GPU_DML_Dev_arm64'
|
|
|
|
|
BuildCommand: --build_dir $(Build.BinariesDirectory) --arm64 --skip_submodule_sync --build_shared_lib --enable_onnx_tests --enable_wcos --use_telemetry --use_dml --build_nodejs --cmake_generator "Visual Studio 17 2022" --use_vcpkg
|
|
|
|
|
BuildArch: 'x64'
|
|
|
|
|
EnvSetupScript: 'setup_env.bat'
|
|
|
|
|
sln_platform: 'arm64'
|
|
|
|
|
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=arm64 /t:CreatePackage /p:OrtPackageId=Microsoft.ML.OnnxRuntime.DirectML /p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
|
|
|
|
cd $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\
|
|
|
|
|
ren Microsoft.ML.OnnxRuntime.DirectML.* win-dml-arm64.zip
|
|
|
|
|
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\win-dml-arm64.zip $(Build.ArtifactStagingDirectory)
|
|
|
|
|
mkdir $(Build.ArtifactStagingDirectory)\testdata
|
|
|
|
|
copy $(Build.BinariesDirectory)\RelWithDebInfo\RelWithDebInfo\custom_op_library.* $(Build.ArtifactStagingDirectory)\testdata
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- stage: NuGet_Packaging_DML
|
|
|
|
|
dependsOn:
|
|
|
|
|
- Windows_CI_GPU_DML_Dev
|
|
|
|
|
- Windows_CI_GPU_DML_Dev_x86
|
|
|
|
|
- Windows_CI_GPU_DML_Dev_arm64
|
|
|
|
|
condition: succeeded()
|
|
|
|
|
jobs:
|
|
|
|
|
- job: NuGet_Packaging_DML
|
|
|
|
|
workspace:
|
|
|
|
|
clean: all
|
|
|
|
|
pool: 'onnxruntime-Win2022-GPU-dml-A10'
|
|
|
|
|
steps:
|
|
|
|
|
- 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 - NuGet DirectML arm64'
|
|
|
|
|
inputs:
|
|
|
|
|
artifactName: 'drop-win-dml-arm64-zip'
|
|
|
|
|
targetPath: '$(Build.BinariesDirectory)/nuget-artifact-dml'
|
|
|
|
|
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
|
|
unzip win-dml-arm64.zip -d win-arm64
|
|
|
|
|
mkdir %%~ni\runtimes\win-arm64
|
|
|
|
|
mkdir %%~ni\runtimes\win-arm64\native
|
|
|
|
|
|
|
|
|
|
move win-arm64\runtimes\win-arm64\native\onnxruntime.dll %%~ni\runtimes\win-arm64\native\onnxruntime.dll
|
|
|
|
|
move win-arm64\runtimes\win-arm64\native\onnxruntime.lib %%~ni\runtimes\win-arm64\native\onnxruntime.lib
|
|
|
|
|
move win-arm64\runtimes\win-arm64\native\onnxruntime.pdb %%~ni\runtimes\win-arm64\native\onnxruntime.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-package.yml
|
|
|
|
|
parameters:
|
|
|
|
|
PackageType: 'nuget'
|
|
|
|
|
PackagePath: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
|
PackageName: 'Microsoft.ML.OnnxRuntime.DirectML*nupkg'
|
|
|
|
|
PlatformsSupported: 'win-x64,win-x86,win-arm64'
|
|
|
|
|
VerifyNugetSigning: ${{ parameters.DoEsrp }}
|
|
|
|
|
|
|
|
|
|
- task: 1ES.PublishPipelineArtifact@0
|
|
|
|
|
displayName: 'Publish Pipeline NuGet Artifact'
|
|
|
|
|
inputs:
|
|
|
|
|
artifactName: 'drop-signed-nuget-dml'
|
|
|
|
|
targetPath: '$(Build.ArtifactStagingDirectory)'
|
|
|
|
|
- template: templates/component-governance-component-detection-steps.yml
|
|
|
|
|
parameters:
|
|
|
|
|
condition: 'succeeded'
|
|
|
|
|
|