Skip to content

[WebGPU] Reserve additional keywords to avoid WGSL identifier collisions#18960

Open
akaashrp wants to merge 1 commit intoapache:mainfrom
akaashrp:codegen
Open

[WebGPU] Reserve additional keywords to avoid WGSL identifier collisions#18960
akaashrp wants to merge 1 commit intoapache:mainfrom
akaashrp:codegen

Conversation

@akaashrp
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the WebGPU code generator by reserving several WGSL keywords and access modes, such as "storage" and "read_write", to prevent name collisions during code generation. The reviewer suggests expanding this list to include a more comprehensive set of WGSL identifiers, including basic types and fundamental keywords like "fn" and "struct", to ensure greater robustness.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant