Skip to content

Commit 7cd4e29

Browse files
authored
[AMD] Fixed FP convesion with RTZ rounding for GFX1250 (#8965)
* `rtz` conversion is always done with sw simulation
1 parent ec6b435 commit 7cd4e29

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

third_party/amd/lib/TritonAMDGPUToLLVM/ElementwiseOpToLLVM.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,8 @@ struct FpToFpOpConversion
19041904
(llvm::isa<Float16Type>(srcElementType)) ||
19051905
(llvm::isa<BFloat16Type>(srcElementType))) &&
19061906
((llvm::isa<Float8E4M3FNType>(dstElementType)) ||
1907-
(llvm::isa<Float8E5M2Type>(dstElementType)))) {
1907+
(llvm::isa<Float8E5M2Type>(dstElementType))) &&
1908+
((roundingMode.has_value()) && (*roundingMode != RoundingMode::RTZ))) {
19081909
numElements = 8;
19091910
useFP16IntermediateSrc = false;
19101911
}

0 commit comments

Comments
 (0)