Skip to content

Commit

Permalink
fix(sysman): add implementation for getActivityExt
Browse files Browse the repository at this point in the history
Related-To: NEO-8554

Signed-off-by: Joshua Santosh Ranjan <[email protected]>
  • Loading branch information
joshuaranjan authored and Compute-Runtime-Automation committed Dec 21, 2023
1 parent 4a59406 commit 2d62c4e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
4 changes: 4 additions & 0 deletions level_zero/tools/source/sysman/engine/linux/os_engine_imp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ void LinuxEngineImp::init() {
}
}

ze_result_t LinuxEngineImp::getActivityExt(uint32_t *pCount, zes_engine_stats_t *pStats) {
return ZE_RESULT_ERROR_UNSUPPORTED_FEATURE;
}

LinuxEngineImp::~LinuxEngineImp() {
for (auto &fdPair : fdList) {
if (fdPair.first != -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,17 @@ TEST_F(ZesEngineFixture, GivenValidEngineHandleWhenCallingZesEngineGetActivityAn
}
}

TEST_F(ZesEngineFixture, GivenValidEngineHandleWhenCallingZesEngineGetActivityExtThenVerifyFailureIsReturned) {
auto handles = getEngineHandles(handleComponentCount);
EXPECT_EQ(handleComponentCount, handles.size());

for (auto handle : handles) {
uint32_t count = 0;
zes_engine_stats_t stats = {};
EXPECT_EQ(ZE_RESULT_ERROR_UNSUPPORTED_FEATURE, zesEngineGetActivityExt(handle, &count, &stats));
}
}

TEST_F(ZesEngineFixture, GivenValidEngineHandleWhenCallingZesEngineGetActivityAndperfEventOpenFailsThenVerifyEngineGetActivityReturnsFailure) {
pPmuInterface->mockPerfEventFailureReturnValue = -1;
MockEnginePmuInterfaceImp pPmuInterfaceImp(pLinuxSysmanImp);
Expand Down

0 comments on commit 2d62c4e

Please sign in to comment.