-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add 2 CMake build options of Dawn (#23096)
### Description This change adds the following CMake build options for Dawn: - onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY - OFF by default - when enabled, builds Dawn as a monolithic library (webgpu_dawn.dll) - onnxruntime_ENABLE_DAWN_BACKEND_VULKAN - OFF by default - when enabled, build with Vulkan backend for Dawn on Windows - onnxruntime_ENABLE_DAWN_BACKEND_D3D12 - ON by default - when enabled, build with DirectX 12 backend for Dawn on Windows ### File Size Comparison (Windows) | Build | cmdline | File Size | |---|---|---| | Baseline | --config Release<br/> --build_shared_lib | `12,755,456 onnxruntime.dll` | | WebGPU D3D12 (default) | --use_webgpu<br/> --config Release<br/> --build_shared_lib | `17,082,368 dxcompiler.dll`<br/>` 1,508,472 dxil.dll`<br/>`18,708,480 onnxruntime.dll` | | WebGPU D3D12+Vulkan | --use_webgpu<br/> --config Release<br/> --build_shared_lib<br/> --cmake_extra_defines<br/> onnxruntime_ENABLE_DAWN_BACKEND_D3D12=1<br/> onnxruntime_ENABLE_DAWN_BACKEND_VULKAN=1 | `17,081,344 dxcompiler.dll`<br/>` 1,508,472 dxil.dll`<br/>`19,388,416 onnxruntime.dll` | | WebGPU Vulkan | --use_webgpu<br/> --config Release<br/> --build_shared_lib<br/> --cmake_extra_defines<br/> onnxruntime_ENABLE_DAWN_BACKEND_D3D12=0<br/> onnxruntime_ENABLE_DAWN_BACKEND_VULKAN=1 | `17,615,872 onnxruntime.dll` | | Monolithic | --use_webgpu<br/> --config Release<br/> --build_shared_lib<br/> --cmake_extra_defines<br/> onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY=1 | `17,082,368 dxcompiler.dll`<br/>` 1,508,472 dxil.dll`<br/>`13,277,696 onnxruntime.dll`<br/>` 5,616,640 webgpu_dawn.dll` | | External Dawn | --use_webgpu<br/> --config Release<br/> --build_shared_lib<br/> --cmake_extra_defines<br/> onnxruntime_USE_EXTERNAL_DAWN=1<br/> --skip_tests | `17,081,344 dxcompiler.dll`<br/>` 1,508,472 dxil.dll`<br/>`13,277,184 onnxruntime.dll`
- Loading branch information
Showing
7 changed files
with
97 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters