[clang] [llvm] [Offload][CUDA] Add initial cuda_runtime.h overlay (PR #94821)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 7 17:14:24 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff bd815a54899d7fa83f6fb49d86c417e1e2e4d2ef 6a6809a50ac35e12416eb0602bdb18189c3054f3 -- clang/lib/Headers/llvm_offload_wrappers/__llvm_offload.h clang/lib/Headers/llvm_offload_wrappers/__llvm_offload_device.h clang/lib/Headers/llvm_offload_wrappers/__llvm_offload_host.h clang/lib/Headers/llvm_offload_wrappers/cuda_runtime.h offload/src/KernelLanguage/API.cpp clang/lib/CodeGen/CGCUDANV.cpp clang/lib/Driver/Driver.cpp clang/lib/Driver/ToolChains/Clang.cpp clang/lib/Driver/ToolChains/CommonArgs.cpp clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h clang/lib/Sema/SemaCUDA.cpp offload/include/Shared/APITypes.h offload/include/omptarget.h offload/plugins-nextgen/amdgpu/src/rtl.cpp offload/plugins-nextgen/common/src/PluginInterface.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/offload/src/KernelLanguage/API.cpp b/offload/src/KernelLanguage/API.cpp
index e3c75ab67c..7b8e43e68e 100644
--- a/offload/src/KernelLanguage/API.cpp
+++ b/offload/src/KernelLanguage/API.cpp
@@ -8,7 +8,6 @@
//
//===----------------------------------------------------------------------===//
-
#include "Shared/APITypes.h"
#include <cstdio>
@@ -45,7 +44,7 @@ unsigned __llvmPushCallConfiguration(dim3 __grid_size, dim3 __block_size,
unsigned __llvmPopCallConfiguration(dim3 *__grid_size, dim3 *__block_size,
size_t *__shared_memory, void *__stream) {
- __omp_kernel_t &__kernel = __current_kernel;
+ __omp_kernel_t &__kernel = __current_kernel;
*__grid_size = __kernel.__grid_size;
*__block_size = __kernel.__block_size;
*__shared_memory = __kernel.__shared_memory;
@@ -69,8 +68,7 @@ unsigned llvmLaunchKernel(const void *func, dim3 gridDim, dim3 blockDim,
Args.ThreadLimit[2] = blockDim.z;
Args.ArgPtrs = &args;
Args.Flags.IsCUDA = true;
- int rv = __tgt_target_kernel(nullptr, 0, gridDim.x,
- blockDim.x, func, &Args);
+ int rv = __tgt_target_kernel(nullptr, 0, gridDim.x, blockDim.x, func, &Args);
return rv;
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/94821
More information about the llvm-commits
mailing list