Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
5981814
Update version number to 1.24.3
tianleiwu Feb 26, 2026
9e0e9c3
[MLAS] Adding DynamicQGemm function pointers and ukernel interface (#…
patryk-kaiser-ARM Feb 21, 2026
c0373ad
[js/web] Use embedded WASM module in Blob URL workers when wasmBinary…
0-don Feb 21, 2026
6521e5e
Fix refcount bug in map input conversion that caused shutdown segfaul…
tianleiwu Feb 23, 2026
9f7316d
Fix error where bytes is not assigned for dynamic qgemm pack b size (…
JonathanC-ARM Feb 23, 2026
933077e
Fix DllImportResolver (#27397)
tianleiwu Feb 24, 2026
101edf8
MatmulNBits prepacking scales fix (#27412)
hariharans29 Feb 24, 2026
ca18b54
Fix validation for external data paths for models loaded from bytes (…
adrianlizarraga Feb 24, 2026
2dffaab
Enable Python 3.14 CI and Upgrade Dependencies (#27401)
tianleiwu Feb 24, 2026
bb0fe86
fix: out of bounds access for resize operation (#27419)
lukas-folle-snkeos Feb 25, 2026
19f9f77
Fix GatherCopyData Integer Truncation Leading to Heap Out-of-Bounds R…
chilo-ms Feb 26, 2026
fbf081c
[web] fix usage of wasmBinary together with a blob URL for .mjs (#27411)
fs-eire Feb 26, 2026
2c039f3
[web] remove the unhelpful "Unknown CPU vendor" warning. (#27399)
fs-eire Feb 26, 2026
c039973
Fix GatherND division by zero when batch dimensions mismatch (#27090)
chaya2350 Feb 18, 2026
694bc39
Fix QMoE CPU Operator (#27360)
tianleiwu Feb 18, 2026
52bb395
QMoE CPU Performance Update (Up to 4x on 4-bit) (#27364)
tianleiwu Feb 21, 2026
948e629
Fix SkipLayerNorm fusion incorrectly applied when gamma/beta are not …
Copilot Feb 26, 2026
8f3b84f
Increase ios build timeout to 360 minutes
tianleiwu Feb 19, 2026
6a2cd62
Propagate parameters correctly
eserscor Feb 19, 2026
f11112c
Build Windows ARM64X binaries as part of packaging pipeline (#27316)
edgchen1 Feb 27, 2026
f408549
[Patch] allows new memory info name for WebGPU (#27475)
fs-eire Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/macos-ci-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inputs:
python_version:
required: false
type: string
default: "3.11"
default: "3.14"
node_version:
required: false
type: string
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/linux_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ jobs:
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-linux-x64-release-py314:
name: Build Linux x64 Release (Python 3.14)
uses: ./.github/workflows/reusable_linux_build.yml
with:
pool_name: "onnxruntime-github-Ubuntu2204-AMD-CPU"
build_config: Release
architecture: x64
dockerfile_path: tools/ci_build/github/linux/docker/Dockerfile.manylinux2_28_cpu
docker_image_repo: onnxruntimecpubuildpythonx64
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --build_nuget --enable_transformers_tool_test --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON'
python_path_prefix: 'PATH=/opt/python/cp314-cp314/bin:$PATH' # $ needs escaping in single quotes
job_identifier: build-linux-x64-release-py314
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

orttraining-linux-ci-pipeline:
name: Build Linux x64 Release with training
uses: ./.github/workflows/reusable_linux_build.yml
Expand Down Expand Up @@ -109,7 +124,7 @@ jobs:
dockerfile_path: tools/ci_build/github/linux/docker/inference/aarch64/python/cpu/Dockerfile
docker_image_repo: onnxruntimecpubuildpythonaarch64
extra_build_flags: '--use_binskim_compliant_compile_flags --build_wheel --cmake_extra_defines onnxruntime_BUILD_BENCHMARKS=ON'
python_path_prefix: 'PATH=/opt/python/cp310-cp310/bin:$PATH' # $ needs escaping in single quotes
python_path_prefix: 'PATH=/opt/python/cp314-cp314/bin:$PATH' # $ needs escaping in single quotes
job_identifier: build-linux-arm64-release
secrets:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 5 additions & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ concurrency:
cancel-in-progress: true

env:
python_version: 3.11
python_version: "3.14"

jobs:
cpu:
Expand All @@ -28,6 +28,7 @@ jobs:
{"machine": "arm64", "target": "arm64", "build_config": "Debug"},
{"machine": "arm64", "target": "arm64", "build_config": "Release"}
]
python_version: "3.14"

coreml:
uses: ./.github/workflows/macos-ci-build-and-test-workflow.yml
Expand All @@ -39,6 +40,7 @@ jobs:
{"machine": "arm64", "target": "arm64", "build_config": "Debug"},
{"machine": "arm64", "target": "arm64", "build_config": "Release"}
]
python_version: "3.14"

xnnpack:
uses: ./.github/workflows/macos-ci-build-and-test-workflow.yml
Expand All @@ -49,6 +51,7 @@ jobs:
[
{"machine": "arm64", "target": "arm64", "build_config": "Debug"}
]
python_version: "3.14"

webgpu:
uses: ./.github/workflows/macos-ci-build-and-test-workflow.yml
Expand All @@ -60,6 +63,7 @@ jobs:
{"machine": "arm64", "target": "arm64", "build_config": "Debug"},
{"machine": "arm64", "target": "arm64", "build_config": "Release"}
]
python_version: "3.14"

iphone_simulator:
runs-on: macos-15
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos-ci-build-and-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
python_version:
required: false
type: string
default: "3.11"
default: "3.14"
matrix_include:
required: false
type: string
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.14'
architecture: x64

- name: Locate vcvarsall and Setup Env
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:

- uses: actions/setup-python@v6
with:
python-version: '3.12'
python-version: '3.14'
architecture: x64

- uses: actions/setup-node@v6
Expand Down
2 changes: 1 addition & 1 deletion VERSION_NUMBER
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.24.2
1.24.3
2 changes: 1 addition & 1 deletion cmake/deps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protoc_linux_aarch64;https://github.com/protocolbuffers/protobuf/releases/downlo
protoc_mac_universal;https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-osx-universal_binary.zip;23710c3d1c2036d8d65a6a22234372fa2d7af9ef
psimd;https://github.com/Maratyszcza/psimd/archive/072586a71b55b7f8c584153d223e95687148a900.zip;1f5454b01f06f9656b77e4a5e2e31d7422487013
pthreadpool;https://github.com/google/pthreadpool/archive/dcc9f28589066af0dbd4555579281230abbf74dd.zip;533a77943203ef15ca608bcd9dbe2c94da7451d2
pybind11;https://github.com/pybind/pybind11/archive/refs/tags/v2.13.6.zip;f780292da9db273c8ef06ccf5fd4b623624143e9
pybind11;https://github.com/pybind/pybind11/archive/refs/tags/v3.0.2.zip;a064e663b4d7a337ac291d1bef7337ef4e60a1ae
pytorch_cpuinfo;https://github.com/pytorch/cpuinfo/archive/403d652dca4c1046e8145950b1c0997a9f748b57.zip;30b2a07fe4bae8574f89176e56274cacdd6d135b
re2;https://github.com/google/re2/archive/refs/tags/2024-07-02.zip;646e1728269cde7fcef990bf4a8e87b047882e88
safeint;https://github.com/dcleblanc/SafeInt/archive/refs/tags/3.0.28.zip;23f252040ff6cb9f1fd18575b32fa8fb5928daac
Expand Down
3 changes: 1 addition & 2 deletions cmake/external/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ onnxruntime_fetchcontent_declare(
URL ${DEP_URL_pybind11}
URL_HASH SHA1=${DEP_SHA1_pybind11}
EXCLUDE_FROM_ALL
FIND_PACKAGE_ARGS 2.13 NAMES pybind11
FIND_PACKAGE_ARGS 3.0 NAMES pybind11
)
onnxruntime_fetchcontent_makeavailable(pybind11_project)

3 changes: 2 additions & 1 deletion cmake/vcpkg-ports/pybind11/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO pybind/pybind11
REF "v${VERSION}"
SHA512 497c25b33b09a9c42f67131ab82e35d689e8ce089dd7639be997305ff9a6d502447b79c824508c455d559e61f0186335b54dd2771d903a7c1621833930622d1a
# SHA512 for the zip (not tar.gz) file.
SHA512 786b1bf534ac67a8d5669f8babf67bb13e48b3a3da1b6344e43ae10a84b80bbc8fea5f12a65fd18739c341fefef5622c5dc096db964dff33cc62ea4259b2e2c1
HEAD_REF master
)

Expand Down
2 changes: 1 addition & 1 deletion cmake/vcpkg-ports/pybind11/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pybind11",
"version": "2.13.6",
"version": "3.0.2",
"description": "pybind11 is a lightweight header-only library that exposes C++ types in Python and vice versa, mainly to create Python bindings of existing C++ code",
"homepage": "https://github.com/pybind/pybind11",
"license": "BSD-3-Clause",
Expand Down
156 changes: 86 additions & 70 deletions csharp/src/Microsoft.ML.OnnxRuntime/NativeMethods.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -892,99 +892,115 @@ internal class NativeLib
/// On Windows, it explicitly loads the library with a lowercase .dll extension to handle
/// case-sensitive filesystems.
/// </summary>
#if NET5_0_OR_GREATER
[System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessage("SingleFile", "IL3000:Avoid accessing Assembly file path when publishing as a single file", Justification = "We also check AppContext.BaseDirectory as a fallback")]
#endif
private static IntPtr DllImportResolver(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
{
if (libraryName == NativeLib.DllName || libraryName == OrtExtensionsNativeMethods.ExtensionsDllName)
try
{
string mappedName = null;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
// Explicitly load with .dll extension to avoid issues where the OS might try .DLL
mappedName = libraryName + ".dll";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
if (libraryName == NativeLib.DllName || libraryName == OrtExtensionsNativeMethods.ExtensionsDllName)
{
// Explicitly load with .so extension and lib prefix
mappedName = "lib" + libraryName + ".so";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
// Explicitly load with .dylib extension and lib prefix
mappedName = "lib" + libraryName + ".dylib";
}

if (mappedName != null)
{
// 1. Try default loading (name only)
if (NativeLibrary.TryLoad(mappedName, assembly, searchPath, out IntPtr handle))
string mappedName = null;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
return handle;
// Explicitly load with .dll extension to avoid issues where the OS might try .DLL
mappedName = libraryName + ".dll";
}

// 2. Try relative to assembly location (look into runtimes subfolders)
string assemblyLocation = null;
try { assemblyLocation = assembly.Location; } catch { }
if (!string.IsNullOrEmpty(assemblyLocation))
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
// Explicitly load with .so extension and lib prefix
mappedName = "lib" + libraryName + ".so";
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
string assemblyDir = System.IO.Path.GetDirectoryName(assemblyLocation);
string rid = RuntimeInformation.RuntimeIdentifier;
// Explicitly load with .dylib extension and lib prefix
mappedName = "lib" + libraryName + ".dylib";
}

// Probe the specific RID first, then common fallbacks for the current OS
string[] ridsToTry;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
ridsToTry = new[] { rid, "win-x64", "win-arm64" };
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
ridsToTry = new[] { rid, "linux-x64", "linux-arm64" };
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
// We no longer provide osx-x64 in official package since 1.24.
// However, we keep it in the list for build-from-source users.
ridsToTry = new[] { rid, "osx-arm64", "osx-x64" };
}
else
if (mappedName != null)
{
// 1. Try default loading (name only)
if (NativeLibrary.TryLoad(mappedName, assembly, searchPath, out IntPtr handle))
{
ridsToTry = new[] { rid };
return handle;
}

foreach (var tryRid in ridsToTry)
// 2. Try relative to assembly location (look into runtimes subfolders)
string assemblyLocation = null;
try { assemblyLocation = assembly.Location; } catch { }
if (!string.IsNullOrEmpty(assemblyLocation))
{
string probePath = System.IO.Path.Combine(assemblyDir, "runtimes", tryRid, "native", mappedName);
if (System.IO.File.Exists(probePath) && NativeLibrary.TryLoad(probePath, assembly, searchPath, out handle))
string assemblyDir = System.IO.Path.GetDirectoryName(assemblyLocation);
string rid = RuntimeInformation.RuntimeIdentifier;

// Probe the specific RID first, then common fallbacks for the current OS
string[] ridsToTry;
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
LogLibLoad($"[DllImportResolver] Loaded {mappedName} from: {probePath}");
return handle;
ridsToTry = new[] { rid, "win-x64", "win-arm64" };
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
ridsToTry = new[] { rid, "linux-x64", "linux-arm64" };
}
else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
// We no longer provide osx-x64 in official package since 1.24.
// However, we keep it in the list for build-from-source users.
ridsToTry = new[] { rid, "osx-arm64", "osx-x64" };
}
else
{
ridsToTry = new[] { rid };
}
}
}

// 3. Try AppContext.BaseDirectory as a fallback
string baseDir = AppContext.BaseDirectory;
if (!string.IsNullOrEmpty(baseDir))
{
string probePath = System.IO.Path.Combine(baseDir, mappedName);
if (NativeLibrary.TryLoad(probePath, assembly, searchPath, out handle))
{
LogLibLoad($"[DllImportResolver] Loaded {mappedName} from: {probePath}");
return handle;
foreach (var tryRid in ridsToTry)
{
string probePath = System.IO.Path.Combine(assemblyDir, "runtimes", tryRid, "native", mappedName);
if (System.IO.File.Exists(probePath) && NativeLibrary.TryLoad(probePath, assembly, searchPath, out handle))
{
LogLibLoad($"[DllImportResolver] Loaded {mappedName} from: {probePath}");
return handle;
}
}
}

string rid = RuntimeInformation.RuntimeIdentifier;
probePath = System.IO.Path.Combine(baseDir, "runtimes", rid, "native", mappedName);
if (NativeLibrary.TryLoad(probePath, assembly, searchPath, out handle))
// 3. Try AppContext.BaseDirectory as a fallback
try
{
LogLibLoad($"[DllImportResolver] Loaded {mappedName} from: {probePath}");
return handle;
string baseDir = AppContext.BaseDirectory;
if (!string.IsNullOrEmpty(baseDir))
{
string probePath = System.IO.Path.Combine(baseDir, mappedName);
if (NativeLibrary.TryLoad(probePath, assembly, searchPath, out handle))
{
LogLibLoad($"[DllImportResolver] Loaded {mappedName} from: {probePath}");
return handle;
}

string rid = RuntimeInformation.RuntimeIdentifier;
probePath = System.IO.Path.Combine(baseDir, "runtimes", rid, "native", mappedName);
if (NativeLibrary.TryLoad(probePath, assembly, searchPath, out handle))
{
LogLibLoad($"[DllImportResolver] Loaded {mappedName} from: {probePath}");
return handle;
}
}
}
}
catch { } // Ignore AppDomainUnloadedException or similar from AppContext.BaseDirectory

LogLibLoad($"[DllImportResolver] Failed loading {mappedName} (RID: {RuntimeInformation.RuntimeIdentifier}, Assembly: {assemblyLocation})");
LogLibLoad($"[DllImportResolver] Failed loading {mappedName} (RID: {RuntimeInformation.RuntimeIdentifier}, Assembly: {assemblyLocation})");

}
}
}
catch (Exception ex)
{
// Unhandled exceptions inside DllImportResolver can result in TypeInitializationException.
// Log and swallow the error, returning IntPtr.Zero to fall back to default CLR logic.
try { System.Diagnostics.Trace.WriteLine($"[DllImportResolver] Exception during resolution: {ex}"); } catch { }
}

// Fall back to default resolution
return IntPtr.Zero;
Expand Down
43 changes: 43 additions & 0 deletions csharp/test/Microsoft.ML.OnnxRuntime.Tests.Common/OrtEnvTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -489,4 +489,47 @@ void TestCopyTensors()
}
}
}

[Collection("Ort Inference Tests")]
public class OrtEnvDllImportResolverTest
{
[Fact(DisplayName = "TestDllImportResolverDoesNotThrow")]
public void TestDllImportResolverDoesNotThrow()
{
// The DllImportResolver is a private static method in NativeMethods.
var nativeMethodsType = typeof(OrtEnv).Assembly.GetType("Microsoft.ML.OnnxRuntime.NativeMethods");
Assert.NotNull(nativeMethodsType);

// It might not be defined on all platforms (defined when !NETSTANDARD2_0 && !__ANDROID__ && !__IOS__).
var resolverMethod = nativeMethodsType.GetMethod("DllImportResolver", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static);

if (resolverMethod != null)
{
try
{
// Invoke with null assembly to force it into edge cases where assembly.Location would throw NullReferenceException.
// It should catch the exception and return IntPtr.Zero gracefully rather than throwing.
var result = resolverMethod.Invoke(null, new object[] { "onnxruntime", null, null });

// If it reaches here without throwing TargetInvocationException, the try-catch in DllImportResolver works.
Assert.True(result is IntPtr);
}
catch (System.Reflection.TargetInvocationException ex)
{
// If NativeMethods..cctor() threw because the native library is missing,
// we will get a TypeInitializationException wrapping a DllNotFoundException (or DllImportException).
// This is acceptable locally. What we want to avoid is NullReferenceException from DllImportResolver.
if (ex.InnerException is TypeInitializationException typeInitEx)
{
Assert.IsNotType<NullReferenceException>(typeInitEx.InnerException);
}
else
{
Assert.IsNotType<NullReferenceException>(ex.InnerException);
throw;
}
}
}
}
}
}
5 changes: 5 additions & 0 deletions docs/python/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ For more information on ONNX Runtime, please see `aka.ms/onnxruntime <https://ak
Changes
-------

1.24.3
^^^^^^

Release Notes : https://github.com/Microsoft/onnxruntime/releases/tag/v1.24.3

1.24.2
^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion js/common/lib/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
// This file is generated by /js/scripts/update-version.ts
// Do not modify file content manually.

export const version = '1.24.2';
export const version = '1.24.3';
Loading
Loading