KhronosGroup / KhronosGroup/OpenCL-CTS
document (and require?) offline spir-v compilation
- Dominant language
- C++
- Stars
- 232
- Forks
- 235
- Avg merge
- 8d 7h
- Merged PRs (30d)
- 18
Description
Found while investigating https://github.com/KhronosGroup/OpenCL-CTS/issues/2142.
Although there is some documentation describing how offline compilation through SPIR-V can be used (via `--compilation-mode spir-v`), the documentation is rather sparse, and the setup is nontrivial. We should improve documentation, and perhaps even provide a script for common usage, such as [this script](https://gitlab.freedesktop.org/karolherbst/opencl_cts_runner/-/blob/3f721ee422da2134ffa1812bcd572518177c8a5e/cl_offline_compiler) from Mesa / rusticl.
We should also consider whether we should require running tests with offline compilation through SPIR-V when an implementation supports SPIR-V, especially for tests that do not require an excessive amount of execution time. Specifically, regarding this paragraph from the [conformance process document](https://members.khronos.org/document/dl/911):
> Platforms must run math brute force and conversion tests in normal mode using both OpenCL C and SPIR-V (if supported) unless the platform uses the materially equivalent underlying implementation, including built-in functions, for OpenCL C and SPIR-V, in which case those tests may be run in wimpy mode.
Is offline compilation through SPIR-V required for any other tests (such as the aforementioned float atomics tests), or is this only required for math brute force and conversions?
Related issues:
* https://github.com/KhronosGroup/OpenCL-CTS/issues/696
* https://github.com/KhronosGroup/OpenCL-CTS/issues/697
* https://github.com/KhronosGroup/OpenCL-CTS/issues/1340
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the existing documentation for `--compilation-mode spir-v` and the linked conformance process document. Compare the setup with the referenced Mesa/rusticl `cl_offline_compiler` script and review related issues 696, 697, and 1340. Done requires an agreed documentation scope and a decision on whether to provide a script or clarify offline SPIR-V test requirements.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers, documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100