diff --git a/tools/nuget/generate_nuspec_for_native_nuget.py b/tools/nuget/generate_nuspec_for_native_nuget.py index 675605be7ec22..212d6a0313f7d 100644 --- a/tools/nuget/generate_nuspec_for_native_nuget.py +++ b/tools/nuget/generate_nuspec_for_native_nuget.py @@ -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 + "") diff --git a/tools/nuget/validate_package.py b/tools/nuget/validate_package.py index 3107728ab0630..50ad2deaecff7 100644 --- a/tools/nuget/validate_package.py +++ b/tools/nuget/validate_package.py @@ -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