Repository navigation
webgpu: add POOL_2D support - #32250
Conversation
|
Hi @SS1618, thanks for your contribution! Per our contribution guidelines, the automated PR checker found the following issue(s) that need your attention:
Please note that maintainers reserve the right to make final decisions on PRs. If you believe there is a mistake, please comment below. |
b3c53ed to
9130bca
Compare
|
Please let me know if I should update my PR description or include additional metrics. I based the PR description and supporting evidence on other WebGPU op PRs since it's my first PR. |
|
Thanks! Overall, the changes look good to me. Could you rebase onto master since two files have conflicts?
Basically, when you add support for new ops, it is better to show which models use them, and also some performance changes, so we can see the value of the new support. I think this PR already shows enough information. |
|
@yomaytk rebased |
|
@yomaytk sorry, I had to reformat to fit the formatting rules. Should be good to go now. |
* Shader, pipeline, and launcher * Update docs and add newline to wgsl * Formatting fixes
* Shader, pipeline, and launcher * Update docs and add newline to wgsl * Formatting fixes
Overview
Added WebGPU support for POOL_2D with contiguous F32 input.
Additional information
Tested on an NVIDIA GeForce RTX 4090 with Dawn WebGPU.
All 144 tests pass.
Used
llama-mtmd-clion gemma-3 4B IT with Q4_K_M weights and mmproj f16 to get a rough comparison against the baseline.Ran 10 measured runs for baseline v. this PR. The measurement is image encoding time.
llama-mtmd-cli -hf ggml-org/gemma-3-4b-it-GGUF --image tools/mtmd/test-1.jpeg -p "Describe this image." -n 64 -ngl 99 -dev WebGPU -mmdev WebGPU -fa off -t 2 -tb 2 -c 1024 -b 512 -ub 512 -s 1234 --temp 0Results:
Baseline: mean = 794.9 ms, std = 35.00 ms
PR: mean = 752.8 ms, std = 59.20 ms
Observed a 1.05x speedup.
Requirements