Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conformance_tests/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ add_subdirectory(test_usm)
add_subdirectory(test_multithread)
add_subdirectory(test_multiprocess)
add_subdirectory(test_mutable_cmdlist)
add_subdirectory(test_prefetch)
15 changes: 15 additions & 0 deletions conformance_tests/core/test_prefetch/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (C) 2019 Intel Corporation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please put the correct year 2025

# SPDX-License-Identifier: MIT

add_lzt_test(
NAME test_prefetch
GROUP "/conformance_tests/core"
SOURCES
src/test_prefetch.cpp
src/main.cpp
LINK_LIBRARIES
level_zero_tests::logging
level_zero_tests::image
level_zero_tests::utils
level_zero_tests::utils
)
4 changes: 4 additions & 0 deletions conformance_tests/core/test_prefetch/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# test_prefetch

## Description
test_prefetch is a conformance test which validates Memory Prefetch Operation features in a oneAPI Level Zero driver as described in https://oneapi-src.github.io/level-zero-spec/level-zero/latest/core/api.html#zeCommandListAppendMemoryPrefetch
28 changes: 28 additions & 0 deletions conformance_tests/core/test_prefetch/src/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
*
* Copyright (C) 2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/

#include "gmock/gmock.h"
#include "logging/logging.hpp"
#include "utils/utils.hpp"

int main(int argc, char **argv) {
::testing::InitGoogleMock(&argc, argv);
std::vector<std::string> command_line(argv + 1, argv + argc);
level_zero_tests::init_logging(command_line);
static char enable_metrics[] = "PrintXeLogs=1";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this PR can't be merged in the CTS repository. The test code has Intel KMD centric expectations. The CTS is supposed to be vendor neutral. Perhaps the L0 benchmarks repository might be a better venue if it has a notion of vendor centric benchmarks.

putenv(enable_metrics);
ze_result_t result = zeInit(0);
if (result) {
throw std::runtime_error("zeInit failed: " +
level_zero_tests::to_string(result));
}
LOG_TRACE << "Driver initialized";
level_zero_tests::print_platform_overview();

return RUN_ALL_TESTS();
}
Loading
Loading