[clang] [NFC][HIP] Disable device-side kernel launches for HIP (PR #171043)
Alex Voicu via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 7 14:20:35 PST 2025
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/171043
>From c145482119e3f3f93dce9f8f013bd78b7de7fb4b Mon Sep 17 00:00:00 2001
From: Alex Voicu <alexandru.voicu at amd.com>
Date: Sun, 7 Dec 2025 15:02:20 +0000
Subject: [PATCH] Disable device-side kernel launches for HIP
---
clang/lib/CodeGen/CGExprCXX.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp
index ce2ed9026fa1f..3f4f61db8d3a4 100644
--- a/clang/lib/CodeGen/CGExprCXX.cpp
+++ b/clang/lib/CodeGen/CGExprCXX.cpp
@@ -504,7 +504,8 @@ RValue CodeGenFunction::EmitCUDAKernelCallExpr(const CUDAKernelCallExpr *E,
ReturnValueSlot ReturnValue,
llvm::CallBase **CallOrInvoke) {
// Emit as a device kernel call if CUDA device code is to be generated.
- if (getLangOpts().CUDAIsDevice)
+ // TODO: implement for HIP
+ if (!getLangOpts().HIP && getLangOpts().CUDAIsDevice)
return CGM.getCUDARuntime().EmitCUDADeviceKernelCallExpr(
*this, E, ReturnValue, CallOrInvoke);
return CGM.getCUDARuntime().EmitCUDAKernelCallExpr(*this, E, ReturnValue,
More information about the cfe-commits
mailing list