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 ad65d9fb15 [WebGPU] Reserve additional keywords to avoid WGSL 
identifier collisions (#18960)
ad65d9fb15 is described below

commit ad65d9fb15c8fc2f3afa03710946cd04c67475c8
Author: Akaash Parthasarathy <[email protected]>
AuthorDate: Thu Apr 2 14:16:42 2026 -0400

    [WebGPU] Reserve additional keywords to avoid WGSL identifier collisions 
(#18960)
    
    Compiling Qwen3.5 yielded WGSL of the following form: `var<storage,
    read_write> storage : array<f32>;
    `. This led to a 'cyclic dependency' error due to the identifier
    collision. This PR reserves keywords such as storage to avoid parsing
    errors.
---
 src/target/source/codegen_webgpu.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/target/source/codegen_webgpu.cc 
b/src/target/source/codegen_webgpu.cc
index 25a691659e..ae4c93e80c 100644
--- a/src/target/source/codegen_webgpu.cc
+++ b/src/target/source/codegen_webgpu.cc
@@ -130,6 +130,13 @@ runtime::FunctionInfo CodeGenWebGPU::AddFunction(const 
PrimFunc& f, bool skip_re
   name_supply_->ReserveName("let");
   name_supply_->ReserveName("const");
   name_supply_->ReserveName("std");
+  name_supply_->ReserveName("storage");
+  name_supply_->ReserveName("uniform");
+  name_supply_->ReserveName("workgroup");
+  name_supply_->ReserveName("private");
+  name_supply_->ReserveName("function");
+  name_supply_->ReserveName("read");
+  name_supply_->ReserveName("read_write");
 
   // skip the first underscore, so SSA variable starts from
   name_supply_->FreshName("v_");

Reply via email to