File tree Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -751,9 +751,18 @@ if (onnxruntime_USE_WEBGPU)
751751 # Some build warnings are not allowed to be disabled in project level.
752752 ${Patch_EXECUTABLE} --binary --ignore -whitespace -p1 < ${PROJECT_SOURCE_DIR} /patches/dawn/dawn_binskim.patch &&
753753
754- # Android devices doesn't seem to allow fp16 in uniforms so the WebGPU EP has to manually handle passing an fp32
755- # in the uniform and converting to fp16 before using.
756- ${Patch_EXECUTABLE} --binary --ignore -whitespace -p1 < ${PROJECT_SOURCE_DIR} /patches/dawn/uniform_and_storage_buffer_16_bit_access.patch)
754+ # The uniform_and_storage_buffer_16_bit_access.patch contains the following changes:
755+ #
756+ # - (private) Android devices don't seem to allow fp16 in uniforms so the WebGPU EP has to manually handle passing an fp32
757+ # in the uniform and converting to fp16 before using.
758+ ${Patch_EXECUTABLE} --binary --ignore -whitespace -p1 < ${PROJECT_SOURCE_DIR} /patches/dawn/uniform_and_storage_buffer_16_bit_access.patch &&
759+
760+ # The safari_polyfill.patch contains the following changes:
761+ #
762+ # - (private) Fix compatibility issues with Safari. Contains the following changes:
763+ # - Polyfill for `device.AdapterInfo` (returns `undefined` in Safari v26.0)
764+ #
765+ ${Patch_EXECUTABLE} --binary --ignore -whitespace -p1 < ${PROJECT_SOURCE_DIR} /patches/dawn/safari_polyfill.patch)
757766
758767 onnxruntime_fetchcontent_declare(
759768 dawn
Original file line number Diff line number Diff line change 1+ diff --git a/third_party/emdawnwebgpu/pkg/webgpu/src/library_webgpu.js b/third_party/emdawnwebgpu/pkg/webgpu/src/library_webgpu.js
2+ index a3ce6dc732..7119eae424 100644
3+ --- a/third_party/emdawnwebgpu/pkg/webgpu/src/library_webgpu.js
4+ +++ b/third_party/emdawnwebgpu/pkg/webgpu/src/library_webgpu.js
5+ @@ -903,6 +903,12 @@ var LibraryWebGPU = {
6+ stackRestore(sp);
7+ };
8+
9+ + // Polyfill `device.AdapterInfo` if not present (Safari v26.0).
10+ + // See https://bugs.webkit.org/show_bug.cgi?id=301878
11+ + if (!('adapterInfo' in device)) {
12+ + device.adapterInfo = adapter.info;
13+ + }
14+ +
15+ _emwgpuOnRequestDeviceCompleted(futureId, {{{ gpu.RequestDeviceStatus.Success }}},
16+ {{{ gpu.passAsPointer('devicePtr') }}}, {{{ gpu.NULLPTR }}});
17+ }, (ex) => {
You can’t perform that action at this time.
0 commit comments