File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
clang/lib/Driver/ToolChains Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 2323#include " llvm/Support/FileSystem.h"
2424#include " llvm/Support/Path.h"
2525#include " llvm/TargetParser/TargetParser.h"
26+ #include " llvm/TargetParser/Triple.h"
2627
2728using namespace clang ::driver;
2829using namespace clang ::driver::toolchains;
@@ -283,7 +284,9 @@ void HIPAMDToolChain::addClangTargetOptions(
283284 DeviceOffloadingKind == Action::OFK_SYCL) &&
284285 " Only HIP and SYCL offloading kinds are supported for GPUs." );
285286
286- if (DeviceOffloadingKind != Action::OFK_SYCL)
287+ // If we are compiling SYCL kernels for Nvidia GPUs throuh HIP, we do not
288+ // support Cuda device code compatability, hence we do not allow Cuda mode.
289+ if (getTriple ().isNVPTX () && DeviceOffloadingKind != Action::OFK_SYCL)
287290 CC1Args.push_back (" -fcuda-is-device" );
288291
289292 if (!DriverArgs.hasFlag (options::OPT_fgpu_rdc, options::OPT_fno_gpu_rdc,
You can’t perform that action at this time.
0 commit comments