navigator.gpu Presence Does Not Confirm WebGPU Support, requestAdapter() Does
A developer discovered that checking navigator.gpu alone is insufficient to confirm WebGPU availability in the browser, as the property can exist even when no GPU adapter is accessible. Testing on an Apple M4 Mac with a Chromium 149 build showed that disabling hardware acceleration left navigator.gpu defined while requestAdapter() silently returned null. The same behavior was observed in a production image-segmentation tool (ImgIng), which handled this gracefully by wrapping the WebGPU session attempt in a try/catch block and falling back to a WASM execution provider. Performance tests revealed a significant speed difference between the two backends, with the same ONNX model taking roughly 1,951 ms on WASM versus 409 ms on WebGPU, though both produced identical output. The key takeaway for developers is to treat a null response from requestAdapter() as a definitive signal that WebGPU is unavailable, rather than relying on the presence of the navigator.gpu object.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in