Skip to content

Commit

Permalink
fixup! fix: update WebGPU embedding benchmark to prefer GPUAdapter.in…
Browse files Browse the repository at this point in the history
…fo over requestAdapterInfo
  • Loading branch information
ErichDonGubler authored Dec 13, 2024
1 parent df14578 commit 29d2592
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 = adapter.info;
adapterInfo = adapter.info || await adapter.requestAdapterInfo();
gpuHasFp16 = adapter.features.has('shader-f16')
} catch (err) {
adapterInfo = {};
Expand Down

0 comments on commit 29d2592

Please sign in to comment.