[llvm] [NVPTX] Support llvm.{exp2, log2} for f32/f16/bf16 and vectors (PR #120519)
Artem Belevich via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 13:21:52 PST 2024
================
@@ -94,6 +94,18 @@ static cl::opt<bool> UsePrecSqrtF32(
cl::desc("NVPTX Specific: 0 use sqrt.approx, 1 use sqrt.rn."),
cl::init(true));
+static cl::opt<bool> UseApproxExp2F32(
----------------
Artem-B wrote:
This could use a comment why it's enabled by default, but log2 isn't.
Something along the lines of:
```
Approximate exp2 is enabled by default to match existing CUDA behavior, which always uses `ex2.approx` instruction. This is not the case for `log2`, so it's disabled by default.
```
https://github.com/llvm/llvm-project/pull/120519
More information about the llvm-commits
mailing list