Added query of hipDeviceAttributeHdpMemFlushCntl and hipDeviceAttribu… (#1238)
* Added query of hipDeviceAttributeHdpMemFlushCntl and hipDeviceAttributeHdpRegFlushCntl * Added NVCC blocker for the hip*FlushCntl test cases
This commit is contained in:
@@ -293,6 +293,17 @@ hipError_t ihipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device
|
||||
break;
|
||||
case hipDeviceAttributeMaxTexture3DDepth:
|
||||
*pi = prop->maxTexture3D[2];
|
||||
case hipDeviceAttributeHdpMemFlushCntl:
|
||||
{
|
||||
uint32_t** hdp = reinterpret_cast<uint32_t**>(pi);
|
||||
*hdp = prop->hdpMemFlushCntl;
|
||||
}
|
||||
break;
|
||||
case hipDeviceAttributeHdpRegFlushCntl:
|
||||
{
|
||||
uint32_t** hdp = reinterpret_cast<uint32_t**>(pi);
|
||||
*hdp = prop->hdpRegFlushCntl;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
e = hipErrorInvalidValue;
|
||||
|
||||
@@ -915,6 +915,15 @@ hipError_t ihipDevice_t::initProperties(hipDeviceProp_t* prop) {
|
||||
err = hsa_agent_get_info(_hsaAgent, (hsa_agent_info_t)HSA_EXT_AGENT_INFO_IMAGE_3D_MAX_ELEMENTS,
|
||||
prop->maxTexture3D);
|
||||
DeviceErrorCheck(err);
|
||||
|
||||
// Get Agent HDP Flush Register Memory
|
||||
hsa_amd_hdp_flush_t hdpinfo;
|
||||
err = hsa_agent_get_info(_hsaAgent, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_HDP_FLUSH, &hdpinfo);
|
||||
DeviceErrorCheck(err);
|
||||
|
||||
prop->hdpMemFlushCntl = hdpinfo.HDP_MEM_FLUSH_CNTL;
|
||||
prop->hdpRegFlushCntl = hdpinfo.HDP_REG_FLUSH_CNTL;
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user