Skip to content

Commit

Permalink
rename 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mszhanyi committed Dec 19, 2023
1 parent 4ef8654 commit 8e31c6c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down
16 changes: 8 additions & 8 deletions tools/nuget/generate_nuspec_for_native_nuget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion tools/nuget/validate_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def validate_nuget(args):
full_nuget_path = os.path.join(args.package_path, nuget_file_name)

if "Gpu" in nuget_file_name:
is_gpu_package = bool("Gpu.Sub" not in nuget_file_name)
is_gpu_package = bool("Sub.Gpu" not in nuget_file_name)
is_gpu_dependent_package = not is_gpu_package
else:
is_gpu_package = False
Expand Down

0 comments on commit 8e31c6c

Please sign in to comment.