Skip to content

ORT 1.24.2 release cherry pick round 3#27378

Merged
tianleiwu merged 4 commits intorel-1.24.2from
tlwu/rel-1.24.2_cherry_pick_round_3
Feb 18, 2026
Merged

ORT 1.24.2 release cherry pick round 3#27378
tianleiwu merged 4 commits intorel-1.24.2from
tlwu/rel-1.24.2_cherry_pick_round_3

Conversation

@tianleiwu
Copy link
Copy Markdown
Contributor

This cherry-picks the following commits for the release:

tianleiwu and others added 4 commits February 18, 2026 10:07
Fix python packaging pipeline for 1.24.2 release.

Previous attempt (#27339)
to fix python packaging pipeline failed since powershell 5.1 does not
support `-AsPlainText`.

It has been verified that python packaging pipeline is good after this
fix.
## 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.
### Description
As title. Without including these DNNL files, it results in a link error
because it is unable to locate the definition for `DnnlHasBF16Support()`
defined in the file



### Motivation and Context
Fix build error
…27374)

## Summary
This PR enables ONNX Runtime to correctly load models with external data
when they are stored in symlinked directory structures. This is a common
scenario for models cached by the Hugging Face Hub, where both the model
file and data files are symlinks pointing into a flat `blobs/`
directory.

## The Problem
Previously, ONNX Runtime's external data path validation would only
check if the resolved data path was under the logical directory of the
model. In symlinked structures (like Hugging Face's `snapshots/` and
`blobs/` layout), the resolved data path often sits in a different
physical directory than the logical model path, leading to a "path
escapes model directory" error even when the data is safely associated
with the model.

## The Fix
I have updated `ValidateExternalDataPath` to implement a dual-check
mechanism:
1. **Logical Check:** Verify if the resolved data path is under the
provided `base_dir` (the directory where the model was loaded from).
2. **Physical Check:** If the logical check fails, verify if the
resolved data path is under the parent directory of the
**real/canonical** model path.

This approach ensures that models can load external data from both their
logical siblings and their physical siblings while maintaining security
constraints.

## Changes
- **Core Logic:**
- `onnxruntime/core/framework/tensorprotoutils.cc/h`: Updated
`ValidateExternalDataPath` to accept `model_path` and perform the
dual-check.
- `onnxruntime/core/graph/graph.cc`: Updated call site in
`ConvertInitializersIntoOrtValues` to pass the `model_path`.
- **Cleanup:**
- Removed unused `ValidateExternalDataPath` from `provider_api.h`,
`provider_interfaces.h`, and `provider_bridge_ort.cc`. These were
redundant as path validation is handled by core during session
initialization. Provider has no need to validate it.
- **Testing:**
- Added
`onnxruntime/test/python/onnxruntime_test_python_symlink_data.py` to
simulate the Hugging Face Hub symlink structure and verify the fix.
@tianleiwu tianleiwu enabled auto-merge (squash) February 18, 2026 19:24
@tianleiwu tianleiwu merged commit 6fc7ee3 into rel-1.24.2 Feb 18, 2026
93 of 101 checks passed
@tianleiwu tianleiwu deleted the tlwu/rel-1.24.2_cherry_pick_round_3 branch February 18, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants