You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is discovered in Deno when using tensorflow.js with its WebGPU backend, when tfjs declares a function fn main after the entry point fn _start. The generated WGSL works in Chrome Canary 108.0.5329.0 (V8 10.8.79) but fails in Deno, error details at tensorflow/tfjs#6842 (comment).
Experiments in tensorflow/tfjs#6842 (comment) showed that in naga, invoked functions have to be declared literally before the entry point and the @compute directive.
This is discovered in Deno when using tensorflow.js with its WebGPU backend, when tfjs declares a function
fn main
after the entry pointfn _start
. The generated WGSL works in Chrome Canary 108.0.5329.0 (V8 10.8.79) but fails in Deno, error details at tensorflow/tfjs#6842 (comment).Experiments in tensorflow/tfjs#6842 (comment) showed that in naga, invoked functions have to be declared literally before the entry point and the
@compute
directive.The current WGSL specification (20220922) seems to have function scoping, replacing the lexical scoping back in 2020.
Given the generated script shader.wgsl, should the function
main
be available in scope when_start
is invoked?The text was updated successfully, but these errors were encountered: