Skip to content

Commit

Permalink
fix: update WebGPU embedding benchmark to prefer GPUAdapter.info ov…
Browse files Browse the repository at this point in the history
…er `requestAdapterInfo`

Migrates to use the new spec.-compliant way of getting adapter info in WebGPU (see also <microsoft/onnxruntime#21065>).

This has been removed by both Chrome and Firefox, so there might be enough reason to simply stop using `requestAdapterInfo`, but I wasn't sure.
  • Loading branch information
ErichDonGubler authored Dec 13, 2024
1 parent effa9a9 commit df14578
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/webgpu-embedding-benchmark/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ let gpuHasFp16 = false;
try {
// Shouldn't fail since the WebGPU model has loaded successfully
const adapter = await navigator.gpu.requestAdapter();
adapterInfo = await adapter.requestAdapterInfo();
adapterInfo = adapter.info;
gpuHasFp16 = adapter.features.has('shader-f16')
} catch (err) {
adapterInfo = {};
Expand Down

0 comments on commit df14578

Please sign in to comment.