[webgpu] Use i32 as coords type in WGSL#5628
Conversation
2fbd478 to
4b8d5be
Compare
|
@qjia7 @haoyunfeix @xhcao @gyagp PTAL A comment, we can use
Then use getXXXAtOutCoordsByGlobalId(globalId , index) to get data. As to the option 1, it will save a vec3 in each program. As to the option 2, it will save some code changes. Current 1 is applied. |
cd0bbab to
d2c56ff
Compare
qjia7
left a comment
There was a problem hiding this comment.
I vote keeping globalId, localId's type as function parameter types. And do the corresponding cast as needed. And for others, we all unify to use i32 instead of u32 expect for dispatchSize. DispatchSize or numWorkGroups is similarly like globalId, localId which is u32 instead i32.
qjia7
left a comment
There was a problem hiding this comment.
Looks better, thanks. LGTM with two nits.
lina128
left a comment
There was a problem hiding this comment.
Thank you for the refactor, looks great!
Reviewable status:
complete! 2 of 1 approvals obtained (waiting on @axinging and @pyu10055)
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is