KhronosGroup / KhronosGroup/OpenCL-Docs

Requirements for creating programs without a compiler available

Open
#1,544 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
420
Forks
131
Avg merge
5d 13h
Merged PRs (30d)
11

Description

From an OpenCL CTS issue comment, specifically https://github.com/KhronosGroup/OpenCL-CTS/issues/2642#issuecomment-4120372169:

> The current error behavior for `CL_DEVICE_COMPILER_AVAILABLE` is a bit different than I'd expect:
>
> * There is no error behavior tied to this query for [clCreateProgramWithSource](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#clCreateProgramWithSource) or [clCreateProgramWithIL](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#clCreateProgramWithIL).
> * There is error behavior tied to this query for [clBuildProgram](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#clBuildProgram), [clCompileProgram](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#clCompileProgram), and [clSetProgramSpecializationConstant](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#clSetProgramSpecializationConstant) (???), and these APIs can return [CL_COMPILER_NOT_AVAILABLE](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#CL_COMPILER_NOT_AVAILABLE).
>
> Should it be valid to create a program from source or IL when a compiler is unavailable for all of the devices in the context? According to the letter of the spec, this is not an error, though this also does not seem particularly useful.

Contributor guide

Open the contributing guide

Research direction

Start by reading the referenced OpenCL CTS issue comment and the linked specifications for clCreateProgramWithSource, clCreateProgramWithIL, clBuildProgram, clCompileProgram, and clSetProgramSpecializationConstant. Determine the intended requirements when CL_DEVICE_COMPILER_AVAILABLE is false, then update the relevant OpenCL documentation so the behavior and CL_COMPILER_NOT_AVAILABLE rules are explicit.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.