P4 to Git Change 1737265 by skudchad@skudchad_test2_win_opencl on 2019/01/29 16:13:19
SWDEV-145570 - [HIP] - Fix maxThreadsPerStreamProcessor info parameter for HIP-VDI
ReviewBoardURL = http://ocltc.amd.com/reviews/r/16626/diff/
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/hip/hip_device.cpp#17 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#331 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#601 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#123 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#113 edit
[ROCm/clr commit: 13323b876e]
Этот коммит содержится в:
@@ -500,6 +500,9 @@ struct Info : public amd::EmbeddedObject {
|
||||
uint32_t pcieDeviceId_;
|
||||
//! Revision ID
|
||||
uint32_t pcieRevisionId_;
|
||||
|
||||
//! Max numbers of threads per CU
|
||||
cl_uint maxThreadsPerCU_;
|
||||
};
|
||||
|
||||
//! Device settings
|
||||
|
||||
@@ -585,6 +585,7 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf
|
||||
|
||||
info_.pcieDeviceId_ = calAttr.pcieDeviceID;
|
||||
info_.pcieRevisionId_ = calAttr.pcieRevisionID;
|
||||
info_.maxThreadsPerCU_ = info_.wavefrontWidth_ * hwInfo()->simdPerCU_ * 10;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -356,7 +356,6 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
|
||||
palProp.gfxipProperties.shaderCore.numAvailableCus / 2 :
|
||||
palProp.gfxipProperties.shaderCore.numAvailableCus;
|
||||
|
||||
|
||||
info_.numberOfShaderEngines = palProp.gfxipProperties.shaderCore.numShaderEngines;
|
||||
|
||||
// SI parts are scalar. Also, reads don't need to be 128-bits to get peak rates.
|
||||
@@ -636,6 +635,8 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
|
||||
|
||||
info_.pcieDeviceId_ = palProp.deviceId;
|
||||
info_.pcieRevisionId_ = palProp.revisionId;
|
||||
info_.maxThreadsPerCU_ = info_.wavefrontWidth_ * hwInfo()->simdPerCU_ *
|
||||
palProp.gfxipProperties.shaderCore.numWavefrontsPerSimd;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1226,6 +1226,14 @@ bool Device::populateOCLDeviceConstants() {
|
||||
hsa_agent_get_info(_bkendDevice, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_MEMORY_WIDTH, &info_.vramBusBitWidth_)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t max_waves_per_cu;
|
||||
if (HSA_STATUS_SUCCESS !=
|
||||
hsa_agent_get_info(_bkendDevice, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_MAX_WAVES_PER_CU, &max_waves_per_cu)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
info_.maxThreadsPerCU_ = info_.wavefrontWidth_ * max_waves_per_cu;
|
||||
uint32_t cache_sizes[4];
|
||||
/* FIXIT [skudchad] - Seems like hardcoded in HSA backend so 0*/
|
||||
if (HSA_STATUS_SUCCESS !=
|
||||
|
||||
Ссылка в новой задаче
Block a user