-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No more workarounds for string ops (equality, concat).
- Motivation: - Originally, we intended to express string equality (like equality for any value type) through EwEqOp and string concatenation through EwConcatOp. - However, due to problems when instantiating elementwise binary kernels with the string value type, we introduced two new operations StringEqOp and ConcatOp as workarounds some while ago. - These workarounds are problematic in the long term because: - they are not consistent with the other elementwise unary/binary DaphneIR operations, and - in the future, we want to support more value types (through extensibility), which would require more workarounds of this kind - In fact, the underlying technical problem was fixed in a recent commit ("Guarded instantiation of unary/binary ops."). - This commit removes the workarounds for string ops by enabling string equality through EwEqOp (as for any other value type) and string concatenation through EwConcatOp. - Concrete changes: - DaphneDSL parser: - Creates EwEqOp and EwConcatOp instead of the workaround ops now. - DaphneIR: - Removed StringEqOp and ConcatOp, we use EwEqOp and EwConcatOp instead now. - DAPHNE compiler: - Removed constant folding of StringEqOp and ConcatOp, this functionality is now achieved through the constant folding of EwEqOp and EwConcatOp. - Removed the rewrite from EwEqOp to StringEqOp when the value type is string, we can use EwEqOp end-to-end now. - DAPHNE runtime: - Added a new binary op code CONCAT. - Specified that EQ and CONCAT should be supported on string value types. - Removed the stringEq and concat-kernels, their essential code was moved to the ewBinarySca-kernel. - Removed the instantiations of the stringEq and concat-kernels from kernels.json. - Added new instantiations of the ewBinary-kernels for string value type and the CONCAT op code to kernels.json. - test cases: - Removed the codegen test case "stringeq.mlir", since it became obsolete through the removal of StringEqOp.
- Loading branch information
Showing
11 changed files
with
46 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.