ONNX Runtime WebGPU PR Monitor

Last Updated: 05/08/2026, 07:18 PM | Total: 224 PRs

Showing 1-10 of 39 PRs
Page 1 of 4
👤 rajatmonga📅 Created: 05/08/2026
🤖 AI 摘要

本 PR 标题为"Fix dangling pointer of temporary return value",主要修改了 1 个文件,涉及 onnxruntime 等模块。代码变更包括 1 行新增和 1 行删除。 这是一个与 ONNX Runtime WebGPU 相关的改动,具体功能需要查看代码详情。

📁 Changed Files (1 files, 2 changes: +1/-1)
onnxruntime/test/util/default_providers.cc
👤 daijh📅 Created: 05/08/2026
🤖 AI 摘要

本 PR 标题为"[webgpu] Optimize LinearAttention Op with subgroup",主要修改了 3 个文件,涉及 onnxruntime 等模块。代码变更包括 137 行新增和 5 行删除。 这是一个与 ONNX Runtime WebGPU 相关的改动,具体功能需要查看代码详情。

📁 Changed Files (3 files, 142 changes: +137/-5)
onnxruntime/contrib_ops/webgpu/bert/linear_attention.cc
onnxruntime/contrib_ops/webgpu/bert/linear_attention.h
onnxruntime/contrib_ops/webgpu/bert/linear_attention.wgsl.template
👤 xiaofeihan1📅 Created: 05/08/2026
🤖 AI 摘要

本 PR 标题为"Enable QuickGeluFusion on WebGPU EP and fix fp16 shader",主要修改了 2 个文件,涉及 onnxruntime 等模块。代码变更包括 4 行新增和 4 行删除。 这是一个与 ONNX Runtime WebGPU 相关的改动,具体功能需要查看代码详情。

📁 Changed Files (2 files, 8 changes: +4/-4)
onnxruntime/core/optimizer/graph_transformer_utils.cc
onnxruntime/core/providers/webgpu/math/unary_elementwise_ops.h
👤 edgchen1📅 Created: 05/07/2026
🤖 AI 摘要

本 PR 标题为"[plugin-ep-webgpu/rel-0.1] 0.1.0 cherry-picks, round 2",主要修改了 15 个文件,涉及 plugin-ep-webgpu、tools 等模块。代码变更包括 149 行新增和 131 行删除。 这是一个与 ONNX Runtime WebGPU 相关的改动,具体功能需要查看代码详情。

📁 Changed Files (15 files, 280 changes: +149/-131)
plugin-ep-webgpu/README.md
plugin-ep-webgpu/_packaging_utils.py
plugin-ep-webgpu/csharp/Microsoft.ML.OnnxRuntime.EP.WebGpu/Microsoft.ML.OnnxRuntime.EP.WebGpu.csproj
plugin-ep-webgpu/csharp/Microsoft.ML.OnnxRuntime.EP.WebGpu/README.md
plugin-ep-webgpu/csharp/pack_nuget.py
plugin-ep-webgpu/csharp/test/WebGpuEpNuGetTest/WebGpuEpNuGetTest.csproj
plugin-ep-webgpu/python/build_wheel.py
plugin-ep-webgpu/python/onnxruntime_ep_webgpu/README.md
plugin-ep-webgpu/python/pyproject.toml.in
tools/ci_build/github/azure-pipelines/stages/plugin-linux-webgpu-stage.yml
tools/ci_build/github/azure-pipelines/stages/plugin-linux-webgpu-test-stage.yml
tools/ci_build/github/azure-pipelines/stages/plugin-mac-webgpu-stage.yml
tools/ci_build/github/azure-pipelines/stages/plugin-mac-webgpu-test-stage.yml
tools/ci_build/github/azure-pipelines/stages/plugin-win-webgpu-stage.yml
tools/ci_build/github/azure-pipelines/stages/plugin-win-webgpu-test-stage.yml
👤 qjia7📅 Created: 05/07/2026
🤖 AI 摘要

本 PR 标题为"webgpu: Extend FlashAttention decode path for any sequence length",主要修改了 5 个文件,涉及 onnxruntime 等模块。代码变更包括 124 行新增和 64 行删除。 这是一个与 ONNX Runtime WebGPU 相关的改动,具体功能需要查看代码详情。

📁 Changed Files (5 files, 188 changes: +124/-64)
onnxruntime/contrib_ops/webgpu/bert/flash_attention.cc
onnxruntime/contrib_ops/webgpu/bert/flash_attention.h
onnxruntime/contrib_ops/webgpu/bert/flash_attention_decode_qkt.wgsl.template
onnxruntime/contrib_ops/webgpu/bert/flash_attention_decode_split_vx.wgsl.template
onnxruntime/contrib_ops/webgpu/bert/flash_attention_decode_vx_reduce.wgsl.template
👤 danielsongmicrosoft📅 Created: 05/04/2026
🤖 AI 摘要

本 PR 标题为"Add python implementation for wgsl-gen",主要修改了 18 个文件,涉及 onnxruntime、cmake 等模块。代码变更包括 3864 行新增和 28 行删除。 这是一个与 ONNX Runtime WebGPU 相关的改动,具体功能需要查看代码详情。

📁 Changed Files (18 files, 3736 changes: +3708/-28)
cmake/onnxruntime_providers_webgpu.cmake
onnxruntime/core/providers/webgpu/wgsl_templates/README.md
tools/python/wgsl_gen.py
tools/python/wgsl_template/__init__.py
tools/python/wgsl_template/code_generator/__init__.py
tools/python/wgsl_template/code_generator/static_cpp.py
tools/python/wgsl_template/code_pattern.py
tools/python/wgsl_template/errors.py
tools/python/wgsl_template/generator.py
tools/python/wgsl_template/loader.py
tools/python/wgsl_template/parser.py
tools/python/wgsl_template/test/run_tests.py
tools/python/wgsl_template/test/test_build.py
tools/python/wgsl_template/test/test_generator.py
tools/python/wgsl_template/test/test_in_tree_smoke.py
tools/python/wgsl_template/test/test_loader.py
tools/python/wgsl_template/test/test_parser.py
tools/python/wgsl_template/types.py
ep:WebGPU
👤 hariharans29📅 Created: 05/02/2026
🤖 AI 摘要

## PR 主要改动总结 ### 1. 主要功能改动 该 PR 重构了 WebGPU 的 BufferManager 创建时机和路由机制,采用延迟创建(lazy creation)策略,并引入 `graph_buffer_mgr_active_` 标志来控制图模式下的 buffer 管理器在 OnRunStart/OnRunEnd 之间的激活状态。 ### 2. 解决的核心问题 修复了图捕获(graph capture)首次重放时的**陈旧缓冲区绑定问题**:当启用图捕获时,捕获的命令持有捕获阶段的 buffer 指针,如果分配器在首次 Replay() 前释放并重用了内存槽位,会导致调度读取过期内存,产生错误的 logits 张量输出,影响模型推理正确性。 ### 3. 对 WebGPU 支持的影响 该修复对 WebGPU 的图捕获优化功能至关重要,特别是在 MatMulNBits MLP/QKV 融合等会改变内存分配模式的场景下,确保了固定形状解码和动态形状推理的正确性。 ### 4. 技术要点 - 重构 `GpuBufferAllocator` 使用 `std::function<const BufferManager&()>` 动态解析活跃的 buffer 管理器 - 新增 `WebGpuContext::WaitForQueueIdle()` 和 `ComputeContextBase::FlushAndWait()` 辅助方法用于 buffer 管理器生命周期管理 - 通过门控机制避免在非图执行期间使用图模式的 buffer 管理器

📁 Changed Files (7 files, 69 changes: +49/-20)
onnxruntime/core/providers/webgpu/allocator.cc
onnxruntime/core/providers/webgpu/allocator.h
onnxruntime/core/providers/webgpu/compute_context.h
onnxruntime/core/providers/webgpu/webgpu_context.cc
onnxruntime/core/providers/webgpu/webgpu_context.h
onnxruntime/core/providers/webgpu/webgpu_execution_provider.cc
onnxruntime/core/providers/webgpu/webgpu_execution_provider.h
ep:WebGPU
👤 maxwbuckley📅 Created: 04/30/2026
🤖 AI 摘要

## PR 主要改动总结 **注意:此 PR 实际上与 WebGPU 无关,而是关于 CoreML EP 的改进** ### 核心改动 为 CoreML EP 添加了对 `com.microsoft:FusedConv` 算子的支持,覆盖 MLProgram 和 NeuralNetwork 两种执行路径。 ### 解决的问题 解决了预优化模型(通过 CPU EP 或 WebGPU 等 EP 优化并保存的模型)在 CoreML EP 上加载时的分区碎片化问题。之前当模型包含 `FusedConv` 节点时,CoreML EP 无法识别这些节点,导致无法有效执行。 ### WebGPU 关联 虽然 PR 针对 CoreML EP,但与 WebGPU 相关:当使用 WebGPU EP 优化模型并保存后,生成的 `FusedConv` 节点现在可以被 CoreML EP 正确处理,改善了跨平台模型部署的兼容性。 ### 技术要点 `FusedConv` 是 Conv+Activation 融合算子,由 ORT 的 `ConvActivationFusion` 优化 pass 生成。此改动主要影响移动端部署和 ORT 格式模型的使用场景,新增 132 行测试代码和 107 行实现代码。

📁 Changed Files (4 files, 322 changes: +319/-3)
onnxruntime/core/providers/coreml/builders/impl/conv_op_builder.cc
onnxruntime/core/providers/coreml/builders/op_builder_factory.cc
onnxruntime/test/providers/coreml/coreml_basic_test.cc
tools/ci_build/github/apple/coreml_supported_mlprogram_ops.md
👤 xhcao📅 Created: 04/30/2026
🤖 AI 摘要

## ONNX Runtime WebGPU PR 改动总结 ### 主要改动 此 PR 将 `gemm-subgroup` 优化扩展到 Conv(卷积)算子,并根据工作组(workgroup)数量动态决定是否启用 gemm-subgroup 优化。 ### 解决的问题 为 WebGPU 后端的卷积操作引入了 subgroup 级别的 GEMM 优化,增强了英特尔硬件上的性能表现,同时添加了基于工作组数量的智能启用机制,避免在不适合的场景下使用该优化。 ### 技术要点 - 修改了 matmul 相关代码,增加工作组数量参数传递(添加参数到函数接口) - 在 conv.cc 中集成了 gemm-subgroup 支持 - 优化决策逻辑更加智能化,根据实际计算规模动态选择是否使用 subgroup 优化 ### 影响范围 代码改动较小(22 行新增,10 行删除),主要集中在英特尔厂商特定的数学运算优化模块,对 WebGPU 的卷积性能有积极影响。

📁 Changed Files (4 files, 32 changes: +22/-10)
onnxruntime/core/providers/webgpu/nn/conv.cc
onnxruntime/core/providers/webgpu/vendor/intel/math/gemm_subgroup.cc
onnxruntime/core/providers/webgpu/vendor/intel/math/matmul.cc
onnxruntime/core/providers/webgpu/vendor/intel/math/matmul.h
👤 hariharans29📅 Created: 04/30/2026
🤖 AI 摘要

## PR 主要改动总结 ### 核心功能 此 PR 为 ONNX Runtime 的 WebGPU 后端添加了两个专门针对 Qwen3 模型的图融合优化,分别是 **MatMulNBitsMlp** 和 **MatMulNBitsQkv** 融合算子及其对应的 kernel 实现。 ### 解决的问题 - **MatMulNBitsMlp**:将 SwiGLU MLP 块中的 5-7 个独立操作(可选的 LayerNorm + 两个 MatMulNBits 投影 + 可选 bias + Sigmoid/Mul(SiLU) + 逐元素乘法)融合为单次 dispatch,显著减少 GPU 调用开销 - **MatMulNBitsQkv**:将注意力机制中的 4 个操作(可选的 LayerNorm + 三个共享输入的 Q/K/V 投影)融合为单次 dispatch ### WebGPU 支持影响 这两个融合专为 WebGPU 优化,通过减少多次 kernel 调度和中间数据传输,大幅提升 Qwen3 等 Transformer 模型在 WebGPU 上的推理性能,特别是在量化(N-bit)场景下。 ### 技术要点 重构了现有 `MatMulNBits` 的调度逻辑以便新融合 kernel 复用判断条件;新增完整的 op schema、WGSL shader 模板以及对应的图优化和单元测试,共新增约 3800 行代码。

📁 Changed Files (23 files, 4339 changes: +4320/-19)
docs/ContribOperators.md
onnxruntime/contrib_ops/webgpu/quantization/matmul_nbits.cc
onnxruntime/contrib_ops/webgpu/quantization/matmul_nbits_common.cc
onnxruntime/contrib_ops/webgpu/quantization/matmul_nbits_common.h
onnxruntime/contrib_ops/webgpu/quantization/matmul_nbits_mlp.cc
onnxruntime/contrib_ops/webgpu/quantization/matmul_nbits_mlp.h
onnxruntime/contrib_ops/webgpu/quantization/matmul_nbits_mlp.wgsl.template
onnxruntime/contrib_ops/webgpu/quantization/matmul_nbits_mlp_wide_tile_m1.wgsl.template
onnxruntime/contrib_ops/webgpu/quantization/matmul_nbits_qkv.cc
onnxruntime/contrib_ops/webgpu/quantization/matmul_nbits_qkv.h
onnxruntime/contrib_ops/webgpu/quantization/matmul_nbits_qkv.wgsl.template
onnxruntime/contrib_ops/webgpu/webgpu_contrib_kernels.cc
onnxruntime/core/graph/contrib_ops/contrib_defs.cc
onnxruntime/core/optimizer/graph_transformer_utils.cc
onnxruntime/core/optimizer/matmul_nbits_mlp_fusion.cc
onnxruntime/core/optimizer/matmul_nbits_mlp_fusion.h
onnxruntime/core/optimizer/matmul_nbits_qkv_fusion.cc
onnxruntime/core/optimizer/matmul_nbits_qkv_fusion.h
onnxruntime/test/optimizer/graph_transform_utils_test.cc
onnxruntime/test/optimizer/matmul_nbits_mlp_fusion_test.cc
onnxruntime/test/optimizer/matmul_nbits_qkv_fusion_test.cc
onnxruntime/test/optimizer/webgpu_fusion_test_util.h
onnxruntime/test/util/default_providers.cc
ep:WebGPU