@@ -723,36 +723,21 @@ 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:
752- #
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)
740+ ${Patch_EXECUTABLE} --binary --ignore -whitespace -p1 < ${PROJECT_SOURCE_DIR} /patches/dawn/dawn_force_enable_f16_nvidia_vulkan.patch)
756741
757742 onnxruntime_fetchcontent_declare(
758743 dawn
0 commit comments