fix: add missing zex prefix
Related-To: NEO-11925 Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
parent
ef10e5a8e4
commit
778504c928
|
@ -136,7 +136,7 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventGetIpcHandle(ze_event_ha
|
||||||
return event->getCounterBasedIpcHandle(*ipcData);
|
return event->getCounterBasedIpcHandle(*ipcData);
|
||||||
}
|
}
|
||||||
|
|
||||||
ZE_APIEXPORT ze_result_t ZE_APICALL zeCounterBasedEventOpenIpcHandle(ze_context_handle_t hContext, zex_ipc_counter_based_event_handle_t hIpc, ze_event_handle_t *phEvent) {
|
ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventOpenIpcHandle(ze_context_handle_t hContext, zex_ipc_counter_based_event_handle_t hIpc, ze_event_handle_t *phEvent) {
|
||||||
auto context = static_cast<ContextImp *>(L0::Context::fromHandle(hContext));
|
auto context = static_cast<ContextImp *>(L0::Context::fromHandle(hContext));
|
||||||
|
|
||||||
if (!context || !phEvent) {
|
if (!context || !phEvent) {
|
||||||
|
@ -148,7 +148,7 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zeCounterBasedEventOpenIpcHandle(ze_context_
|
||||||
return context->openCounterBasedIpcHandle(*ipcData, phEvent);
|
return context->openCounterBasedIpcHandle(*ipcData, phEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
ZE_APIEXPORT ze_result_t ZE_APICALL zeCounterBasedEventCloseIpcHandle(ze_event_handle_t hEvent) {
|
ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventCloseIpcHandle(ze_event_handle_t hEvent) {
|
||||||
return Event::fromHandle(hEvent)->destroy();
|
return Event::fromHandle(hEvent)->destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventCreate2(ze_context_handl
|
||||||
|
|
||||||
ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventGetIpcHandle(ze_event_handle_t hEvent, zex_ipc_counter_based_event_handle_t *phIpc);
|
ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventGetIpcHandle(ze_event_handle_t hEvent, zex_ipc_counter_based_event_handle_t *phIpc);
|
||||||
|
|
||||||
ZE_APIEXPORT ze_result_t ZE_APICALL zeCounterBasedEventOpenIpcHandle(ze_context_handle_t hContext, zex_ipc_counter_based_event_handle_t hIpc, ze_event_handle_t *phEvent);
|
ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventOpenIpcHandle(ze_context_handle_t hContext, zex_ipc_counter_based_event_handle_t hIpc, ze_event_handle_t *phEvent);
|
||||||
|
|
||||||
ZE_APIEXPORT ze_result_t ZE_APICALL zeCounterBasedEventCloseIpcHandle(ze_event_handle_t hEvent);
|
ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventCloseIpcHandle(ze_event_handle_t hEvent);
|
||||||
|
|
||||||
} // namespace L0
|
} // namespace L0
|
||||||
|
|
|
@ -144,7 +144,7 @@ HWTEST2_F(InOrderIpcTests, givenIpcHandleWhenCreatingNewEventThenSetCorrectData,
|
||||||
|
|
||||||
ze_event_handle_t newEvent = nullptr;
|
ze_event_handle_t newEvent = nullptr;
|
||||||
|
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, zeCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, &newEvent));
|
EXPECT_EQ(ZE_RESULT_SUCCESS, zexCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, &newEvent));
|
||||||
|
|
||||||
EXPECT_NE(nullptr, newEvent);
|
EXPECT_NE(nullptr, newEvent);
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ HWTEST2_F(InOrderIpcTests, givenIpcHandleWhenCreatingNewEventThenSetCorrectData,
|
||||||
auto expectedOffset = static_cast<uint32_t>(event0InOrderInfo->getBaseDeviceAddress() - event0InOrderInfo->getDeviceCounterAllocation()->getGpuAddress()) + events[0]->inOrderAllocationOffset;
|
auto expectedOffset = static_cast<uint32_t>(event0InOrderInfo->getBaseDeviceAddress() - event0InOrderInfo->getDeviceCounterAllocation()->getGpuAddress()) + events[0]->inOrderAllocationOffset;
|
||||||
EXPECT_EQ(expectedOffset, newEventMock->inOrderAllocationOffset);
|
EXPECT_EQ(expectedOffset, newEventMock->inOrderAllocationOffset);
|
||||||
|
|
||||||
zeCounterBasedEventCloseIpcHandle(newEvent);
|
zexCounterBasedEventCloseIpcHandle(newEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(InOrderIpcTests, givenInvalidInternalHandleWhenOpenCalledThenReturnError, MatchAny) {
|
HWTEST2_F(InOrderIpcTests, givenInvalidInternalHandleWhenOpenCalledThenReturnError, MatchAny) {
|
||||||
|
@ -195,7 +195,7 @@ HWTEST2_F(InOrderIpcTests, givenInvalidInternalHandleWhenOpenCalledThenReturnErr
|
||||||
|
|
||||||
ze_event_handle_t newEvent = nullptr;
|
ze_event_handle_t newEvent = nullptr;
|
||||||
|
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY, zeCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, &newEvent));
|
EXPECT_EQ(ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY, zexCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, &newEvent));
|
||||||
|
|
||||||
if (events[0]->inOrderExecInfo->isHostStorageDuplicated()) {
|
if (events[0]->inOrderExecInfo->isHostStorageDuplicated()) {
|
||||||
deviceAlloc->internalHandle = 1;
|
deviceAlloc->internalHandle = 1;
|
||||||
|
@ -203,7 +203,7 @@ HWTEST2_F(InOrderIpcTests, givenInvalidInternalHandleWhenOpenCalledThenReturnErr
|
||||||
|
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, zexCounterBasedEventGetIpcHandle(events[0]->toHandle(), &zexIpcData));
|
EXPECT_EQ(ZE_RESULT_SUCCESS, zexCounterBasedEventGetIpcHandle(events[0]->toHandle(), &zexIpcData));
|
||||||
|
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY, zeCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, &newEvent));
|
EXPECT_EQ(ZE_RESULT_ERROR_OUT_OF_HOST_MEMORY, zexCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, &newEvent));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ HWTEST2_F(InOrderIpcTests, givenTbxModeWhenOpenIsCalledThenSetAllocationParams,
|
||||||
|
|
||||||
ze_event_handle_t newEvent = nullptr;
|
ze_event_handle_t newEvent = nullptr;
|
||||||
|
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, zeCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, &newEvent));
|
EXPECT_EQ(ZE_RESULT_SUCCESS, zexCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, &newEvent));
|
||||||
|
|
||||||
auto newEventMock = static_cast<FixtureMockEvent *>(Event::fromHandle(newEvent));
|
auto newEventMock = static_cast<FixtureMockEvent *>(Event::fromHandle(newEvent));
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ HWTEST2_F(InOrderIpcTests, givenTbxModeWhenOpenIsCalledThenSetAllocationParams,
|
||||||
EXPECT_TRUE(newEventMock->inOrderExecInfo->getExternalHostAllocation()->getAubInfo().writeMemoryOnly);
|
EXPECT_TRUE(newEventMock->inOrderExecInfo->getExternalHostAllocation()->getAubInfo().writeMemoryOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
zeCounterBasedEventCloseIpcHandle(newEvent);
|
zexCounterBasedEventCloseIpcHandle(newEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(InOrderIpcTests, givenIpcImportedEventWhenSignalingThenReturnError, MatchAny) {
|
HWTEST2_F(InOrderIpcTests, givenIpcImportedEventWhenSignalingThenReturnError, MatchAny) {
|
||||||
|
@ -251,11 +251,11 @@ HWTEST2_F(InOrderIpcTests, givenIpcImportedEventWhenSignalingThenReturnError, Ma
|
||||||
|
|
||||||
ze_event_handle_t newEvent = nullptr;
|
ze_event_handle_t newEvent = nullptr;
|
||||||
|
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, zeCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, &newEvent));
|
EXPECT_EQ(ZE_RESULT_SUCCESS, zexCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, &newEvent));
|
||||||
|
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, immCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, newEvent, 0, nullptr, launchParams, false));
|
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, immCmdList->appendLaunchKernel(kernel->toHandle(), groupCount, newEvent, 0, nullptr, launchParams, false));
|
||||||
|
|
||||||
zeCounterBasedEventCloseIpcHandle(newEvent);
|
zexCounterBasedEventCloseIpcHandle(newEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
HWTEST2_F(InOrderIpcTests, givenIncorrectParamsWhenUsingIpcApisThenReturnError, MatchAny) {
|
HWTEST2_F(InOrderIpcTests, givenIncorrectParamsWhenUsingIpcApisThenReturnError, MatchAny) {
|
||||||
|
@ -277,8 +277,8 @@ HWTEST2_F(InOrderIpcTests, givenIncorrectParamsWhenUsingIpcApisThenReturnError,
|
||||||
|
|
||||||
ze_context_handle_t nullContext = nullptr;
|
ze_context_handle_t nullContext = nullptr;
|
||||||
ze_event_handle_t newEvent = nullptr;
|
ze_event_handle_t newEvent = nullptr;
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, zeCounterBasedEventOpenIpcHandle(nullContext, zexIpcData, &newEvent));
|
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, zexCounterBasedEventOpenIpcHandle(nullContext, zexIpcData, &newEvent));
|
||||||
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, zeCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, nullptr));
|
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, zexCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace ult
|
} // namespace ult
|
||||||
|
|
|
@ -126,14 +126,14 @@ zeCommandListAppendLaunchKernel(cmdList1, kernel, &groupCount, &event1, 0, nullp
|
||||||
zexCounterBasedEventGetIpcHandle(event1, &ipcHandle); // handle obtained after append call
|
zexCounterBasedEventGetIpcHandle(event1, &ipcHandle); // handle obtained after append call
|
||||||
|
|
||||||
// process 2
|
// process 2
|
||||||
zeCounterBasedEventOpenIpcHandle(context2, ipcHandle, &event2); // event2 points to the same counter=X on memory CL1_alloc
|
zexCounterBasedEventOpenIpcHandle(context2, ipcHandle, &event2); // event2 points to the same counter=X on memory CL1_alloc
|
||||||
|
|
||||||
// process 1
|
// process 1
|
||||||
zeCommandListAppendLaunchKernel(cmdList2, kernel, &groupCount, &event1, 0, nullptr); // assigned counter=Y on memory CL2_alloc to event1. Event2 is not affected
|
zeCommandListAppendLaunchKernel(cmdList2, kernel, &groupCount, &event1, 0, nullptr); // assigned counter=Y on memory CL2_alloc to event1. Event2 is not affected
|
||||||
|
|
||||||
// process 2
|
// process 2
|
||||||
// event2 still points to counter=X on memory CL1_alloc. Can be used for waiting.
|
// event2 still points to counter=X on memory CL1_alloc. Can be used for waiting.
|
||||||
zeCounterBasedEventCloseIpcHandle(event2); // Free if not needed
|
zexCounterBasedEventCloseIpcHandle(event2); // Free if not needed
|
||||||
```
|
```
|
||||||
|
|
||||||
### IPC handle creation
|
### IPC handle creation
|
||||||
|
@ -147,13 +147,13 @@ ze_result_t zexCounterBasedEventGetIpcHandle(ze_event_handle_t hEvent, zex_ipc_c
|
||||||
### IPC handle opening
|
### IPC handle opening
|
||||||
In a different process, the IPC handle can be opened to create a new event object that points to the same counter memory location/value:
|
In a different process, the IPC handle can be opened to create a new event object that points to the same counter memory location/value:
|
||||||
```cpp
|
```cpp
|
||||||
ze_result_t zeCounterBasedEventOpenIpcHandle(ze_context_handle_t hContext, zex_ipc_counter_based_event_handle_t hIpc, ze_event_handle_t *phEvent);
|
ze_result_t zexCounterBasedEventOpenIpcHandle(ze_context_handle_t hContext, zex_ipc_counter_based_event_handle_t hIpc, ze_event_handle_t *phEvent);
|
||||||
```
|
```
|
||||||
|
|
||||||
### IPC handle closing
|
### IPC handle closing
|
||||||
Once the IPC handle is no longer needed, new Event can be closed:
|
Once the IPC handle is no longer needed, new Event can be closed:
|
||||||
```cpp
|
```cpp
|
||||||
ze_result_t zeCounterBasedEventCloseIpcHandle(ze_event_handle_t hEvent);
|
ze_result_t zexCounterBasedEventCloseIpcHandle(ze_event_handle_t hEvent);
|
||||||
```
|
```
|
||||||
|
|
||||||
# Regular command list
|
# Regular command list
|
||||||
|
|
Loading…
Reference in New Issue