Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename 2
Browse files Browse the repository at this point in the history
mszhanyi committed Dec 19, 2023
1 parent 4ef8654 commit 2c81e84
Showing 2 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -823,12 +823,12 @@ stages:
CurrentTime: $(CurrentTime)

- task: MSBuild@1
displayName: 'Build Nuget Packages Microsoft.ML.OnnxRuntime.Gpu.Sub.Windows'
displayName: 'Build Nuget Packages Microsoft.ML.OnnxRuntime.Sub.Gpu.Windows'
inputs:
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj'
configuration: RelWithDebInfo
platform: 'Any CPU'
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Gpu.Sub.Windows -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Sub.Gpu.Windows -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
workingDirectory: '$(Build.SourcesDirectory)\csharp'
env:
# check out csharp/OnnxRuntime.CSharp.proj for the usage of these variables
@@ -837,12 +837,12 @@ stages:
IsPlatformSpecificSubPackage: 'True'

- task: MSBuild@1
displayName: 'Build Nuget Packages Microsoft.ML.OnnxRuntime.Gpu.Sub.Linux'
displayName: 'Build Nuget Packages Microsoft.ML.OnnxRuntime.Sub.Gpu.Linux'
inputs:
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj'
configuration: RelWithDebInfo
platform: 'Any CPU'
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Gpu.Sub.Linux -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Sub.Gpu.Linux -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
workingDirectory: '$(Build.SourcesDirectory)\csharp'
env:
# check out csharp/OnnxRuntime.CSharp.proj for the usage of these variables
@@ -895,15 +895,15 @@ stages:
parameters:
PackageType: 'nuget'
PackagePath: '$(Build.ArtifactStagingDirectory)'
PackageName: 'Microsoft.ML.OnnxRuntime.Gpu.Sub.Windows.*nupkg'
PackageName: 'Microsoft.ML.OnnxRuntime.Sub.Gpu.Windows.*nupkg'
PlatformsSupported: 'win-x64'
VerifyNugetSigning: false

- template: templates/validate-package.yml
parameters:
PackageType: 'nuget'
PackagePath: '$(Build.ArtifactStagingDirectory)'
PackageName: 'Microsoft.ML.OnnxRuntime.Gpu.Sub.Linux.*nupkg'
PackageName: 'Microsoft.ML.OnnxRuntime.Sub.Gpu.Linux.*nupkg'
PlatformsSupported: 'linux-x64'
VerifyNugetSigning: false

16 changes: 8 additions & 8 deletions tools/nuget/generate_nuspec_for_native_nuget.py
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@ def get_package_name(os, cpu_arch, ep, is_training_package):
# Currently we take onnxruntime_providers_cuda from CUDA build
# And onnxruntime, onnxruntime_providers_shared and
# onnxruntime_providers_tensorrt from tensorrt build
# cuda binaries are split out into the platform dependent packages Microsoft.ML.OnnxRuntime.Gpu.Sub.{Linux|Windows}
# cuda binaries are split out into the platform dependent packages Microsoft.ML.OnnxRuntime.Sub.Gpu{Linux|Windows}
# and not included in the base Microsoft.ML.OnnxRuntime.Gpu package
def is_this_file_needed(ep, filename, package_name):
if package_name == "Microsoft.ML.OnnxRuntime.Gpu":
@@ -64,7 +64,7 @@ def generate_file_list_for_ep(nuget_artifacts_dir, ep, files_list, include_pdbs,
if (
child_file.suffix in suffixes
and is_this_file_needed(ep, child_file.name, package_name)
and package_name != "Microsoft.ML.OnnxRuntime.Gpu.Sub.Linux"
and package_name != "Microsoft.ML.OnnxRuntime.Sub.Gpu.Linux"
):
files_list.append(
'<file src="' + str(child_file) + '" target="runtimes/win-%s/native"/>' % cpu_arch
@@ -94,7 +94,7 @@ def generate_file_list_for_ep(nuget_artifacts_dir, ep, files_list, include_pdbs,
if (
child_file.suffix == ".so"
and is_this_file_needed(ep, child_file.name, package_name)
and package_name != "Microsoft.ML.OnnxRuntime.Gpu.Sub.Windows"
and package_name != "Microsoft.ML.OnnxRuntime.Sub.Gpu.Windows"
):
files_list.append(
'<file src="' + str(child_file) + '" target="runtimes/linux-%s/native"/>' % cpu_arch
@@ -207,13 +207,13 @@ def generate_repo_url(line_list, repo_url, commit_id):

def add_common_dependencies(xml_text, package_name, version):
dependent_packages = bool(
package_name == "Microsoft.ML.OnnxRuntime.Gpu.Sub.Windows" or package_name == "Microsoft.ML.OnnxRuntime.Gpu.Sub.Linux"
package_name == "Microsoft.ML.OnnxRuntime.Sub.Gpu.Windows" or package_name == "Microsoft.ML.OnnxRuntime.Sub.Gpu.Linux"
)
if not dependent_packages:
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Managed"' + ' version="' + version + '"/>')
if package_name == "Microsoft.ML.OnnxRuntime.Gpu":
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Gpu.Sub.Windows"' + ' version="' + version + '"/>')
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Gpu.Sub.Linux"' + ' version="' + version + '"/>')
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Sub.Gpu.Windows"' + ' version="' + version + '"/>')
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Sub.Gpu.Linux"' + ' version="' + version + '"/>')


def generate_dependencies(xml_text, package_name, version):
@@ -348,8 +348,8 @@ def generate_files(line_list, args):
]
is_mklml_package = args.package_name == "Microsoft.ML.OnnxRuntime.MKLML"
is_cuda_gpu_package = args.package_name == "Microsoft.ML.OnnxRuntime.Gpu"
is_cuda_gpu_win_sub_package = args.package_name == "Microsoft.ML.OnnxRuntime.Gpu.Sub.Windows"
is_cuda_gpu_linux_sub_package = args.package_name == "Microsoft.ML.OnnxRuntime.Gpu.Sub.Linux"
is_cuda_gpu_win_sub_package = args.package_name == "Microsoft.ML.OnnxRuntime.Sub.Gpu.Windows"
is_cuda_gpu_linux_sub_package = args.package_name == "Microsoft.ML.OnnxRuntime.Sub.Gpu.Linux"
is_rocm_gpu_package = args.package_name == "Microsoft.ML.OnnxRuntime.ROCm"
is_dml_package = args.package_name == "Microsoft.ML.OnnxRuntime.DirectML"
is_windowsai_package = args.package_name == "Microsoft.AI.MachineLearning"

0 comments on commit 2c81e84

Please sign in to comment.