KhronosGroup / KhronosGroup/OpenCL-Docs

Valid Values for reqd_work_group_size Attribute

Open
#595 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

OpenCL C Spec
Dominant language
Python
Stars
421
Forks
132
Avg merge
5d 13h
Merged PRs (30d)
11

Description

We currently do not place any restrictions in the spec on the values that can be used for the reqd_work_group_size attribute. Since it doesn't make sense to require a work group size that is zero or negative I think we should explicitly say that only positive integers are valid and zero or negative integers will generate a compile error.

It looks like Clang is already enforcing this (https://godbolt.org/z/MzET4qdKM), so for implementations based on Clang this should purely be a documentation issue.

The same restrictions could also be applied to the work_group_size_hint, and Clang is enforcing this too, although since this is only a hint we could say that the nonsensical values are ignored.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the specification text defining the reqd_work_group_size and work_group_size_hint attributes, then compare their current validity requirements with Clang's behavior. Resolve whether invalid hint values should cause a compile error or be ignored, and update the specification so the permitted behavior is explicit.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.