[llvm] [LLVM][NVPTX]Add BF16 vector instruction and fix lowering rules (PR #69415)
Han Shen via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 19 00:31:16 PDT 2023
================
@@ -629,7 +657,7 @@ let hasSideEffects = false in {
ToType, ".bf16 \t$dst, $src;"), []>,
Requires<!if(!eq(ToType, "f32"),
// bf16->f32 was introduced early.
- [hasPTX<71>, hasSM<80>],
+ [hasPTX<70>, hasSM<80>],
----------------
shenh10 wrote:
However, the constraint here won't eliminate the generation of cvt.f32.bf16. Do you think we should instead constraint it in hasBF16Math constraint? Though it is not that rigorous but without bf16->f32 cast it's meaningless to support other instruction though.
```cpp
bool hasBF16Math() const { return SmVersion >= 80 && PTXVersion >= 71; }
```
https://github.com/llvm/llvm-project/pull/69415
More information about the llvm-commits
mailing list