KhronosGroup / KhronosGroup/OpenCL-Docs

OpenCL C lacking a unique identifier

Open
#334 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Consider adding to the specification, a function that will allow each work group (that is currently being executed on a compute unit) to get some kind of compute id or unique id("get_compute_id()" or "get_unique_id()") that no other work group can use until it has finished its execution and releases the ID to be reused.

e.g.
//be able to get the highest possible index in the host code
device.getInfo<CL_DEVICE_MAX_NUM_WORKGROUPS_THAT_CAN_BE_EXECUTED_AT_A_TIME>() == 19 //assuming the device has 20 compute units and ONLY ONE work group can be executed per compute unit at a time; otherwise it would be higher than num compute units

//in the kernel, be able to get the unique id for the current work group
int uniqueID = get_unique_id(); //return int ranging from 0 to CL_DEVICE_MAX_NUM_WORKGROUPS_THAT_CAN_BE_EXECUTED_AT_A_TIME

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

Start by reviewing the OpenCL C specification and the host device-info example described in the issue. Clarify the scope and semantics of a work-group identifier, including its lifetime, range, and interaction with concurrent work groups. Done would require an agreed specification change rather than only an implementation edit.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
api, compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.