fix: add missing zex prefix

Related-To: NEO-11925

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski 2024-11-07 14:47:43 +00:00 committed by Compute-Runtime-Automation
parent ef10e5a8e4
commit 778504c928
4 changed files with 18 additions and 18 deletions

View File

@ -136,7 +136,7 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventGetIpcHandle(ze_event_ha
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));
if (!context || !phEvent) {
@ -148,7 +148,7 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zeCounterBasedEventOpenIpcHandle(ze_context_
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();
}

View File

@ -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 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

View File

@ -144,7 +144,7 @@ HWTEST2_F(InOrderIpcTests, givenIpcHandleWhenCreatingNewEventThenSetCorrectData,
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);
@ -175,7 +175,7 @@ HWTEST2_F(InOrderIpcTests, givenIpcHandleWhenCreatingNewEventThenSetCorrectData,
auto expectedOffset = static_cast<uint32_t>(event0InOrderInfo->getBaseDeviceAddress() - event0InOrderInfo->getDeviceCounterAllocation()->getGpuAddress()) + events[0]->inOrderAllocationOffset;
EXPECT_EQ(expectedOffset, newEventMock->inOrderAllocationOffset);
zeCounterBasedEventCloseIpcHandle(newEvent);
zexCounterBasedEventCloseIpcHandle(newEvent);
}
HWTEST2_F(InOrderIpcTests, givenInvalidInternalHandleWhenOpenCalledThenReturnError, MatchAny) {
@ -195,7 +195,7 @@ HWTEST2_F(InOrderIpcTests, givenInvalidInternalHandleWhenOpenCalledThenReturnErr
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()) {
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_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;
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));
@ -234,7 +234,7 @@ HWTEST2_F(InOrderIpcTests, givenTbxModeWhenOpenIsCalledThenSetAllocationParams,
EXPECT_TRUE(newEventMock->inOrderExecInfo->getExternalHostAllocation()->getAubInfo().writeMemoryOnly);
}
zeCounterBasedEventCloseIpcHandle(newEvent);
zexCounterBasedEventCloseIpcHandle(newEvent);
}
HWTEST2_F(InOrderIpcTests, givenIpcImportedEventWhenSignalingThenReturnError, MatchAny) {
@ -251,11 +251,11 @@ HWTEST2_F(InOrderIpcTests, givenIpcImportedEventWhenSignalingThenReturnError, Ma
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));
zeCounterBasedEventCloseIpcHandle(newEvent);
zexCounterBasedEventCloseIpcHandle(newEvent);
}
HWTEST2_F(InOrderIpcTests, givenIncorrectParamsWhenUsingIpcApisThenReturnError, MatchAny) {
@ -277,8 +277,8 @@ HWTEST2_F(InOrderIpcTests, givenIncorrectParamsWhenUsingIpcApisThenReturnError,
ze_context_handle_t nullContext = 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, zeCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, nullptr));
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, zexCounterBasedEventOpenIpcHandle(nullContext, zexIpcData, &newEvent));
EXPECT_EQ(ZE_RESULT_ERROR_INVALID_ARGUMENT, zexCounterBasedEventOpenIpcHandle(context->toHandle(), zexIpcData, nullptr));
}
} // namespace ult

View File

@ -126,14 +126,14 @@ zeCommandListAppendLaunchKernel(cmdList1, kernel, &groupCount, &event1, 0, nullp
zexCounterBasedEventGetIpcHandle(event1, &ipcHandle); // handle obtained after append call
// 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
zeCommandListAppendLaunchKernel(cmdList2, kernel, &groupCount, &event1, 0, nullptr); // assigned counter=Y on memory CL2_alloc to event1. Event2 is not affected
// process 2
// 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
@ -147,13 +147,13 @@ ze_result_t zexCounterBasedEventGetIpcHandle(ze_event_handle_t hEvent, zex_ipc_c
### 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:
```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
Once the IPC handle is no longer needed, new Event can be closed:
```cpp
ze_result_t zeCounterBasedEventCloseIpcHandle(ze_event_handle_t hEvent);
ze_result_t zexCounterBasedEventCloseIpcHandle(ze_event_handle_t hEvent);
```
# Regular command list