SWDEV-522634 - Fix device properties in hipInfo (#203)

This commit is contained in:
Jiang, Julia
2025-04-29 11:29:47 -04:00
کامیت شده توسط GitHub
والد 96cadbc9e9
کامیت eb62fe9f62
3فایلهای تغییر یافته به همراه5 افزوده شده و 11 حذف شده
+2 -2
مشاهده پرونده
@@ -489,7 +489,7 @@ hipError_t ihipGetDeviceProperties(hipDeviceProp_tR0600* props, int device) {
deviceProps.maxGridSize[2] = uint16_max;
deviceProps.clockRate = info.maxEngineClockFrequency_ * 1000;
deviceProps.memoryClockRate = info.maxMemoryClockFrequency_ * 1000;
deviceProps.memoryBusWidth = info.globalMemChannels_;
deviceProps.memoryBusWidth = info.vramBusBitWidth_;
deviceProps.totalConstMem = std::min(info.maxConstantBufferSize_, int32_max);
deviceProps.major = isa.versionMajor();
deviceProps.minor = isa.versionMinor();
@@ -690,7 +690,7 @@ hipError_t hipGetDevicePropertiesR0000(hipDeviceProp_tR0000* prop, int device) {
deviceProps.maxGridSize[2] = uint16_max;
deviceProps.clockRate = info.maxEngineClockFrequency_ * 1000;
deviceProps.memoryClockRate = info.maxMemoryClockFrequency_ * 1000;
deviceProps.memoryBusWidth = info.globalMemChannels_;
deviceProps.memoryBusWidth = info.vramBusBitWidth_;
deviceProps.totalConstMem = std::min(info.maxConstantBufferSize_, int32_max);
deviceProps.major = isa.versionMajor();
deviceProps.minor = isa.versionMinor();
@@ -667,7 +667,7 @@ void NullDevice::fillDeviceInfo(const Pal::DeviceProperties& palProp,
info_.vgprAllocGranularity_ = palProp.gfxipProperties.shaderCore.vgprAllocGranularity;
info_.vgprsPerSimd_ = palProp.gfxipProperties.shaderCore.vgprsPerSimd;
info_.sgprsPerSimd_ = palProp.gfxipProperties.shaderCore.sgprsPerSimd;
info_.availableRegistersPerCU_ = info_.vgprsPerSimd_ * info_.simdPerCU_ * 32;
info_.luidLowPart_ = palProp.osProperties.luidLowPart;
info_.luidHighPart_ = palProp.osProperties.luidHighPart;
// Setup the node mask for MGPU only case from the original PAL list of all devices
@@ -1138,14 +1138,6 @@ bool Device::populateOCLDeviceConstants() {
}
info_.wallClockFrequency_ = static_cast<uint32_t>(wallClockFrequency / 1000); // in KHz
if (HSA_STATUS_SUCCESS !=
hsa_agent_get_info(bkendDevice_,
static_cast<hsa_agent_info_t>(HSA_AMD_AGENT_INFO_MEMORY_WIDTH),
&info_.globalMemChannels_)) {
return false;
}
assert(info_.globalMemChannels_ > 0);
if (HSA_STATUS_SUCCESS !=
hsa_agent_get_info(bkendDevice_,
static_cast<hsa_agent_info_t>(HSA_AMD_AGENT_INFO_DRIVER_NODE_ID),
@@ -1566,6 +1558,8 @@ bool Device::populateOCLDeviceConstants() {
return false;
}
info_.globalMemChannels_ = info_.vramBusBitWidth_ / 32;
if (HSA_STATUS_SUCCESS !=
hsa_agent_get_info(bkendDevice_,
static_cast<hsa_agent_info_t>(HSA_AMD_AGENT_INFO_NUM_SIMDS_PER_CU),