Lines Matching refs:DeviceInfo
1119 static RTLDeviceInfoTy &DeviceInfo() { return DeviceInfoState; } in DeviceInfo() function
1126 assert(DeviceId < DeviceInfo().NumberOfDevices && "Device ID too large"); in dataRetrieve()
1135 Err = DeviceInfo().freesignalpoolMemcpyD2H(HstPtr, TgtPtr, (size_t)Size, in dataRetrieve()
1154 assert(DeviceId < DeviceInfo().NumberOfDevices && "Device ID too large"); in dataSubmit()
1162 Err = DeviceInfo().freesignalpoolMemcpyH2D(TgtPtr, HstPtr, (size_t)Size, in dataSubmit()
1383 auto &KernelInfoTable = DeviceInfo().KernelInfoTable; in runRegionLocked()
1393 KernelInfoEntry.group_segment_size + DeviceInfo().Env.DynamicMemSize; in runRegionLocked()
1405 getLaunchVals(DeviceInfo().WarpSize[DeviceId], DeviceInfo().Env, in runRegionLocked()
1410 DeviceInfo().NumTeams[KernelInfo->DeviceId]); in runRegionLocked()
1431 hsa_queue_t *Queue = DeviceInfo().HSAQueueSchedulers[DeviceId].next(); in runRegionLocked()
1494 if (__atomic_load_n(&DeviceInfo().HostcallRequired, __ATOMIC_ACQUIRE)) { in runRegionLocked()
1499 uint64_t Buffer = hostrpc_assign_buffer(DeviceInfo().HSAAgents[DeviceId], in runRegionLocked()
1533 hsa_signal_t S = DeviceInfo().FreeSignalPool.pop(); in runRegionLocked()
1555 DeviceInfo().FreeSignalPool.push(S); in runRegionLocked()
1749 DeviceInfo().HSAAgents[DeviceId], L, static_cast<void *>(&Cb), in moduleRegisterFromMemoryToPlace()
1845 auto &SymbolInfo = DeviceInfo().SymbolInfoTable[DeviceId]; in afterLoading()
1861 return DeviceInfo().freesignalpoolMemcpyH2D(StatePtr, &HostDeviceEnv, in afterLoading()
1872 hsa_amd_memory_pool_t MemoryPool = DeviceInfo().getDeviceMemoryPool(DeviceId); in implCalloc()
1899 return hsa_amd_agents_allow_access(DeviceInfo().HSAAgents.size(), in allow_access_to_all_gpu_agents()
1900 &DeviceInfo().HSAAgents[0], NULL, Ptr); in allow_access_to_all_gpu_agents()
1922 DeviceInfo().TargetID.push_back(TripleTargetID.ltrim('-').str()); in GetIsaInfo()
2040 hsa_agent_t agent = DeviceInfo().HSAAgents[DeviceId]; in __tgt_rtl_is_valid_binary_info()
2046 if (!IsImageCompatibleWithEnv(info->Arch, DeviceInfo().TargetID[DeviceId])) in __tgt_rtl_is_valid_binary_info()
2059 if (DeviceInfo().ConstructionSucceeded) { in __tgt_rtl_number_of_devices()
2060 return DeviceInfo().NumberOfDevices; in __tgt_rtl_number_of_devices()
2068 DeviceInfo().RequiresFlags = RequiresFlags; in __tgt_rtl_init_requires()
2081 hsa_agent_t Agent = DeviceInfo().HSAAgents[DeviceId]; in __tgt_rtl_init_device()
2089 DeviceInfo().ComputeUnits[DeviceId] = 1; in __tgt_rtl_init_device()
2092 DeviceInfo().ComputeUnits[DeviceId] = ComputeUnits; in __tgt_rtl_init_device()
2093 DP("Using %d compute unis per grid\n", DeviceInfo().ComputeUnits[DeviceId]); in __tgt_rtl_init_device()
2100 DeviceInfo().GPUName[DeviceId] = "--unknown gpu--"; in __tgt_rtl_init_device()
2102 DeviceInfo().GPUName[DeviceId] = GetInfoName; in __tgt_rtl_init_device()
2107 DeviceInfo().ComputeUnits[DeviceId], DeviceInfo().GPUName[DeviceId].c_str()); in __tgt_rtl_init_device()
2114 DeviceInfo().GroupsPerDevice[DeviceId] = RTLDeviceInfoTy::DefaultNumTeams; in __tgt_rtl_init_device()
2118 DeviceInfo().GroupsPerDevice[DeviceId] = WorkgroupMaxDim[0]; in __tgt_rtl_init_device()
2119 DP("Using %d ROCm blocks per grid\n", DeviceInfo().GroupsPerDevice[DeviceId]); in __tgt_rtl_init_device()
2121 DeviceInfo().GroupsPerDevice[DeviceId] = RTLDeviceInfoTy::HardTeamLimit; in __tgt_rtl_init_device()
2131 DeviceInfo().ThreadsPerGroup[DeviceId] = in __tgt_rtl_init_device()
2133 DeviceInfo().GroupsPerDevice[DeviceId]; in __tgt_rtl_init_device()
2135 if (DeviceInfo().ThreadsPerGroup[DeviceId] == 0) { in __tgt_rtl_init_device()
2136 DeviceInfo().ThreadsPerGroup[DeviceId] = RTLDeviceInfoTy::MaxWgSize; in __tgt_rtl_init_device()
2138 } else if (enforceUpperBound(&DeviceInfo().ThreadsPerGroup[DeviceId], in __tgt_rtl_init_device()
2143 DeviceInfo().ThreadsPerGroup[DeviceId]); in __tgt_rtl_init_device()
2146 DeviceInfo().ThreadsPerGroup[DeviceId] = RTLDeviceInfoTy::MaxWgSize; in __tgt_rtl_init_device()
2157 DeviceInfo().WarpSize[DeviceId] = WavefrontSize; in __tgt_rtl_init_device()
2161 DeviceInfo().WarpSize[DeviceId] = 64; in __tgt_rtl_init_device()
2166 if (DeviceInfo().Env.TeamLimit > 0 && in __tgt_rtl_init_device()
2167 (enforceUpperBound(&DeviceInfo().GroupsPerDevice[DeviceId], in __tgt_rtl_init_device()
2168 DeviceInfo().Env.TeamLimit))) { in __tgt_rtl_init_device()
2170 DeviceInfo().Env.TeamLimit); in __tgt_rtl_init_device()
2174 if (DeviceInfo().Env.NumTeams > 0) { in __tgt_rtl_init_device()
2175 DeviceInfo().NumTeams[DeviceId] = DeviceInfo().Env.NumTeams; in __tgt_rtl_init_device()
2177 DeviceInfo().Env.NumTeams); in __tgt_rtl_init_device()
2185 DeviceInfo().NumTeams[DeviceId] = in __tgt_rtl_init_device()
2186 TeamsPerCU * DeviceInfo().ComputeUnits[DeviceId]; in __tgt_rtl_init_device()
2188 TeamsPerCU, DeviceInfo().ComputeUnits[DeviceId]); in __tgt_rtl_init_device()
2191 if (enforceUpperBound(&DeviceInfo().NumTeams[DeviceId], in __tgt_rtl_init_device()
2192 DeviceInfo().GroupsPerDevice[DeviceId])) { in __tgt_rtl_init_device()
2194 DeviceInfo().GroupsPerDevice[DeviceId]); in __tgt_rtl_init_device()
2198 if (DeviceInfo().Env.TeamThreadLimit > 0 && in __tgt_rtl_init_device()
2199 (enforceUpperBound(&DeviceInfo().NumThreads[DeviceId], in __tgt_rtl_init_device()
2200 DeviceInfo().Env.TeamThreadLimit))) { in __tgt_rtl_init_device()
2202 DeviceInfo().Env.TeamThreadLimit); in __tgt_rtl_init_device()
2206 DeviceInfo().NumThreads[DeviceId] = RTLDeviceInfoTy::DefaultWgSize; in __tgt_rtl_init_device()
2209 if (enforceUpperBound(&DeviceInfo().NumThreads[DeviceId], in __tgt_rtl_init_device()
2210 DeviceInfo().ThreadsPerGroup[DeviceId])) { in __tgt_rtl_init_device()
2212 DeviceInfo().ThreadsPerGroup[DeviceId]); in __tgt_rtl_init_device()
2216 DeviceId, DeviceInfo().GroupsPerDevice[DeviceId], in __tgt_rtl_init_device()
2217 DeviceInfo().ThreadsPerGroup[DeviceId]); in __tgt_rtl_init_device()
2220 DeviceInfo().WarpSize[DeviceId], DeviceInfo().ThreadsPerGroup[DeviceId], in __tgt_rtl_init_device()
2221 DeviceInfo().GroupsPerDevice[DeviceId], in __tgt_rtl_init_device()
2222 DeviceInfo().GroupsPerDevice[DeviceId] * in __tgt_rtl_init_device()
2223 DeviceInfo().ThreadsPerGroup[DeviceId]); in __tgt_rtl_init_device()
2233 DeviceInfo().LoadRunLock.lock(); in __tgt_rtl_load_binary()
2235 DeviceInfo().LoadRunLock.unlock(); in __tgt_rtl_load_binary()
2265 DeviceInfo().clearOffloadEntriesTable(DeviceId); in __tgt_rtl_load_binary_locked()
2274 auto Env = DeviceEnvironment(DeviceId, DeviceInfo().NumberOfDevices, in __tgt_rtl_load_binary_locked()
2275 DeviceInfo().Env.DynamicMemSize, Image, ImgSize); in __tgt_rtl_load_binary_locked()
2277 auto &KernelInfo = DeviceInfo().KernelInfoTable[DeviceId]; in __tgt_rtl_load_binary_locked()
2278 auto &SymbolInfo = DeviceInfo().SymbolInfoTable[DeviceId]; in __tgt_rtl_load_binary_locked()
2283 __atomic_store_n(&DeviceInfo().HostcallRequired, true, in __tgt_rtl_load_binary_locked()
2288 DeviceInfo().HSAExecutables); in __tgt_rtl_load_binary_locked()
2292 const char *DeviceName = DeviceInfo().GPUName[DeviceId].c_str(); in __tgt_rtl_load_binary_locked()
2321 auto &SymbolInfoMap = DeviceInfo().SymbolInfoTable[DeviceId]; in __tgt_rtl_load_binary_locked()
2346 auto &DSS = DeviceInfo().DeviceStateStore[DeviceId]; in __tgt_rtl_load_binary_locked()
2368 Err = DeviceInfo().freesignalpoolMemcpyH2D(StatePtr, &Ptr, in __tgt_rtl_load_binary_locked()
2405 auto &SymbolInfoMap = DeviceInfo().SymbolInfoTable[DeviceId]; in __tgt_rtl_load_binary_locked()
2425 DeviceInfo().addOffloadEntry(DeviceId, Entry); in __tgt_rtl_load_binary_locked()
2427 if (DeviceInfo().RequiresFlags & OMP_REQ_UNIFIED_SHARED_MEMORY && in __tgt_rtl_load_binary_locked()
2432 Err = DeviceInfo().freesignalpoolMemcpyH2D(Varptr, E->addr, sizeof(void *), in __tgt_rtl_load_binary_locked()
2448 auto &KernelInfoMap = DeviceInfo().KernelInfoTable[DeviceId]; in __tgt_rtl_load_binary_locked()
2595 DeviceInfo().KernArgPool)); in __tgt_rtl_load_binary_locked()
2598 DeviceInfo().addOffloadEntry(DeviceId, Entry); in __tgt_rtl_load_binary_locked()
2602 return DeviceInfo().getOffloadEntriesTable(DeviceId); in __tgt_rtl_load_binary_locked()
2607 assert(DeviceId < DeviceInfo().NumberOfDevices && "Device ID too large"); in __tgt_rtl_data_alloc()
2615 hsa_amd_memory_pool_t MemoryPool = DeviceInfo().getDeviceMemoryPool(DeviceId); in __tgt_rtl_data_alloc()
2625 assert(DeviceId < DeviceInfo().NumberOfDevices && "Device ID too large"); in __tgt_rtl_data_submit()
2636 assert(DeviceId < DeviceInfo().NumberOfDevices && "Device ID too large"); in __tgt_rtl_data_submit_async()
2646 assert(DeviceId < DeviceInfo().NumberOfDevices && "Device ID too large"); in __tgt_rtl_data_retrieve()
2659 assert(DeviceId < DeviceInfo().NumberOfDevices && "Device ID too large"); in __tgt_rtl_data_retrieve_async()
2665 assert(DeviceId < DeviceInfo().NumberOfDevices && "Device ID too large"); in __tgt_rtl_data_delete()
2682 DeviceInfo().LoadRunLock.lock_shared(); in __tgt_rtl_run_target_team_region()
2686 DeviceInfo().LoadRunLock.unlock_shared(); in __tgt_rtl_run_target_team_region()
2709 DeviceInfo().LoadRunLock.lock_shared(); in __tgt_rtl_run_target_team_region_async()
2713 DeviceInfo().LoadRunLock.unlock_shared(); in __tgt_rtl_run_target_team_region_async()
2746 DeviceInfo().printDeviceInfo(DeviceId, DeviceInfo().HSAAgents[DeviceId]); in __tgt_rtl_print_device_info()