horde-ad
horde-ad copied to clipboard
Add a fusion trasformation partially inverse to vectorization
Once a program is fully vectorized and so no higher order operations remain except gather
, we should run a fusion transformation. However, the fusion should never create new higher order operations (except gather
), so it won't be able to fuse everything. It's interesting and not obvious how much can be fused given this restriction.
Edit: If we, additionally, performed AD on the Ast terms and not their Haskell interpretation, we would be able to fuse also the result of differentiation (and then interpret the Ast not necessarily in Haskell, but in MLIR for instance). However, this is requires investigations first and perhaps Ast would need to be extended (but vectorization not so, though fusion would).