@@ -0,0 +1,80 @@
+//===-- State.cpp - OpenMP State & ICV interface - C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
https://github.com/shiltian edited
https://github.com/llvm/llvm-project/pull/69806
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,80 @@
+//===-- State.cpp - OpenMP State & ICV interface - C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,80 @@
+//===-- State.cpp - OpenMP State & ICV interface - C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -0,0 +1,80 @@
+//===-- State.cpp - OpenMP State & ICV interface - C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
@@ -36,6 +46,15 @@ extern "C" {
#pragma omp end declare variant
#ifdef __AMDGCN__
+#pragma omp begin declare variant match(
\
+device = {arch(amdgcn)},
\
+implementation
@@ -36,6 +46,15 @@ extern "C" {
#pragma omp end declare variant
#ifdef __AMDGCN__
+#pragma omp begin declare variant match(
\
+device = {arch(amdgcn)},
\
+implementation
https://github.com/jhuber6 commented:
I figured we would just have an internal implementation of `malloc` provided by
the OpenMP device runtime library. The variants make this more difficult, but
we could just use `#ifdef __AMDGPU__` instead of an OpenMP variant so we can
declare it as
@@ -0,0 +1,80 @@
+//===-- State.cpp - OpenMP State & ICV interface - C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier:
https://github.com/jhuber6 edited
https://github.com/llvm/llvm-project/pull/69806
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jdoerfert updated
https://github.com/llvm/llvm-project/pull/69806
>From f3e7e4008cc2acf9101721efd0b7c736b7d982c0 Mon Sep 17 00:00:00 2001
From: Johannes Doerfert
Date: Sat, 30 Sep 2023 23:37:28 -0700
Subject: [PATCH] [OpenMP] Basic BumpAllocator for (AMD)GPUs
The patch
https://github.com/jdoerfert updated
https://github.com/llvm/llvm-project/pull/69806
>From 70619108a402b01c5f1f9d307a8cf21289849d74 Mon Sep 17 00:00:00 2001
From: Johannes Doerfert
Date: Sat, 30 Sep 2023 23:37:28 -0700
Subject: [PATCH] [OpenMP] Basic BumpAllocator for (AMD)GPUs
The patch
@@ -15,9 +15,19 @@
#endif
#ifdef __cplusplus
+#include
jdoerfert wrote:
this is not freestanding
https://github.com/llvm/llvm-project/pull/69806
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
@@ -15,9 +15,19 @@
#endif
#ifdef __cplusplus
+#include
jhuber6 wrote:
I'm unsure if there's ever a reason to include the C++ wrappers in a
freestanding environment. Without C++, these go straight to the `clang`
resource directly. With the C++ versions
@@ -48,25 +48,17 @@ namespace {
extern "C" {
[[gnu::weak, gnu::leaf]] void *malloc(uint64_t Size);
[[gnu::weak, gnu::leaf]] void free(void *Ptr);
-}
-///}
+void *llvm_device_malloc(uint64_t Size) { return allocator::alloc(Size); }
+void llvm_device_free(void *Ptr) {
@@ -16,3 +16,4 @@ free
memcmp
printf
__assert_fail
+malloc
jhuber6 wrote:
This is already in the file
https://github.com/llvm/llvm-project/pull/69806
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://github.com/jdoerfert updated
https://github.com/llvm/llvm-project/pull/69806
>From 50807ba3714b5556e9971f3f009fbd8bea70e15f Mon Sep 17 00:00:00 2001
From: Johannes Doerfert
Date: Sat, 30 Sep 2023 23:37:28 -0700
Subject: [PATCH] [OpenMP] Basic BumpAllocator for (AMD)GPUs
The patch
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 1cea309b7e2256746c72f3177e1a5b226bed4f83
d30ff2ef5df686c99184eec7caf175371694cd2d --
https://github.com/jdoerfert updated
https://github.com/llvm/llvm-project/pull/69806
>From d0df9cbcb01528760c45898891e175f915dddbb1 Mon Sep 17 00:00:00 2001
From: Johannes Doerfert
Date: Sat, 30 Sep 2023 23:37:28 -0700
Subject: [PATCH] [OpenMP] Basic BumpAllocator for (AMD)GPUs
The patch
llvmbot wrote:
@llvm/pr-subscribers-openmp
Author: Johannes Doerfert (jdoerfert)
Changes
The patch contains a basic BumpAllocator for (AMD)GPUs to allow us to run more
tests. The allocator implements `malloc`, both internally and externally, while
we continue to default to the NVIDIA
https://github.com/jdoerfert created
https://github.com/llvm/llvm-project/pull/69806
The patch contains a basic BumpAllocator for (AMD)GPUs to allow us to run more
tests. The allocator implements `malloc`, both internally and externally, while
we continue to default to the NVIDIA `malloc`
21 matches
Mail list logo