Add integrated device property

This commit is contained in:
Rahul Garg
2018-06-02 13:11:16 +05:30
parent 095d4dd91e
commit 94f086e9cd
5 changed files with 16 additions and 0 deletions
+3
View File
@@ -273,6 +273,9 @@ hipError_t ihipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device
case hipDeviceAttributeIsMultiGpuBoard:
*pi = prop->isMultiGpuBoard;
break;
case hipDeviceAttributeIntegrated:
*pi = prop->integrated;
break;
default:
e = hipErrorInvalidValue;
break;
+7
View File
@@ -900,6 +900,13 @@ hipError_t ihipDevice_t::initProperties(hipDeviceProp_t* prop) {
prop->canMapHostMemory = 0;
}
#endif
// Get profile
hsa_profile_t agent_profile;
err = hsa_agent_get_info(_hsaAgent, HSA_AGENT_INFO_PROFILE, &agent_profile);
DeviceErrorCheck(err);
if(agent_profile == HSA_PROFILE_FULL) {
prop->integrated = 1;
}
return e;
}