When compiling the following executable for cuda, hipcc/nvcc reports errors about hipExternalSemaphore_t and the related functions type not being defined:
$ hipcc -o external_semaphore ./external_semaphore.hip -x cu
./external_semaphore.hip(6): error: identifier "hipExternalSemaphoreHandleDesc" is undefined
./external_semaphore.hip(7): error: identifier "hipExternalSemaphoreHandleTypeOpaqueFd" is undefined
./external_semaphore.hip(10): error: identifier "hipExternalSemaphore_t" is undefined
./external_semaphore.hip(11): error: identifier "hipImportExternalSemaphore" is undefined
./external_semaphore.hip(19): error: identifier "hipDestroyExternalSemaphore" is undefined
./external_semaphore.hip(21): error: identifier "hipExternalMemory_t" is undefined
This is also the case for hipExternalMemory_t and related types/functions.
Judging from the headers, it seems like the definitions for this are simply missing. For amd, they are defined in hip_runtime_api.h, but guarded by a macro that checks for amd. If that same if statement determines that the compilation is for nvidia, nvidia_hip_runtime_api.h is included, and the relevant definitions are missing there.
When compiling the following executable for cuda, hipcc/nvcc reports errors about hipExternalSemaphore_t and the related functions type not being defined:
This is also the case for hipExternalMemory_t and related types/functions.
Judging from the headers, it seems like the definitions for this are simply missing. For amd, they are defined in hip_runtime_api.h, but guarded by a macro that checks for amd. If that same if statement determines that the compilation is for nvidia, nvidia_hip_runtime_api.h is included, and the relevant definitions are missing there.