From 29d2592eb330da94976acb62c254942050ec6ae3 Mon Sep 17 00:00:00 2001 From: Erich Gubler Date: Fri, 13 Dec 2024 11:05:38 -0500 Subject: [PATCH] fixup! fix: update WebGPU embedding benchmark to prefer GPUAdapter.info over requestAdapterInfo --- examples/webgpu-embedding-benchmark/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/webgpu-embedding-benchmark/main.js b/examples/webgpu-embedding-benchmark/main.js index 4fb774bd4..bf1ab38b5 100644 --- a/examples/webgpu-embedding-benchmark/main.js +++ b/examples/webgpu-embedding-benchmark/main.js @@ -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 = {};