Add integrated device property

Bu işleme şunda yer alıyor:
Rahul Garg committed 2018-06-02 13:11:16 +05:30
1 ebeveyn df450c6680
işleme 1a02bc364f
5 files changed
+16

No files matched your search

+3
Dosyayı Görüntüle
@@ -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
Dosyayı Görüntüle
@@ -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;
}