[llvm] [AMDGPU][Offload] Enable memory manager use for up to ~3GB allocation size in omp_target_alloc (PR #151882)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 3 12:01:18 PDT 2025
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 HEAD~1 HEAD --extensions c,h,cpp -- offload/test/sanitizer/use_after_free_3.c offload/plugins-nextgen/amdgpu/src/rtl.cpp offload/plugins-nextgen/common/include/PluginInterface.h offload/plugins-nextgen/common/src/PluginInterface.cpp offload/test/sanitizer/use_after_free_2.c
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/offload/test/sanitizer/use_after_free_3.c b/offload/test/sanitizer/use_after_free_3.c
index fd77cff0d..9d8861433 100644
--- a/offload/test/sanitizer/use_after_free_3.c
+++ b/offload/test/sanitizer/use_after_free_3.c
@@ -15,7 +15,7 @@ int main() {
int N = (1 << 30);
char *A = (char *)malloc(N);
char *P;
-#pragma omp target map(A[:N]) map(from : P)
+#pragma omp target map(A[ : N]) map(from : P)
{
P = &A[N / 2];
*P = 3;
@@ -27,7 +27,9 @@ int main() {
// CHECK: Last allocation of size 1073741824
// clang-format on
#pragma omp target
- { *P = 5; }
+ {
+ *P = 5;
+ }
// CHECK-PASS: PASS
printf("PASS\n");
``````````
</details>
https://github.com/llvm/llvm-project/pull/151882
More information about the llvm-commits
mailing list