Add HIP_SYNC_HOST_ALLOC, HipReadEnv

Este commit está contenido en:
Ben Sander
2017-01-19 23:22:06 -06:00
padre 8209320ef0
commit 927ac3d81c
Se han modificado 3 ficheros con 35 adiciones y 13 borrados
+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);