- User Since
- Jan 17 2021, 11:49 AM (5 w, 6 d)
Jan 21 2021
Add BF16 to allowed FP types
Add lit tests for powf constant folding.
Add check to only fold the pow of halfs, floats, and doubles.
Jan 20 2021
Since MLIR is also handling tensors and vectors, I'm not entirely sure how this check would be implemented (i.e. the operands can't always be cast to FloatAttr). The function constFoldBinaryOp currently handles these cases, so we'd have to re-implement some of that logic. Does someone with more experience with the existing folders have any good ideas about this?
As far as I can tell they would lose precision on the conversion. It seems like LLVM avoids this by only folding halfs, floats, and doubles. We could do the same by checking the operand types first, which is probably the right solution.
Jan 19 2021
I do not have commit access (first-time contributor). Would a reviewer be able to commit this change?