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
It seems that MultiBroadcastFusion is not fusing reads/writes in ClimaCore. Perhaps the compiler is unable to perform the optimization (these are pretty complicated expressions afterall). If the compiler is unable to fuse the reads and writes in a multi-broadcast fusion object, then we could try to write a function that manually does this by transforming the object.
Hm, I'm not sure how to hoist here without things inlined.. All of the reads/writes exist inside a single getindex call, but if hoisted reads/writes depend on all the reads to exist inside a single _broadcast_getindex call, then we'll need to transform the MBF object into a custom broadcasted object and have it return a tuple, like @dennisYatunin suggested.
Either way, this sort of transformation should guarantee avoiding duplicate reads/writes in the first case, and (hopefully) lead to fused reads/writes in the latter case.
The text was updated successfully, but these errors were encountered:
It seems that MultiBroadcastFusion is not fusing reads/writes in ClimaCore. Perhaps the compiler is unable to perform the optimization (these are pretty complicated expressions afterall). If the compiler is unable to fuse the reads and writes in a multi-broadcast fusion object, then we could try to write a function that manually does this by transforming the object.
Some important examples might include:
would be transformed to
and
transformed to
Hm, I'm not sure how to hoist here without things inlined.. All of the reads/writes exist inside a single
getindex
call, but if hoisted reads/writes depend on all the reads to exist inside a single_broadcast_getindex
call, then we'll need to transform the MBF object into a custom broadcasted object and have it return a tuple, like @dennisYatunin suggested.Either way, this sort of transformation should guarantee avoiding duplicate reads/writes in the first case, and (hopefully) lead to fused reads/writes in the latter case.
The text was updated successfully, but these errors were encountered: