[Binding][Codegen] Support PowOp
Closed this issue · 1 comments
chhzh123 commented
Current MLIR has two issues that prevent us from supporting PowOp in a clean way:
- The
math
dialect does not inherently support the power of integers. There is only amath.powf
operation. See the discussion here. - The
llvm
dialect has apowi
operation but it does not provide Python binding.
chhzh123 commented
The solution is to cast those input operands from integers to floating points and then cast them back from floating points to integers after the calculation.