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
We can specialize certain functions like size(x) where x is a WgpuArray, lets say, and transpile them to xDims. This will be easier for julia users to adapt than a convention of invisible variable xDims.
Example use case: gId = xDims.x*gIdy + gIdx
Since xDims is a reference to user invisible constant defined by transpiler during compute block transpilation, it would be unintuitive for new users to adapt to such hidden conventions.
So it would be ideal to transpile size(x) -> xDims at every instance. This would also come with challenges like indexing into size(x) might fail and needs to handled during transpilation stage.
One solution would be have a seperate SizeExpr and define indexing transpile definitions.
The text was updated successfully, but these errors were encountered:
callExpr
function takes the function call and transpiles them to appropriate JL-WGSL IR format.WGPUTranspiler.jl/src/codegen/expr.jl
Lines 41 to 51 in f56bdfb
We can specialize certain functions like
size(x)
where x is a WgpuArray, lets say, and transpile them toxDims
. This will be easier for julia users to adapt than a convention of invisible variable xDims.Example use case:
gId = xDims.x*gIdy + gIdx
Since
xDims
is a reference to user invisible constant defined by transpiler during compute block transpilation, it would be unintuitive for new users to adapt to such hidden conventions.So it would be ideal to transpile
size(x)
->xDims
at every instance. This would also come with challenges like indexing intosize(x)
might fail and needs to handled during transpilation stage.One solution would be have a seperate
SizeExpr
and define indexing transpile definitions.The text was updated successfully, but these errors were encountered: