daphne-eu / daphne

DAPHNE: An Open and Extensible System Infrastructure for Integrated Data Analysis Pipelines
Apache License 2.0
68 stars 62 forks source link

Simplification rewrites for elementwise unary minus (additive inverse) #774

Closed pdamme closed 3 months ago

pdamme commented 4 months ago

DaphneDSL supports the elementwise additive inverse through the typical unary minus operator:

X = [1.1, 2.2, 3.3];
print(-X);

Internally, this operation is represented as a EwMinusOp in DaphneIR.

Task: This task is to add typical simplifications of this operation to the DAPHNE compiler, such as:

Overall, such simplications can make the IR simpler and more readable, unlock further simplifications of consuming operations, and reduce the computational effort at run-time.

Hints:

ldirry commented 4 months ago

Hello, please assign me to this issue and #775 .

pdamme commented 4 months ago

Thanks for your interest. Sure, go ahead!