[HIP] add support for NoPreSync/NoPostSync flags for Cooperative MultiDevice launch API (#1990)

[ROCm/clr commit: 4d05b4dce7]
This commit is contained in:
Aryan Salmanpour authored and GitHub committed 2020-04-13 14:02:52 +05:30
1 parent 7fe43d9bc3
commit 2d45fcc1b4
4 files changed
+66 -37

No files matched your search

+3 -3
View File
@@ -496,14 +496,14 @@ void* allocAndSharePtr(const char* msg, size_t sizeBytes, ihipCtx_t* ctx, bool s
return ptr;
}
hipError_t ihipHostMalloc(TlsData *tls, void** ptr, size_t sizeBytes, unsigned int flags) {
hipError_t ihipHostMalloc(TlsData *tls, void** ptr, size_t sizeBytes, unsigned int flags, bool noSync) {
hipError_t hip_status = hipSuccess;
if (sizeBytes == 0) {
return hipSuccess;
}
if (HIP_SYNC_HOST_ALLOC) {
if (HIP_SYNC_HOST_ALLOC && !noSync) {
hipDeviceSynchronize();
}
@@ -558,7 +558,7 @@ hipError_t ihipHostMalloc(TlsData *tls, void** ptr, size_t sizeBytes, unsigned i
}
}
if (HIP_SYNC_HOST_ALLOC) {
if (HIP_SYNC_HOST_ALLOC && !noSync) {
hipDeviceSynchronize();
}
return hip_status;