Add ns-level timer for HIP API routines

Refactor some miuses of ihipLogStatus, these should only be in top-level
HIP APIs and should be paired with HIP_API_INIT calls.
Cette révision appartient à :
Ben Sander
2017-10-30 20:18:41 +00:00
Parent 2e8ec71e40
révision 7e908bdec8
5 fichiers modifiés avec 30 ajouts et 17 suppressions
+5 -5
Voir le fichier
@@ -60,12 +60,12 @@ hipError_t ihipGetDeviceCount(int *count)
*count = g_deviceCnt;
if (*count > 0) {
e = ihipLogStatus(hipSuccess);
e = hipSuccess;
} else {
e = ihipLogStatus(hipErrorNoDevice);
e = hipErrorNoDevice;
}
} else {
e = ihipLogStatus(hipErrorInvalidValue);
e = hipErrorInvalidValue;
}
return e;
}
@@ -73,7 +73,7 @@ hipError_t ihipGetDeviceCount(int *count)
hipError_t hipGetDeviceCount(int *count)
{
HIP_INIT_API(count);
return ihipGetDeviceCount(count);
return ihipLogStatus(ihipGetDeviceCount(count));
}
hipError_t hipDeviceSetCacheConfig(hipFuncCache_t cacheConfig)
@@ -205,7 +205,7 @@ hipError_t ihipDeviceGetAttribute(int* pi, hipDeviceAttribute_t attr, int device
hipError_t e = hipSuccess;
if(pi == nullptr) {
return ihipLogStatus(hipErrorInvalidValue);
return hipErrorInvalidValue;
}
auto * hipDevice = ihipGetDevice(device);