[Openmp-commits] [PATCH] D95133: [OpenMP] Fix failing test due to change in offloading flags
Joseph Huber via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Thu Jan 21 07:05:41 PST 2021
jhuber6 created this revision.
jhuber6 added a reviewer: jdoerfert.
jhuber6 added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
jhuber6 requested review of this revision.
Herald added subscribers: openmp-commits, sstefan1.
Prior to D91261 <https://reviews.llvm.org/D91261> the information checked the OMP_MAP_TARGET_PARAM flag, change this as it has been removed. Also stop the CUDA information from being printed at every information level.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D95133
Files:
openmp/libomptarget/plugins/cuda/src/rtl.cpp
openmp/libomptarget/src/private.h
Index: openmp/libomptarget/src/private.h
===================================================================
--- openmp/libomptarget/src/private.h
+++ openmp/libomptarget/src/private.h
@@ -142,7 +142,7 @@
type = "private";
else if (ArgTypes[i] & OMP_TGT_MAPTYPE_LITERAL)
type = "firstprivate";
- else if (ArgTypes[i] & OMP_TGT_MAPTYPE_TARGET_PARAM && ArgSizes[i] != 0)
+ else if (ArgSizes[i] != 0)
type = "alloc";
else
type = "use_address";
Index: openmp/libomptarget/plugins/cuda/src/rtl.cpp
===================================================================
--- openmp/libomptarget/plugins/cuda/src/rtl.cpp
+++ openmp/libomptarget/plugins/cuda/src/rtl.cpp
@@ -580,11 +580,12 @@
DeviceData[DeviceId].BlocksPerGrid = EnvTeamLimit;
}
- INFO(DeviceId,
- "Device supports up to %d CUDA blocks and %d threads with a "
- "warp size of %d\n",
- DeviceData[DeviceId].BlocksPerGrid,
- DeviceData[DeviceId].ThreadsPerBlock, DeviceData[DeviceId].WarpSize);
+ if (getDebugLevel() || (getInfoLevel() & OMP_INFOTYPE_PLUGIN_KERNEL))
+ INFO(DeviceId,
+ "Device supports up to %d CUDA blocks and %d threads with a "
+ "warp size of %d\n",
+ DeviceData[DeviceId].BlocksPerGrid,
+ DeviceData[DeviceId].ThreadsPerBlock, DeviceData[DeviceId].WarpSize);
// Set default number of teams
if (EnvNumTeams > 0) {
@@ -1004,14 +1005,15 @@
CudaBlocksPerGrid = TeamNum;
}
- INFO(DeviceId,
- "Launching kernel %s with %d blocks and %d threads in %s "
- "mode\n",
- (getOffloadEntry(DeviceId, TgtEntryPtr))
- ? getOffloadEntry(DeviceId, TgtEntryPtr)->name
- : "(null)",
- CudaBlocksPerGrid, CudaThreadsPerBlock,
- (KernelInfo->ExecutionMode == SPMD) ? "SPMD" : "Generic");
+ if (getDebugLevel() || (getInfoLevel() & OMP_INFOTYPE_PLUGIN_KERNEL))
+ INFO(DeviceId,
+ "Launching kernel %s with %d blocks and %d threads in %s "
+ "mode\n",
+ (getOffloadEntry(DeviceId, TgtEntryPtr))
+ ? getOffloadEntry(DeviceId, TgtEntryPtr)->name
+ : "(null)",
+ CudaBlocksPerGrid, CudaThreadsPerBlock,
+ (KernelInfo->ExecutionMode == SPMD) ? "SPMD" : "Generic");
CUstream Stream = getStream(DeviceId, AsyncInfo);
Err = cuLaunchKernel(KernelInfo->Func, CudaBlocksPerGrid, /* gridDimY */ 1,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95133.318189.patch
Type: text/x-patch
Size: 2471 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210121/8f3950e4/attachment.bin>
More information about the Openmp-commits
mailing list