onnxruntime
13d58326 - [Build] Fix DML Nuget Pipeline for Release (#27349)

Commit
66 days ago
[Build] Fix DML Nuget Pipeline for Release (#27349) ## Description This pull request addresses the issue where the DirectML NuGet pipeline has error like "##[error]A duplicate file name exists, or the file" in Windows_CI_GPU_DML_Dev_arm64 step. ### Core Changes 1. **Automation Script**: Introduced bundle_dml_package.ps1 to orchestrate the merging process: - Extracts the base x64 `.nupkg`. - Merges ARM64 binaries from a supplemental build artifact into the `runtimes/win-arm64/native` directory. - Repackages the resulting structure into a unified `.nupkg`. 2. **Pipeline Integration**: Updated dml-nuget-packaging.yml to include a final `NuGet_Packaging_DML` stage. This stage is dependent on both the x64 and ARM64 build stages. 3. **Extended Selection logic**: Updated select_dml_package.ps1 to allow renaming artifacts (specifically for creating the supplemental ARM64 zip) and more robust package selection for development and release builds. 4. **Validation Enhancements**: Included updates to `validate_package.py` and `validate-package.yml` to support multi-platform verification in future pipeline runs. --- ## Verification Results The bundling logic was verified through the pipeline logs in the `NuGet_Packaging_DML` stage. ### Execution Logs - **Successful Extraction**: The script correctly extracted the `win-dml-arm64.zip` and the base `Microsoft.ML.OnnxRuntime.DirectML.1.24.1.nupkg`. - **Injection Proof**: - Created the `runtimes/win-arm64/native` directory inside the package extraction folder. - Copied `onnxruntime.dll`, `onnxruntime.lib`, and `onnxruntime_providers_shared.dll` into the ARM64 runtime path. - **Unified Package Creation**: 7-Zip successfully created the new archive containing **34 files** (up from 31 in the original x64-only package). - **Size Increase**: The package size increased from **~6.6 MB** to **~12.4 MB**, reflecting the inclusion of binaries for both architectures. > [!IMPORTANT] > **Artifact Note**: When verifying the CI output, the unified multi-arch package is located in the **`packages`** artifact produced by the `NuGet_Packaging_DML` stage. Intermediate artifacts like `drop-nuget-dml` still contain the single-architecture (x64) version.
Author
Parents
Loading