{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2604-02344","title":"Characterizing WebGPU Dispatch Overhead for LLM Inference Across Four GPU Vendors, Three Backends, and Three Browsers","arxiv_id":"2604.02344","date":"2026-02-09","proceeding":null,"authors":["Jędrzej Maczan"],"abstract":"WebGPU's security-focused design imposes per-operation validation that compounds across the many small dispatches in neural network inference, yet the true cost of this overhead is poorly characterized. We present a systematic characterization of WebGPU dispatch overhead for LLM inference at batch size 1, spanning four GPU vendors (NVIDIA, AMD, Apple, Intel), two native implementations (Dawn, wgpu-native) and three browsers (Chrome, Safari, Firefox), and two model sizes (Qwen2.5-0.5B and 1.5B). Our primary contribution is a sequential-dispatch methodology that reveals naive single-operation benchmarks overestimate dispatch cost by ${\\sim}20\\times$. The true per-dispatch cost of WebGPU API overhead alone is 24-36 $μ$s on Vulkan and 32-71 $μ$s on Metal, while the total per-operation overhead including Python cost is ${\\sim}95$~$μ$s, which turns out to be a distinction critical for optimization. On Vulkan, kernel fusion improves throughput by 53%, while CUDA fusion provides no benefit, confirming that per-operation overhead is a primary differentiator. LLM inference was tested across three major operating systems (Linux, Windows, macOS). We built $\\texttt{torch-webgpu}$, a PrivateUse1-based out-of-tree PyTorch backend and an FX-to-WebGPU compiler, which on our reference platform achieves 11--12% of CUDA performance. At dtype-matched float32, RTX PRO 2000 achieves 1.4$\\times$ WebGPU's throughput despite ${\\sim}6\\times$ less compute than RTX 5090. For dispatch overhead, backend choice is the dominant factor, although implementation choice also matters substantially within a backend (2.2$\\times$ for Metal). In terms of dispatch vs kernel compute efficiency, we conclude that at batch=1 with the current dispatch-heavy pipeline, per-operation overhead dominates regardless of kernel quality. All code, benchmarks, and raw data are open source.","url_abs":"https://arxiv.org/abs/2604.02344","url_pdf":"https://arxiv.org/pdf/2604.02344","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2604.02344","atlas_url":"https://app.syntology.ai/?focus=2604.02344","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2604.02344"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/jmaczan/torch-webgpu","reach":null}],"summary":{"ran":5,"ran_honours":1,"unverified":4},"by_repo_kind":{"found_in_text":{"samples":10,"ran":6,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"ebed4f3be1e428ce","entry":"HighIRNode","repo":"jmaczan/torch-webgpu","repo_kind":"found_in_text","path":"python/torch_webgpu/compiler/lowering.py","file_url":"https://github.com/jmaczan/torch-webgpu/blob/HEAD/python/torch_webgpu/compiler/lowering.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ebed4f3be1e428ce"}},{"code_sha256_prefix":"d10e271e3caabd83","entry":"IRNode","repo":"jmaczan/torch-webgpu","repo_kind":"found_in_text","path":"python/torch_webgpu/compiler/lowering.py","file_url":"https://github.com/jmaczan/torch-webgpu/blob/HEAD/python/torch_webgpu/compiler/lowering.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d10e271e3caabd83"}},{"code_sha256_prefix":"c40c1bed837adc69","entry":"LowIRNode","repo":"jmaczan/torch-webgpu","repo_kind":"found_in_text","path":"python/torch_webgpu/compiler/lowering.py","file_url":"https://github.com/jmaczan/torch-webgpu/blob/HEAD/python/torch_webgpu/compiler/lowering.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c40c1bed837adc69"}},{"code_sha256_prefix":"459d94e596f46aa6","entry":"LowIRRunShader","repo":"jmaczan/torch-webgpu","repo_kind":"found_in_text","path":"python/torch_webgpu/compiler/lowering.py","file_url":"https://github.com/jmaczan/torch-webgpu/blob/HEAD/python/torch_webgpu/compiler/lowering.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"459d94e596f46aa6"}},{"code_sha256_prefix":"95c9c06942be7312","entry":"_resolve_arg","repo":"jmaczan/torch-webgpu","repo_kind":"found_in_text","path":"python/torch_webgpu/compiler/lowering.py","file_url":"https://github.com/jmaczan/torch-webgpu/blob/HEAD/python/torch_webgpu/compiler/lowering.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"95c9c06942be7312"}},{"code_sha256_prefix":"6030faa1a9ae1a3a","entry":"debug_enabled","repo":"jmaczan/torch-webgpu","repo_kind":"found_in_text","path":"python/torch_webgpu/compiler/lowering.py","file_url":"https://github.com/jmaczan/torch-webgpu/blob/HEAD/python/torch_webgpu/compiler/lowering.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6030faa1a9ae1a3a"}},{"code_sha256_prefix":"bdaf60c3df26cd4c","entry":"HighIROp","repo":"jmaczan/torch-webgpu","repo_kind":"found_in_text","path":"python/torch_webgpu/compiler/lowering.py","file_url":"https://github.com/jmaczan/torch-webgpu/blob/HEAD/python/torch_webgpu/compiler/lowering.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"bdaf60c3df26cd4c"}},{"code_sha256_prefix":"f68c7f1a41dc2047","entry":"LowIROp","repo":"jmaczan/torch-webgpu","repo_kind":"found_in_text","path":"python/torch_webgpu/compiler/lowering.py","file_url":"https://github.com/jmaczan/torch-webgpu/blob/HEAD/python/torch_webgpu/compiler/lowering.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f68c7f1a41dc2047"}},{"code_sha256_prefix":"780c4d46a0614bb8","entry":"debug","repo":"jmaczan/torch-webgpu","repo_kind":"found_in_text","path":"python/torch_webgpu/compiler/lowering.py","file_url":"https://github.com/jmaczan/torch-webgpu/blob/HEAD/python/torch_webgpu/compiler/lowering.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"780c4d46a0614bb8"}},{"code_sha256_prefix":"7fc104a6651a3f2c","entry":"run_shader","repo":"jmaczan/torch-webgpu","repo_kind":"found_in_text","path":"python/torch_webgpu/compiler/lowering.py","file_url":"https://github.com/jmaczan/torch-webgpu/blob/HEAD/python/torch_webgpu/compiler/lowering.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7fc104a6651a3f2c"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}