KhronosGroup / KhronosGroup/OpenCL-Docs

vload and vstore vs. vload_half and vstore_half confusion

Open Beginner friendly
#1,276 0 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

The current spec does not clearly differentiate between the vload and vstore functions, which require the cl_khr_fp16 extension, and the vload_half and vstore_half, which are supported by all OpenCL implementations, leading to confusion. We should try to fix this.

For example, section 6.15.7 - Vector Data Load and Store Functions currently says:

All functions taking or returning half types are supported only when the cl_khr_fp16 extension macro is supported.

Strictly speaking, this is true, because the vload_half and vstore_half functions take a pointer-to half, but this detail is easy to miss.

We should clarify that there are two different "classes" of functions:

  1. The vload_half and vstore_half functions take pointers-to-half, but otherwise take or return float data. These are supported by all OpenCL devices, even those that do not support cl_khr_fp16.
  2. The vload and vstore functions that take pointer-to-half and take or return half data. These require cl_khr_fp16.

This issue is debatably a small part of #1044, but filing it separately to ensure it is addressed.

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 with section 6.15.7, Vector Data Load and Store Functions, using the linked OpenCL C specification page. Clarify the distinction between vload_half/vstore_half and vload/vstore, including their pointer and return or argument types and the cl_khr_fp16 requirement. Done means the section no longer leaves the two classes of functions confused.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.