(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: "
// 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 "
}
return DeviceInfo().freesignalpoolMemcpyH2D(StatePtr, &HostDeviceEnv,
- StatePtrSize, DeviceId);
+ StatePtrSize, DeviceId);
}
}
return HSA_STATUS_SUCCESS;
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];
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 "
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];
// 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 ")"