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 f498cef930 [WebGPU] Update error messages to be more user-friendly 
(#17021)
f498cef930 is described below

commit f498cef9306d38c3e6ee0ad3de8ea30cf01d1936
Author: Nestor Qin <[email protected]>
AuthorDate: Sat May 25 08:05:30 2024 -0400

    [WebGPU] Update error messages to be more user-friendly (#17021)
---
 web/src/webgpu.ts | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/web/src/webgpu.ts b/web/src/webgpu.ts
index 8d699c4c48..10d4aab643 100644
--- a/web/src/webgpu.ts
+++ b/web/src/webgpu.ts
@@ -37,7 +37,12 @@ export async function detectGPUDevice(): 
Promise<GPUDeviceDetectOutput | undefin
   if (typeof navigator !== "undefined" && navigator.gpu !== undefined) {
     const adapter = await navigator.gpu.requestAdapter({ "powerPreference": 
"high-performance" });
     if (adapter == null) {
-      throw Error("Cannot find adapter that matches the request");
+      throw Error(
+        "Unable to find a compatible GPU. This issue might be because your 
computer doesn't have a GPU, or your system settings are not configured 
properly. " +
+          "Please check if your device has a GPU properly set up and if your 
your browser supports WebGPU. " +
+          "You can also consult your browser's compatibility chart to see if 
it supports WebGPU. " +
+          "For more information about WebGPU support in your browser, visit 
https://webgpureport.org/";
+      );
     }
     const computeMB = (value: number) => {
       return Math.ceil(value / (1 << 20)) + "MB";

Reply via email to