This is an automated email from the ASF dual-hosted git repository.
tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git
The following commit(s) were added to refs/heads/main by this push:
new 4ab91d4c4f Use adapter.info when available instead of
requestAdapterInfo (#17051)
4ab91d4c4f is described below
commit 4ab91d4c4fb20aee02717b08f0597e06fb2675bd
Author: François Beaufort <[email protected]>
AuthorDate: Sat Jun 1 13:02:09 2024 +0200
Use adapter.info when available instead of requestAdapterInfo (#17051)
* Use adapter.info when available instead of requestAdapterInfo
* Update package.json
---
web/package.json | 2 +-
web/src/webgpu.ts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/web/package.json b/web/package.json
index a8a552f3fc..63aa63cd5a 100644
--- a/web/package.json
+++ b/web/package.json
@@ -25,7 +25,7 @@
"@types/node": "^20.4.5",
"@typescript-eslint/eslint-plugin": "^5.59.6",
"@typescript-eslint/parser": "^5.59.6",
- "@webgpu/types": "^0.1.40",
+ "@webgpu/types": "^0.1.42",
"eslint": "^8.41.0",
"jest": "^26.0.1",
"rollup": "^2.56.2",
diff --git a/web/src/webgpu.ts b/web/src/webgpu.ts
index 10d4aab643..bd8d236974 100644
--- a/web/src/webgpu.ts
+++ b/web/src/webgpu.ts
@@ -105,7 +105,7 @@ export async function detectGPUDevice():
Promise<GPUDeviceDetectOutput | undefin
requiredFeatures.push("shader-f16");
}
- const adapterInfo = await adapter.requestAdapterInfo();
+ const adapterInfo = adapter.info || await adapter.requestAdapterInfo();
const device = await adapter.requestDevice({
requiredLimits: {
maxBufferSize: requiredMaxBufferSize,