Subtests to skip with offline compiler
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- cpp
- Domain
- build-system, testing
Research direction
Start by reading testHarness.h, the check_compiler_available macro, and the test registration path through test_definition and callSingleTestFunction. Compare the proposed runtime check with registration metadata, then review how offline compilation mode currently uses subtests_to_skip_with_offline_compiler. Done means online compiler requirements are checked per test without subtest name collisions; the payload also proposes an OpenCL layer CI check.
Written by the indexing model from the issue text.
Description
The list subtests_to_skip_with_offline_compiler is very error prone. It is easy to forget to add a new test to that list, and as the list uses subtest names, we can easily have a subtest skipped because it has the same name in 2 different suites (ex: "get_program_info_kernel_names" from test_api & test_compiler).
Ideas:
1. Check gCompilationMode directly inside check_compiler_available
Tests that bypass create_single_kernel_helper and call clCreateProgramWithSource directly already need check_compiler_available(device) (recently moved to testHarness.h). Extending this macro (or replacing it with REQUIRE_ONLINE_COMPILER(device)) to also return TEST_SKIPPED_ITSELF when gCompilationMode != kOnline removes the need for a separate subtests_to_skip_with_offline_compiler list and avoids cross-suite name collisions.
2. Declare online-compiler requirements via REGISTER_TEST metadata
Extend test_definition with a flag indicating that a test requires online compilation, exposed via a dedicated registration macro (e.g., REGISTER_ONLINE_COMPILER_TEST). callSingleTestFunction can then automatically check both CL_DEVICE_COMPILER_AVAILABLE and gCompilationMode == kOnline on the specific test object, keeping the requirement co-located with the test definition and avoiding global subtest name lookups.
Testing:
Use an OpenCL layer to reject online compilation in CI
We could use an OpenCL layer when running in offline compilation mode to report CL_DEVICE_COMPILER_AVAILABLE = CL_FALSE and force online compilation calls (clCreateProgramWithSource, clBuildProgram from source, clCompileProgram) to fail with CL_COMPILER_NOT_AVAILABLE. Enabling this layer in a CI job running in offline compilation mode would immediately fail any new test that uses online compilation without properly skipping itself.
- Dominant language
- C++
- Stars
- 234
- Forks
- 240
- Avg merge
- 6d 12h
- Merged PRs (30d)
- 15
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from KhronosGroup/OpenCL-CTS
-
cognizant-backlog
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
KhronosGroup/OpenCL-CTS#2882 · 1 comment ·
Maintainers usually reply within 1 day
-
cl_khr_command_buffer: negative_enqueue_inconsistent_device expects CL_INCOMPATIBLE_COMMAND_QUEUE_KHR instead of CL_INVALID_DEVICEPossibly taken @kpet claimed this 11 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 82/100
KhronosGroup/OpenCL-CTS#2872 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
test_compiler: feature macros for cl_ext_float_atomics are not testedPossibly taken @shajder claimed this 10 days ago. Opencognizant-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
KhronosGroup/OpenCL-CTS#2818 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
KhronosGroup/OpenCL-CTS#2699 · 1 comment ·
Maintainers usually reply within 1 day
-
cleanup/refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
KhronosGroup/OpenCL-CTS#2057 ·
Maintainers usually reply within 1 day
All issues in KhronosGroup/OpenCL-CTS
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
useless statementOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
grizzlypeak3d/DJV#962 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day