Skip to content

Commit a4f4fa9

Browse files
committed
[SYCL] Disable FP16 support check for SYCL CUDA BE
Disable check for SYCL CUDA BE until FP16 support is properly reported there (issue#1799)
1 parent 55957ad commit a4f4fa9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

clang/lib/Sema/Sema.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,12 @@ void Sema::checkDeviceDecl(const ValueDecl *D, SourceLocation Loc) {
17531753
if (Ty->isDependentType())
17541754
return;
17551755

1756-
if ((Ty->isFloat16Type() && !Context.getTargetInfo().hasFloat16Type()) ||
1756+
auto IsSYCLDeviceCuda = getLangOpts().SYCLIsDevice &&
1757+
Context.getTargetInfo().getTriple().isNVPTX();
1758+
if ((Ty->isFloat16Type() && !Context.getTargetInfo().hasFloat16Type() &&
1759+
// Disable check for SYCL CUDA BE until FP16 support is properly
1760+
// reported there (issue#1799)
1761+
!IsSYCLDeviceCuda) ||
17571762
((Ty->isFloat128Type() ||
17581763
(Ty->isRealFloatingType() && Context.getTypeSize(Ty) == 128)) &&
17591764
!Context.getTargetInfo().hasFloat128Type()) ||

0 commit comments

Comments
 (0)