Add HIP_SYNC_HOST_ALLOC, HipReadEnv

Este commit está contenido en:
Ben Sander committed 2017-01-19 23:55:24 -06:00
1 padre 6de88d4293
commit db3f4889ca
3 files changed
+35 -13

No files matched your search

+9
Ver fichero
@@ -164,6 +164,10 @@ hipError_t hipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
HIP_SET_DEVICE();
hipError_t hip_status = hipSuccess;
if (HIP_SYNC_HOST_ALLOC) {
hipDeviceSynchronize();
}
auto ctx = ihipGetTlsDefaultCtx();
if (sizeBytes == 0) {
@@ -216,6 +220,9 @@ hipError_t hipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
}
}
}
if (HIP_SYNC_HOST_ALLOC) {
hipDeviceSynchronize();
}
return ihipLogStatus(hip_status);
}
@@ -993,6 +1000,8 @@ hipError_t hipHostFree(void* ptr)
return ihipLogStatus(hipStatus);
};
// Deprecated:
hipError_t hipFreeHost(void* ptr)
{
return hipHostFree(ptr);