[Libomptarget][NFC] Clang format the AMDGPU plugin
Summary:
A previous patch did not format the plugin again after making changes.
Ensure that libomptarget stays formatted.
GitOrigin-RevId: b3335e8ed71618804c39e5cdd19b163ecdc92c26
diff --git a/libomptarget/plugins/amdgpu/src/rtl.cpp b/libomptarget/plugins/amdgpu/src/rtl.cpp
index 6b95756..5e6524e 100644
--- a/libomptarget/plugins/amdgpu/src/rtl.cpp
+++ b/libomptarget/plugins/amdgpu/src/rtl.cpp
@@ -1131,7 +1131,7 @@
(long long unsigned)(Elf64_Addr)HstPtr);
Err = DeviceInfo().freesignalpoolMemcpyD2H(HstPtr, TgtPtr, (size_t)Size,
- DeviceId);
+ DeviceId);
if (Err != HSA_STATUS_SUCCESS) {
DP("Error when copying data from device to host. Pointers: "
@@ -1495,8 +1495,8 @@
// under a multiple reader lock, not a writer lock.
static pthread_mutex_t HostcallInitLock = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_lock(&HostcallInitLock);
- uint64_t Buffer = hostrpc_assign_buffer(DeviceInfo().HSAAgents[DeviceId],
- Queue, DeviceId);
+ uint64_t Buffer = hostrpc_assign_buffer(
+ DeviceInfo().HSAAgents[DeviceId], Queue, DeviceId);
pthread_mutex_unlock(&HostcallInitLock);
if (!Buffer) {
DP("hostrpc_assign_buffer failed, gpu would dereference null and "
@@ -1858,7 +1858,7 @@
}
return DeviceInfo().freesignalpoolMemcpyH2D(StatePtr, &HostDeviceEnv,
- StatePtrSize, DeviceId);
+ StatePtrSize, DeviceId);
}
}
return HSA_STATUS_SUCCESS;
@@ -2114,7 +2114,8 @@
if (print_kernel_trace & STARTUP_DETAILS)
DP("Device#%-2d CU's: %2d %s\n", DeviceId,
- DeviceInfo().ComputeUnits[DeviceId], DeviceInfo().GPUName[DeviceId].c_str());
+ DeviceInfo().ComputeUnits[DeviceId],
+ DeviceInfo().GPUName[DeviceId].c_str());
// Query attributes to determine number of threads/block and blocks/grid.
uint16_t WorkgroupMaxDim[3];
@@ -2126,7 +2127,8 @@
RTLDeviceInfoTy::DefaultNumTeams);
} else if (WorkgroupMaxDim[0] <= RTLDeviceInfoTy::HardTeamLimit) {
DeviceInfo().GroupsPerDevice[DeviceId] = WorkgroupMaxDim[0];
- DP("Using %d ROCm blocks per grid\n", DeviceInfo().GroupsPerDevice[DeviceId]);
+ DP("Using %d ROCm blocks per grid\n",
+ DeviceInfo().GroupsPerDevice[DeviceId]);
} else {
DeviceInfo().GroupsPerDevice[DeviceId] = RTLDeviceInfoTy::HardTeamLimit;
DP("Max ROCm blocks per grid %d exceeds the hard team limit %d, capping "
@@ -2281,8 +2283,9 @@
return NULL;
{
- auto Env = DeviceEnvironment(DeviceId, DeviceInfo().NumberOfDevices,
- DeviceInfo().Env.DynamicMemSize, Image, ImgSize);
+ auto Env =
+ DeviceEnvironment(DeviceId, DeviceInfo().NumberOfDevices,
+ DeviceInfo().Env.DynamicMemSize, Image, ImgSize);
auto &KernelInfo = DeviceInfo().KernelInfoTable[DeviceId];
auto &SymbolInfo = DeviceInfo().SymbolInfoTable[DeviceId];
@@ -2439,8 +2442,8 @@
// If unified memory is present any target link variables
// can access host addresses directly. There is no longer a
// need for device copies.
- Err = DeviceInfo().freesignalpoolMemcpyH2D(Varptr, E->addr, sizeof(void *),
- DeviceId);
+ Err = DeviceInfo().freesignalpoolMemcpyH2D(Varptr, E->addr,
+ sizeof(void *), DeviceId);
if (Err != HSA_STATUS_SUCCESS)
DP("Error when copying USM\n");
DP("Copy linked variable host address (" DPxMOD ")"