This patch adds constant folder for ExpM1Op which only supports single and double precision floating-point.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Windows build error seems relevant. I suspect some underlying implementation differs across platforms.
Comment Actions
I found that the result of expm1(4.0) is 53.5981483 on Windows but 53.5981522 on Linux. Any good advice? Or just change to a nother number case?
Comment Actions
I'd just drop it. I am generally skeptical about the utility of tests with hardcoded numbers that cannot be easily verifiable with pen an paper. The only thing that we need to verify here is that applies to a the vector elementwise, which should be visible from a denes<[1.0, 0.0, 1.0]> just fine.
mlir/test/Dialect/Math/canonicalize.mlir | ||
---|---|---|
278 | you could use a regex to match fewer decimal places if it varies too much across platforms (adding a float matching feature to FileCheck is also highly-requested) |
you could use a regex to match fewer decimal places if it varies too much across platforms (adding a float matching feature to FileCheck is also highly-requested)