SWDEV-367145 - adding support for timeline semaphore

Change-Id: I654359b48abe8bbaac2def5118d3ad0bb05d9492


[ROCm/clr commit: afa15ddb89]
This commit is contained in:
pghafari authored and Payam Ghafari committed 2023-04-25 10:02:43 -04:00
1 parent 8e2c75defb
commit 0ddd82a5f7
5 files changed
+45 -9

No files matched your search

+6 -4
View File
@@ -181,14 +181,16 @@ hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t* extSem_out,
(semHandleDesc->type > hipExternalSemaphoreHandleTypeD3D12Fence)) {
HIP_RETURN(hipErrorInvalidValue);
}
amd::Device* device = hip::getCurrentDevice()->devices()[0];
#ifdef _WIN32
if (device->importExtSemaphore(extSem_out, semHandleDesc->handle.win32.handle)) {
if (device->importExtSemaphore(extSem_out, semHandleDesc->handle.win32.handle,
static_cast <amd::ExternalSemaphoreHandleType>
(semHandleDesc->type))) {
#else
if (device->importExtSemaphore(
extSem_out, semHandleDesc->handle.fd)) {
if (device->importExtSemaphore(extSem_out, semHandleDesc->handle.fd,
static_cast <amd::ExternalSemaphoreHandleType>
(semHandleDesc->type))) {
#endif
HIP_RETURN(hipSuccess);
}