SWDEV-294591 - Fix hipEventIpc failure on NV

make hipIpcOpenEventHandle has the same behavour of cudaIpcOpenEventHandle.
Add Api usages.

Change-Id: I4248b2cebd3de156f9d5d427e1797da22fb964eb


[ROCm/hip commit: c053d60282]
This commit is contained in:
Tao Sang authored and Tao Sang committed 2021-07-28 15:28:39 -04:00
1 szülő 918d0e8d84
commit 010d54c0ee
2 files changed
+55 -5

No files matched your search

@@ -24,7 +24,7 @@ THE SOFTWARE.
// forces synchronization : set
/* HIT_START
* BUILD: %t %s ../../test_common.cpp EXCLUDE_HIP_PLATFORM nvidia
* BUILD: %t %s ../../test_common.cpp
* TEST: %t --iterations 10
* HIT_END
*/
@@ -87,16 +87,19 @@ int main(int argc, char* argv[]) {
printf("\n");
}
hipIpcEventHandle_t ipc_handle;
HIPCHECK(hipIpcGetEventHandle(&ipc_handle, start));
hipEvent_t ipc_event;
HIPCHECK(hipIpcOpenEventHandle(&ipc_event, ipc_handle));
auto ret = hipIpcOpenEventHandle(&ipc_event, ipc_handle);
HIPCHECK(hipEventSynchronize(ipc_event));
if (ret == hipErrorInvalidContext) {
// tests/src/ipc/hipMultiProcIpcEvent.cpp is the right sample in different process.
printf("hipIpcOpenEventHandle() should be called in a different process\n");
} else if (ret == hipSuccess) {
// To be removed
}
HIPCHECK(hipEventDestroy(ipc_event));
HIPCHECK(hipEventDestroy(start));
HIPCHECK(hipEventDestroy(stop));