Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mszhanyi committed Dec 20, 2023
1 parent 9204bae commit a4d2886
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 12 additions & 1 deletion tools/nuget/generate_nuspec_for_native_nuget.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,18 @@ def generate_description(line_list, package_name):
description = (
"This package contains native shared library artifacts for all supported platforms of ONNX Runtime."
)

elif "Microsoft.ML.OnnxRuntime.Gpu.Linux" in package_name:
description = (
"This package contains Linux native shared library artifacts for ONNX Runtime with CUDA."
)
elif "Microsoft.ML.OnnxRuntime.Gpu.Windows" in package_name:
description = (
"This package contains Windows native shared library artifacts for ONNX Runtime with CUDA."
)
elif "Microsoft.ML.OnnxRuntime.Gpu.1" in package_name: # This is a Microsoft.ML.OnnxRuntime.GPU.* package, 1 is begin of version, that is used to filter Gpu.Windows/Gpu.linux
description = (
"This package contains native shared library artifacts for all supported platforms of ONNX Runtime."
)
line_list.append("<description>" + description + "</description>")


Expand Down
4 changes: 2 additions & 2 deletions tools/nuget/validate_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ def validate_nuget(args):
nuget_file_name = nuget_packages_found_in_path[0]
full_nuget_path = os.path.join(args.package_path, nuget_file_name)

is_gpu_package = bool(args.package_name.lower().contains("microsoft.ml.onnxruntime.gpu.1"))
is_gpu_dependent_package = bool(args.package_name.lower().contains("microsoft.ml.onnxruntime.gpu.windows") or args.package_name.lower().contains("microsoft.ml.onnnxruntime.linux"))
is_gpu_package = bool("microsoft.ml.onnxruntime.gpu.1" in args.package_name.lower())
is_gpu_dependent_package = bool("microsoft.ml.onnxruntime.gpu.windows" in args.package_name.lower() or "microsoft.ml.onnnxruntime.linux" in args.package_name.lower())

if "directml" in nuget_file_name.lower():
is_dml_package = True
Expand Down

0 comments on commit a4d2886

Please sign in to comment.