feature: api to query aggregated event increment value 2

Related-To: NEO-14557

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2025-09-23 07:37:57 +00:00
committed by Compute-Runtime-Automation
parent a173c810d9
commit 6f2e8b7544
5 changed files with 20 additions and 0 deletions

View File

@@ -183,6 +183,10 @@ ze_result_t ZE_APICALL zexCounterBasedEventCloseIpcHandle(ze_event_handle_t hEve
return Event::fromHandle(hEvent)->destroy();
}
ze_result_t ZE_APICALL zexDeviceGetAggregatedCopyOffloadIncrementValue(ze_device_handle_t hDevice, uint32_t *incrementValue) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}
} // namespace L0
extern "C" {
@@ -232,4 +236,8 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventCloseIpcHandle(ze_event_
return L0::zexCounterBasedEventCloseIpcHandle(hEvent);
}
ZE_APIEXPORT ze_result_t ZE_APICALL zexDeviceGetAggregatedCopyOffloadIncrementValue(ze_device_handle_t hDevice, uint32_t *incrementValue) {
return L0::zexDeviceGetAggregatedCopyOffloadIncrementValue(hDevice, incrementValue);
}
} // extern "C"

View File

@@ -62,6 +62,7 @@ void *ExtensionFunctionAddressHelper::getExtensionFunctionAddress(const std::str
RETURN_FUNC_PTR_IF_EXIST(zexCounterBasedEventGetIpcHandle);
RETURN_FUNC_PTR_IF_EXIST(zexCounterBasedEventOpenIpcHandle);
RETURN_FUNC_PTR_IF_EXIST(zexCounterBasedEventCloseIpcHandle);
RETURN_FUNC_PTR_IF_EXIST(zexDeviceGetAggregatedCopyOffloadIncrementValue);
RETURN_FUNC_PTR_IF_EXIST(zeMemGetPitchFor2dImage);
RETURN_FUNC_PTR_IF_EXIST(zeImageGetDeviceOffsetExp);

View File

@@ -6450,6 +6450,11 @@ HWTEST_F(InOrderCmdListTests, givenCounterBasedEventWhenAskingForEventAddressAnd
EXPECT_EQ(deviceAlloc->getGpuAddress() + events[0]->inOrderAllocationOffset, address);
}
HWTEST_F(InOrderCmdListTests, whenCallingZexDeviceGetAggregatedCopyOffloadIncrementValueThenReturnError) {
uint32_t incValue = 0;
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, zexDeviceGetAggregatedCopyOffloadIncrementValue(device->toHandle(), &incValue));
}
HWCMDTEST_F(IGFX_XE_HP_CORE, InOrderCmdListTests, wWhenUsingImmediateCmdListThenDontAddCmdsToPatch) {
auto immCmdList = createCopyOnlyImmCmdList<FamilyType::gfxCoreFamily>();

View File

@@ -1340,6 +1340,7 @@ TEST_F(DriverExperimentalApiTest, whenRetrievingApiFunctionThenExpectProperPoint
decltype(&zexCounterBasedEventGetIpcHandle) expectedCounterBasedEventGetIpcHandle = zexCounterBasedEventGetIpcHandle;
decltype(&zexCounterBasedEventOpenIpcHandle) expectedCounterBasedEventOpenIpcHandle = zexCounterBasedEventOpenIpcHandle;
decltype(&zexCounterBasedEventCloseIpcHandle) expectedCounterBasedEventCloseIpcHandle = zexCounterBasedEventCloseIpcHandle;
decltype(&zexDeviceGetAggregatedCopyOffloadIncrementValue) expectedZexDeviceGetAggregatedCopyOffloadIncrementValueHandle = zexDeviceGetAggregatedCopyOffloadIncrementValue;
decltype(&zexCommandListAppendHostFunction) expectedCommandListAppendHostFunction = zexCommandListAppendHostFunction;
@@ -1411,6 +1412,9 @@ TEST_F(DriverExperimentalApiTest, whenRetrievingApiFunctionThenExpectProperPoint
EXPECT_EQ(ZE_RESULT_SUCCESS, zeDriverGetExtensionFunctionAddress(driverHandle, "zexCounterBasedEventCloseIpcHandle", &funPtr));
EXPECT_EQ(expectedCounterBasedEventCloseIpcHandle, reinterpret_cast<decltype(&zexCounterBasedEventCloseIpcHandle)>(funPtr));
EXPECT_EQ(ZE_RESULT_SUCCESS, zeDriverGetExtensionFunctionAddress(driverHandle, "zexDeviceGetAggregatedCopyOffloadIncrementValue", &funPtr));
EXPECT_EQ(expectedZexDeviceGetAggregatedCopyOffloadIncrementValueHandle, reinterpret_cast<decltype(&zexDeviceGetAggregatedCopyOffloadIncrementValue)>(funPtr));
EXPECT_EQ(ZE_RESULT_SUCCESS, zeDriverGetExtensionFunctionAddress(driverHandle, "zexCommandListAppendHostFunction", &funPtr));
EXPECT_EQ(expectedCommandListAppendHostFunction, reinterpret_cast<decltype(&zexCommandListAppendHostFunction)>(funPtr));
}

View File

@@ -48,6 +48,8 @@ ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventOpenIpcHandle(ze_context
ZE_APIEXPORT ze_result_t ZE_APICALL zexCounterBasedEventCloseIpcHandle(ze_event_handle_t hEvent);
ZE_APIEXPORT ze_result_t ZE_APICALL zexDeviceGetAggregatedCopyOffloadIncrementValue(ze_device_handle_t hDevice, uint32_t *incrementValue);
#if defined(__cplusplus)
} // extern "C"
#endif