Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[js/webgpu] add label for some webgpu APIs (#17291)
### Description <!-- Describe your changes. --> With the label, it's more easier to identify which op causes the error. Without the label, the error message is like below: ``` Tint WGSL reader failure: :12:5 error: return statement type must match its function return type, returned 'vec4<f32>', expected 'f32' return W[i2o_W(indices)]; ^^^^^^ - While validating [ShaderModuleDescriptor] - While calling [Device].CreateShaderModule([ShaderModuleDescriptor]). ``` With the label, the error message is like below: ``` Tint WGSL reader failure: :12:5 error: return statement type must match its function return type, returned 'vec4<f32>', expected 'f32' return W[i2o_W(indices)]; ^^^^^^ - While validating [ShaderModuleDescriptor "ConvTranspose2D"] - While calling [Device].CreateShaderModule([ShaderModuleDescriptor "ConvTranspose2D"]). ``` ### Motivation and Context This change is mainly for debugging. With this change, we can easily know that `ConvTranspose2D`'s shader has problem from above message.
- Loading branch information