MLIR index.cmp #1137
-
In the tutorial on low level IR in mojo there is this line:
I'm just a bit confused by #index<cmp_predicate, I found the syntax a bit random. I wanted to see if I can make structs as kind of wrappers around other MLIR dialects, but it's hard to generalize the tutorial when the syntax doesn't make sense to you. Can someone explain what the general idea is around the syntax here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The syntax within the backticks is the low-level raw MLIR syntax for the cmp_predicate enum in the index dialect. This is documented here: MLIR isn't super pretty about this, because it often gets sugared, e.g. at the operation level, but this needs to use the explicit syntax for it. |
Beta Was this translation helpful? Give feedback.
The syntax within the backticks is the low-level raw MLIR syntax for the cmp_predicate enum in the index dialect. This is documented here:
https://mlir.llvm.org/docs/Dialects/IndexOps/#indexcmp-indexcmpop
MLIR isn't super pretty about this, because it often gets sugared, e.g. at the operation level, but this needs to use the explicit syntax for it.