[all-commits] [llvm/llvm-project] 8f8016: [NVPTX] Add patterns for fma.relu.{f16|f16x2|bf16|...
Hugh Delaney via All-commits
all-commits at lists.llvm.org
Mon Nov 18 07:29:39 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8f8016fe66dd260b03a4d1c2b50636e36e02942b
https://github.com/llvm/llvm-project/commit/8f8016fe66dd260b03a4d1c2b50636e36e02942b
Author: Hugh Delaney <hugh.delaney at codeplay.com>
Date: 2024-11-18 (Mon, 18 Nov 2024)
Changed paths:
M llvm/lib/Target/NVPTX/NVPTXInstrInfo.td
A llvm/test/CodeGen/NVPTX/fma-relu-contract.ll
A llvm/test/CodeGen/NVPTX/fma-relu-fma-intrinsic.ll
A llvm/test/CodeGen/NVPTX/fma-relu-instruction-flag.ll
Log Message:
-----------
[NVPTX] Add patterns for fma.relu.{f16|f16x2|bf16|bf16x2} (#114977)
Add patterns to lower `fmaxnum(fma(a, b, c), 0)` to `fma.rn{.ftz}.relu`
for `f16`, `f16x2`, `bf16`, `bf16x2` types, when `nnan` is used.
`fma_relu` honours `NaN`, so the substitution is only made if the `fma`
is `nnan`, since `fmaxnum` returns the non NaN argument when passed a
NaN value.
This patch also removes some `bf16` ftz instructions since `FTZ` is not
supported with the `bf16` type, according to the PTX ISA docs.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list