[Openmp-commits] [PATCH] D141562: [OpenMP][DeviceRTL] Fix the support for tasking on the device
Shilei Tian via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Wed Jan 11 20:09:40 PST 2023
tianshilei1992 created this revision.
tianshilei1992 added reviewers: jdoerfert, jhuber6.
Herald added subscribers: kosarev, guansong, tpr, yaxunl.
Herald added a project: All.
tianshilei1992 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Herald added a project: OpenMP.
This patch fixes the support for tasking on the device.
Note: AMDGPU doesn't support it yet because of no support for `malloc` and `free`.
Fix #59946.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D141562
Files:
openmp/libomptarget/DeviceRTL/include/Interface.h
openmp/libomptarget/DeviceRTL/src/Tasking.cpp
Index: openmp/libomptarget/DeviceRTL/src/Tasking.cpp
===================================================================
--- openmp/libomptarget/DeviceRTL/src/Tasking.cpp
+++ openmp/libomptarget/DeviceRTL/src/Tasking.cpp
@@ -22,9 +22,11 @@
#pragma omp begin declare target device_type(nohost)
-TaskDescriptorTy *__kmpc_omp_task_alloc(IdentTy *, uint32_t, int32_t,
- uint64_t TaskSizeInclPrivateValues,
- uint64_t SharedValuesSize,
+extern "C" {
+
+TaskDescriptorTy *__kmpc_omp_task_alloc(IdentTy *, int32_t, int32_t,
+ size_t TaskSizeInclPrivateValues,
+ size_t SharedValuesSize,
TaskFnTy TaskFn) {
FunctionTracingRAII();
auto TaskSizeInclPrivateValuesPadded =
@@ -114,5 +116,6 @@
}
int omp_get_max_task_priority(void) { return 0; }
+}
#pragma omp end declare target
Index: openmp/libomptarget/DeviceRTL/include/Interface.h
===================================================================
--- openmp/libomptarget/DeviceRTL/include/Interface.h
+++ openmp/libomptarget/DeviceRTL/include/Interface.h
@@ -302,9 +302,9 @@
/// Tasking
///
///{
-TaskDescriptorTy *__kmpc_omp_task_alloc(IdentTy *, uint32_t, int32_t,
- uint32_t TaskSizeInclPrivateValues,
- uint32_t SharedValuesSize,
+TaskDescriptorTy *__kmpc_omp_task_alloc(IdentTy *, int32_t, int32_t,
+ size_t TaskSizeInclPrivateValues,
+ size_t SharedValuesSize,
TaskFnTy TaskFn);
int32_t __kmpc_omp_task(IdentTy *Loc, uint32_t TId,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141562.488460.patch
Type: text/x-patch
Size: 1800 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230112/4420b19a/attachment.bin>
More information about the Openmp-commits
mailing list