Open Mikolaj opened 1 year ago
@tomsmeding notes:
The data-reify package implements what we have taken to calling "global sharing". I believe Gill '09 does not discuss conversion from global sharing to local sharing, which hoas-conv implements in its Convert.hs. (It does the global sharing detection in Sharing.hs.) If anyone wants the Accelerate paper but doesn't have access, feel free to send me an email.
That would happen whenever a
Tensor
class code is instantiated to theAst
instance, in the same step that vectorization happens (I'm not sure how these two would interleave). This would transform any code written by the user from scratch, as well as any code we pretty-print, loosing sharing, and the user copy-pastes and feeds to GHC (perhaps in the same repl session, so any impurity needs to be re-entrant).I think this is really hard, but fortunately Tom says others did it already: