Skip to content

Commit a95ed23

Browse files
authored
Merge pull request #721 from intel/sync_msft_25_6_25
Backmerging with Msft commits
2 parents e141e2f + 7176c12 commit a95ed23

File tree

471 files changed

+18198
-4254
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

471 files changed

+18198
-4254
lines changed

.github/workflows/linux-wasm-ci-build-and-test-workflow.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ jobs:
9292
${{ env.common_build_args }} \
9393
--build_dir ${{ github.workspace }}/build/wasm_inferencing_webgpu \
9494
--use_webgpu \
95-
--use_jsep \
9695
--use_webnn \
9796
--target onnxruntime_webassembly \
9897
--skip_tests
@@ -113,8 +112,8 @@ jobs:
113112
if: ${{ inputs.skip_publish != true && inputs.build_webgpu == true }}
114113
run: |
115114
mkdir -p ${{ github.workspace }}/artifacts/wasm_webgpu/
116-
cp ${{ github.workspace }}/build/wasm_inferencing_webgpu/${{ inputs.build_config }}/ort-wasm-simd-threaded.jsep.wasm ${{ github.workspace }}/artifacts/wasm_webgpu/
117-
cp ${{ github.workspace }}/build/wasm_inferencing_webgpu/${{ inputs.build_config }}/ort-wasm-simd-threaded.jsep.mjs ${{ github.workspace }}/artifacts/wasm_webgpu/
115+
cp ${{ github.workspace }}/build/wasm_inferencing_webgpu/${{ inputs.build_config }}/ort-wasm-simd-threaded.asyncify.wasm ${{ github.workspace }}/artifacts/wasm_webgpu/
116+
cp ${{ github.workspace }}/build/wasm_inferencing_webgpu/${{ inputs.build_config }}/ort-wasm-simd-threaded.asyncify.mjs ${{ github.workspace }}/artifacts/wasm_webgpu/
118117
119118
- name: Upload WASM artifacts
120119
if: ${{ inputs.skip_publish != true }}

.github/workflows/windows-web-ci-workflow.yml

Lines changed: 18 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ on:
1616
package_name:
1717
type: string
1818
default: "NPM_packages"
19-
run_webgpu_tests:
20-
type: boolean
21-
default: true
2219

2320
jobs:
2421
build_onnxruntime_web:
@@ -86,6 +83,22 @@ jobs:
8683
run: |
8784
copy ${{ github.workspace }}\artifacts_wasm\ort-*.mjs ${{ github.workspace }}\js\web\dist\
8885
86+
- name: Download WebAssembly WebGPU artifacts
87+
uses: actions/download-artifact@v4
88+
with:
89+
name: ${{ inputs.build_config }}_wasm_webgpu
90+
path: ${{ github.workspace }}/artifacts_wasm_webgpu
91+
92+
- name: Binplace dist files (.wasm) for WebGPU
93+
shell: cmd
94+
run: |
95+
copy ${{ github.workspace }}\artifacts_wasm_webgpu\ort-*.wasm ${{ github.workspace }}\js\web\dist\
96+
97+
- name: Binplace dist files (.mjs) for WebGPU
98+
shell: cmd
99+
run: |
100+
copy ${{ github.workspace }}\artifacts_wasm_webgpu\ort-*.mjs ${{ github.workspace }}\js\web\dist\
101+
89102
- name: npm ci for /js/
90103
run: npm ci
91104
working-directory: ${{ github.workspace }}/js
@@ -115,17 +128,7 @@ jobs:
115128
run: |
116129
Get-WmiObject Win32_Process -Filter "name = 'chrome.exe'" | Format-List CommandLine
117130
118-
- name: Run ort-web tests (wasm,webgl backend)
119-
if: ${{ inputs.run_webgpu_tests != true }}
120-
shell: cmd
121-
run: |
122-
mkdir ${{ runner.temp }}\web\test\01
123-
dir ${{ runner.temp }}\web\test\01
124-
npm test -- -e=chrome -b=webgl,wasm --user-data-dir=${{ runner.temp }}\web\test\01 --chromium-flags=--enable-logging --chromium-flags=--v=1
125-
working-directory: ${{ github.workspace }}\js\web
126-
127131
- name: Run ort-web tests (ALL backends)
128-
if: ${{ inputs.run_webgpu_tests == true }}
129132
shell: cmd
130133
run: |
131134
mkdir ${{ runner.temp }}\web\test\02
@@ -134,7 +137,6 @@ jobs:
134137
working-directory: ${{ github.workspace }}\js\web
135138

136139
- name: Run ort-web tests (Suite1, webgpu, IO-binding=gpu-tensor)
137-
if: ${{ inputs.run_webgpu_tests == true }}
138140
shell: cmd
139141
run: |
140142
mkdir ${{ runner.temp }}\web\test\03
@@ -143,7 +145,6 @@ jobs:
143145
working-directory: ${{ github.workspace }}\js\web
144146

145147
- name: Run ort-web tests (Suite1, webgpu, IO-binding=gpu-location)
146-
if: ${{ inputs.run_webgpu_tests == true }}
147148
shell: cmd
148149
run: |
149150
mkdir ${{ runner.temp }}\web\test\04
@@ -169,27 +170,7 @@ jobs:
169170
working-directory: ${{ github.workspace }}\js\web
170171

171172
# WebGPU EP tests
172-
- name: Download WebAssembly WebGPU artifacts
173-
if: ${{ inputs.run_webgpu_tests == true }}
174-
uses: actions/download-artifact@v4
175-
with:
176-
name: ${{ inputs.build_config }}_wasm_webgpu
177-
path: ${{ github.workspace }}/artifacts_wasm_webgpu
178-
179-
- name: Binplace dist files (.wasm) for WebGPU
180-
if: ${{ inputs.run_webgpu_tests == true }}
181-
shell: cmd
182-
run: |
183-
copy /Y ${{ github.workspace }}\artifacts_wasm_webgpu\ort-*.wasm ${{ github.workspace }}\js\web\dist\
184-
185-
- name: Binplace dist files (.mjs) for WebGPU
186-
if: ${{ inputs.run_webgpu_tests == true }}
187-
shell: cmd
188-
run: |
189-
copy /Y ${{ github.workspace }}\artifacts_wasm_webgpu\ort-*.mjs ${{ github.workspace }}\js\web\dist\
190-
191173
- name: Run ort-web tests - WebGPU EP
192-
if: ${{ inputs.run_webgpu_tests == true }}
193174
continue-on-error: true
194175
shell: cmd
195176
run: |
@@ -199,15 +180,15 @@ jobs:
199180
working-directory: ${{ github.workspace }}\js\web
200181

201182
- name: Validate shader keys - WebGPU EP
202-
if: ${{ inputs.run_webgpu_tests == true && inputs.build_config == 'Debug' }}
183+
if: ${{ inputs.build_config == 'Debug' }}
203184
uses: ./.github/actions/webgpu-validate-shader-key
204185
with:
205186
log_file_path: ${{ runner.temp }}\web\test\07\chrome_debug.log
206187
is_chromium_log: true
207188

208189
# this step is added to help investigate the shader validation failure which is hard to reproduce
209190
- name: Upload WebGPU shader validation log on failure
210-
if: ${{ failure() && inputs.run_webgpu_tests == true && inputs.build_config == 'Debug' }}
191+
if: ${{ failure() && inputs.build_config == 'Debug' }}
211192
uses: actions/upload-artifact@v4
212193
with:
213194
name: webgpu-shader-validation-logs

.github/workflows/windows_x86.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
- name: Build and Test
8888
shell: pwsh
8989
run: |
90-
python.exe "${{ github.workspace }}\tools\ci_build\build.py" --config RelWithDebInfo --build_dir "${{ github.workspace }}\build" --skip_submodule_sync --build_csharp --parallel --use_binskim_compliant_compile_flags --cmake_generator "Visual Studio 17 2022" --build_shared_lib --enable_onnx_tests --build_wheel --msbuild_extra_options "IncludeMobileTargets=false" --build_nuget --use_vcpkg --use_vcpkg_ms_internal_asset_cache
90+
python.exe "${{ github.workspace }}\tools\ci_build\build.py" --config RelWithDebInfo --build_dir "${{ github.workspace }}\build" --skip_submodule_sync --build_csharp --parallel --use_binskim_compliant_compile_flags --cmake_generator "Visual Studio 17 2022" --build_shared_lib --enable_onnx_tests --build_wheel --msbuild_extra_options "IncludeMobileTargets=false" --build_nuget --compile_no_warning_as_error --use_vcpkg --use_vcpkg_ms_internal_asset_cache
9191
if ($LASTEXITCODE -ne 0) {
9292
exit $LASTEXITCODE
9393
}

cmake/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ if (onnxruntime_USE_ROCM)
372372
if (HIPIFY_PERL_PATH-NOTFOUND)
373373
MESSAGE(FATAL_ERROR "hipify-perl not found")
374374
endif()
375-
MESSAGE("HIPIFY PATH:"${HIPIFY_PERL_PATH}/hipify-perl)
375+
MESSAGE("HIPIFY PATH: ${HIPIFY_PERL_PATH}/hipify-perl")
376376
set(onnxruntime_HIPIFY_PERL ${HIPIFY_PERL_PATH}/hipify-perl)
377377
endif()
378378

@@ -1336,7 +1336,7 @@ function(onnxruntime_configure_target target_name)
13361336
if(WIN32 AND onnxruntime_ENABLE_STATIC_ANALYSIS AND onnxruntime_USE_CUSTOM_STATIC_ANALYSIS_RULES)
13371337
set_target_properties(${target_name} PROPERTIES VS_USER_PROPS ${PROJECT_SOURCE_DIR}/EnableVisualStudioCodeAnalysis.props)
13381338
endif()
1339-
target_include_directories(${target_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT} ${abseil_cpp_SOURCE_DIR})
1339+
target_include_directories(${target_name} PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${ONNXRUNTIME_ROOT})
13401340
if (onnxruntime_ENABLE_TRAINING_OPS)
13411341
target_include_directories(${target_name} PRIVATE ${ORTTRAINING_ROOT})
13421342
endif()
@@ -1669,6 +1669,10 @@ if (onnxruntime_ENABLE_DLPACK)
16691669
add_compile_definitions(ENABLE_DLPACK)
16701670
endif()
16711671

1672+
if (onnxruntime_CALLER_FRAMEWORK)
1673+
add_definitions(-DORT_CALLER_FRAMEWORK="${onnxruntime_CALLER_FRAMEWORK}")
1674+
endif()
1675+
16721676
if (UNIX OR onnxruntime_USE_NCCL)
16731677
# Find NCCL
16741678
if (onnxruntime_USE_NCCL)

cmake/deps.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#since the file contains a version string: "lts_20230802". However, the file is for debugging purposes only and would
1010
#not affect built binaries.
1111
#
12-
abseil_cpp;https://github.com/abseil/abseil-cpp/archive/refs/tags/20240722.0.zip;36ee53eb1466fb6e593fc5c286680de31f8a494a
12+
abseil_cpp;https://github.com/abseil/abseil-cpp/archive/refs/tags/20250512.0.zip;3d6ff7e7ce144d9a53a53bef1f1bf79e1da4b8e1
1313
coremltools;https://github.com/apple/coremltools/archive/refs/tags/7.1.zip;f1bab0f30966f2e217d8e01207d518f230a1641a
1414
cxxopts;https://github.com/jarro2783/cxxopts/archive/3c73d91c0b04e2b59462f0a741be8c07024c1bc0.zip;6c6ca7f8480b26c8d00476e0e24b7184717fe4f0
1515
date;https://github.com/HowardHinnant/date/archive/refs/tags/v3.0.1.zip;2dac0c81dc54ebdd8f8d073a75c053b04b56e159
@@ -56,5 +56,5 @@ extensions;https://github.com/microsoft/onnxruntime-extensions/archive/c24b7bab0
5656
composable_kernel;https://github.com/ROCmSoftwarePlatform/composable_kernel/archive/204da9c522cebec5220bba52cd3542ebcaf99e7a.zip;1827348efd47831c13074245274d41b7cae8a557
5757
directx_headers;https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v1.613.1.zip;47653509a3371eabb156360f42faf582f314bf2e
5858
cudnn_frontend;https://github.com/NVIDIA/cudnn-frontend/archive/refs/tags/v1.12.0.zip;7e733cfdc410d777b76122d64232499205589a96
59-
dawn;https://github.com/google/dawn/archive/4cb1f9be152a4fa6bb695c08cd707ab078a1e2fb.zip;de39336b7715f53c14eec61072293b85cc73b691
59+
dawn;https://github.com/google/dawn/archive/9733be39e18186961d503e064874afe3e9ceb8d1.zip;2a4017c32892b90d072a9102eba90ae691fae36d
6060
kleidiai;https://github.com/ARM-software/kleidiai/archive/refs/tags/v1.4.0.tar.gz;22d3b57b54a61c194ab256ff11b0353a3b220244

cmake/external/abseil-cpp.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ else()
2727
endif()
2828

2929
# NB! Advancing Abseil version changes its internal namespace,
30-
# currently absl::lts_20240116 which affects abseil-cpp.natvis debugger
30+
# currently absl::lts_20250512 which affects abseil-cpp.natvis debugger
3131
# visualization file, that must be adjusted accordingly, unless we eliminate
3232
# that namespace at build time.
3333
onnxruntime_fetchcontent_declare(
@@ -36,7 +36,7 @@ onnxruntime_fetchcontent_declare(
3636
URL_HASH SHA1=${DEP_SHA1_abseil_cpp}
3737
EXCLUDE_FROM_ALL
3838
PATCH_COMMAND ${ABSL_PATCH_COMMAND}
39-
FIND_PACKAGE_ARGS 20240722 NAMES absl
39+
FIND_PACKAGE_ARGS 20250512 NAMES absl
4040
)
4141

4242
onnxruntime_fetchcontent_makeavailable(abseil_cpp)

cmake/external/abseil-cpp.natvis

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
3-
<Type Name="absl::lts_20240722::InlinedVector&lt;*&gt;">
3+
<Type Name="absl::lts_20250512::InlinedVector&lt;*&gt;">
44
<Intrinsic Name="_size" Expression="storage_.metadata_.value >> 1"/>
55
<Intrinsic Name="_is_allocated" Expression="(storage_.metadata_.value &amp; 1) == 1"/>
66
<Intrinsic Name="_inlined_data" Expression="($T1*)storage_.data_.inlined.inlined_data"/>
@@ -24,7 +24,7 @@
2424
</Expand>
2525
</Type>
2626
<!-- Should handle both flat hash_set and hash_map -->
27-
<Type Name="absl::lts_20240116::container_internal::raw_hash_set&lt;*&gt;">
27+
<Type Name="absl::lts_20250512::container_internal::raw_hash_set&lt;*&gt;">
2828
<Intrinsic Name="_commonfields" Expression="settings_.value"/>
2929
<Intrinsic Name="_size" Expression="settings_.value.compressed_tuple_.value"/>
3030
<Intrinsic Name="_capacity" Expression="_commonfields().capacity_"/>
@@ -51,7 +51,7 @@
5151
</Type>
5252

5353
<!-- Primitive types stored as a value -->
54-
<Type Name="absl::lts_20240116::container_internal::Storage&lt;*,*,0&gt;">
54+
<Type Name="absl::lts_20250512::container_internal::Storage&lt;*,*,0&gt;">
5555
<DisplayString IncludeView="noparens">*($T1 *){value}</DisplayString>
5656
<DisplayString ExcludeView="noparens">(*($T1 *){value})</DisplayString>
5757
<Expand>
@@ -60,15 +60,15 @@
6060
</Type>
6161

6262
<!-- For storage inherited from the type -->
63-
<Type Name="absl::lts_20240116::container_internal::Storage&lt;*,*,1&gt;">
63+
<Type Name="absl::lts_20250512::container_internal::Storage&lt;*,*,1&gt;">
6464
<DisplayString IncludeView="noparens">*($T1 *)this</DisplayString>
6565
<DisplayString ExcludeView="noparens">(*($T1 *)this)</DisplayString>
6666
<Expand>
6767
<ExpandedItem>*($T1 *)this</ExpandedItem>
6868
</Expand>
6969
</Type>
7070

71-
<Type Name="absl::lts_20240116::container_internal::map_slot_type&lt;*&gt;">
71+
<Type Name="absl::lts_20250512::container_internal::map_slot_type&lt;*&gt;">
7272
<DisplayString IncludeView="noparens">{value.first}, {value.second}</DisplayString>
7373
<DisplayString ExcludeView="noparens">({value.first}, {value.second})</DisplayString>
7474
<Expand>

cmake/external/onnxruntime_external_deps.cmake

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -723,36 +723,22 @@ if (onnxruntime_USE_WEBGPU)
723723
)
724724
else()
725725
set(ONNXRUNTIME_Dawn_PATCH_COMMAND
726-
# The dawn.patch contains the following changes:
726+
# The dawn_destroy_buffer_on_destructor.patch contains the following changes:
727727
#
728728
# - (private) Allow WGPUBufferImpl class to destroy the buffer in the destructor
729729
# In native implementation, wgpuBufferRelease will trigger the buffer destroy (if refcount decreased to 0). But
730730
# in emwgpu implementation, the buffer destroy won't happen. This change adds a destructor to the buffer class
731731
# to destroy the buffer when the refcount is 0 for non-external buffers.
732732
#
733-
# - (private) Remove hard-coded CMAKE_OSX_DEPLOYMENT_TARGET in Dawn's CMake files
734-
# https://github.com/microsoft/onnxruntime/pull/23729
735-
#
736-
# - (private) Reduce unsafe buffer usage warning in aligned_storage.h
737-
# https://github.com/microsoft/onnxruntime/pull/24308
738-
# The patch disables the UNSAFE_BUFFER_USAGE warning around the AlignedStorage struct in aligned_storage.h. This is done
739-
# by using TINT_BEGIN_DISABLE_WARNING and TINT_END_DISABLE_WARNING macros, which helps in warnings related to unsafe buffer usage
740-
# usage when compiling the code, making the build process cleaner and faster.
741-
#
742-
${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/dawn/dawn.patch &&
733+
${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/dawn/dawn_destroy_buffer_on_destructor.patch &&
743734

744735
# The dawn_force_enable_f16_nvidia_vulkan.patch contains the following changes:
745736
#
746737
# - (private) Force enable f16 support for NVIDIA Vulkan
747738
# Dawn disabled f16 support for NVIDIA Vulkan by default because of crashes in f16 CTS tests (crbug.com/tint/2164).
748739
# Since the crashes are limited to specific GPU models, we patched Dawn to remove the restriction.
749-
${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/dawn/dawn_force_enable_f16_nvidia_vulkan.patch &&
750-
751-
# The dawn_fix_copy_dxil_dll.patch contains the following changes:
752740
#
753-
# - (private) Fix copy of dxil.dll in Dawn
754-
# The patch ensures the copy of dxil.dll to be done after the build step of `dxcompiler` target.
755-
${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/dawn/dawn_fix_copy_dxil_dll.patch)
741+
${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/dawn/dawn_force_enable_f16_nvidia_vulkan.patch)
756742

757743
onnxruntime_fetchcontent_declare(
758744
dawn

cmake/onnxruntime.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ endif()
2222
function(get_c_cxx_api_headers HEADERS_VAR)
2323
set(_headers
2424
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_c_api.h"
25+
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_ep_c_api.h"
2526
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_cxx_api.h"
2627
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_cxx_inline.h"
2728
"${REPO_ROOT}/include/onnxruntime/core/session/onnxruntime_float16.h"

cmake/onnxruntime_common.cmake

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,16 +120,14 @@ if (onnxruntime_USE_MIMALLOC)
120120
target_link_libraries(onnxruntime_common PRIVATE onnxruntime_mimalloc_shim)
121121
endif()
122122

123-
if(NOT onnxruntime_DISABLE_ABSEIL)
124-
target_include_directories(onnxruntime_common PRIVATE ${ABSEIL_SOURCE_DIR})
125-
if (MSVC)
126-
set(ABSEIL_NATVIS_FILE "abseil-cpp.natvis")
127-
target_sources(
128-
onnxruntime_common
129-
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/${ABSEIL_NATVIS_FILE}>)
130-
endif()
123+
if (MSVC)
124+
set(ABSEIL_NATVIS_FILE "abseil-cpp.natvis")
125+
target_sources(
126+
onnxruntime_common
127+
INTERFACE $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/external/${ABSEIL_NATVIS_FILE}>)
131128
endif()
132129

130+
133131
if (MSVC)
134132
set(EIGEN_NATVIS_FILE ${eigen_SOURCE_DIR}/debug/msvc/eigen.natvis)
135133
if (EXISTS ${EIGEN_NATVIS_FILE})

0 commit comments

Comments
 (0)