Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transformation filtering API #1430

Open
tim0s opened this issue Nov 14, 2023 · 0 comments
Open

Transformation filtering API #1430

tim0s opened this issue Nov 14, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request transformations

Comments

@tim0s
Copy link
Contributor

tim0s commented Nov 14, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request transformations
Projects
None yet
Development

No branches or pull requests

2 participants