Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NFC] Don't run conformance tests on mock adapter #2218

Merged
merged 1 commit into from
Oct 18, 2024
Merged
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
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ if(UR_USE_MSAN)
add_sanitizer_flag(memory)
endif()

if(NOT (UR_BUILD_ADAPTER_CUDA OR UR_BUILD_ADAPTER_HIP
OR UR_BUILD_ADAPTER_L0 OR UR_BUILD_ADAPTER_OPENCL
OR UR_BUILD_ADAPTER_NATIVE_CPU OR UR_BUILD_ADAPTER_L0_V2
OR UR_BUILD_ADAPTER_ALL))
message(WARNING "No adapters have been enabled; conformance tests will not be ran")
message(STATUS "Consider setting UR_BUILD_ADAPTER_*")
endif()

# Check if clang-format (in correct version) is available for Cpp code formatting.
if(UR_FORMAT_CPP_STYLE)
find_program(CLANG_FORMAT NAMES clang-format-15 clang-format-15.0 clang-format)
Expand Down
7 changes: 0 additions & 7 deletions test/conformance/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,6 @@ function(add_conformance_test name)
if(UR_BUILD_ADAPTER_NATIVE_CPU OR UR_BUILD_ADAPTER_ALL)
add_test_adapter(${name} adapter_native_cpu NATIVE_CPU)
endif()

if(NOT (UR_BUILD_ADAPTER_CUDA OR UR_BUILD_ADAPTER_HIP
OR UR_BUILD_ADAPTER_L0 OR UR_BUILD_ADAPTER_OPENCL
OR UR_BUILD_ADAPTER_NATIVE_CPU OR UR_BUILD_ADAPTER_L0_V2
OR UR_BUILD_ADAPTER_ALL))
add_test_adapter(${name} adapter_mock MOCK)
endif()
endfunction()

function(add_conformance_test_with_kernels_environment name)
Expand Down
1 change: 0 additions & 1 deletion test/conformance/source/environment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ constexpr std::pair<const char *, ur_platform_backend_t> backends[] = {
{"HIP", UR_PLATFORM_BACKEND_HIP},
{"NATIVE_CPU", UR_PLATFORM_BACKEND_NATIVE_CPU},
{"UNKNOWN", UR_PLATFORM_BACKEND_UNKNOWN},
{"MOCK", UR_PLATFORM_BACKEND_UNKNOWN},
};

namespace {
Expand Down