Transformation filtering API
- Dominant language
- Python
- Stars
- 593
- Forks
- 163
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 60
Description
When applying DaCe optimizations it would be helpful to filter out certain classes of transformations, i.e., if I intend to run the resulting program on a CPU it would be nice if I could avoid transformations that will lead to GPU code showing up. Similarly, I might only be interested in tranformations which do not alter the semantics of the input program.
Intuitively one might think to just not apply transformations which names start with GPU or FPGA, but this seems not sufficient, as there exists a transformation CopyToDevice.
Suggestion:
Define properties of transformations, such as:
T.isSemanticPreserving() -- returns True if the transformation is intended to preserve the semantics (with regards to outputs) of all input programs
T.needsDeviceType(dace.device.GPU) -- returns True if the transformation might lead to code which requires a device of the specified type in order to run for any input program which did not need such a device
Alternatives:
An alternative or complementary approach would be to rework the transformation naming scheme, i.e., every transformation which needs an FPGA starts with FPGA. Semantic-preserving transformations have a _strict in their name.
Contributor guide
Assessment
This issue has not been assessed yet.