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:
wkwchau
2019-08-01 12:03:35 -04:00
committed by Maneesh Gupta
parent adc95002c6
commit e7447d5809
4 changed files with 46 additions and 2 deletions
+11
View File
@@ -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;
+9
View File
@@ -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;
}