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]
Este cometimento está contido em:
Tao Sang criou e Tao Sang cometeu 2021-07-28 15:28:39 -04:00
1 ascendente 918d0e8d84
cometimento 010d54c0ee
2 ficheiros modificados
+55 -5

Não existem ficheiros que correspondam à sua pesquisa

+8 -5
Ver ficheiro
@@ -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));