dace
dace copied to clipboard
Fine-grained delegation of reads and writes in codegen
We currently emit code to read or write a variable in many different places, across many different codegens.
In order to promote reuse of code across codegens, I propose that every time a variable is read or written, this is consistently delegated to the currently active codegen (e.g., codegen.generate_read and codegen.generate_write). This way, it is less likely that a larger segment of the codegen (e.g., generate_Tasklet) needs to be specialized for a specific target, because how variables are read and written is often the only (or one of the only) differences between them.