Skip to content

Commit

Permalink
[SYCL] Disable FP16 support check for SYCL CUDA BE
Browse files Browse the repository at this point in the history
Disable check for SYCL CUDA BE until FP16 support is properly
reported there (issue#1799)
  • Loading branch information
vladimirlaz committed Jun 3, 2020
1 parent 55957ad commit a4f4fa9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion clang/lib/Sema/Sema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,12 @@ void Sema::checkDeviceDecl(const ValueDecl *D, SourceLocation Loc) {
if (Ty->isDependentType())
return;

if ((Ty->isFloat16Type() && !Context.getTargetInfo().hasFloat16Type()) ||
auto IsSYCLDeviceCuda = getLangOpts().SYCLIsDevice &&
Context.getTargetInfo().getTriple().isNVPTX();
if ((Ty->isFloat16Type() && !Context.getTargetInfo().hasFloat16Type() &&
// Disable check for SYCL CUDA BE until FP16 support is properly
// reported there (issue#1799)
!IsSYCLDeviceCuda) ||
((Ty->isFloat128Type() ||
(Ty->isRealFloatingType() && Context.getTypeSize(Ty) == 128)) &&
!Context.getTargetInfo().hasFloat128Type()) ||
Expand Down

0 comments on commit a4f4fa9

Please sign in to comment.