Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strengthen requirements for CL_DEVICE_TYPE query #1069

Merged
merged 4 commits into from Mar 26, 2024

Conversation

bashbaug
Copy link
Contributor

@bashbaug bashbaug commented Feb 26, 2024

Proposed fix for #224.

This PR:

  1. Moves the requirement that CL_DEVICE_TYPE_CUSTOM must not be combined with any other device types to the description of CL_DEVICE_TYPE. (see (4) below)
  2. Adds the requirement that CL_DEVICE_TYPE_DEFAULT must only be used to get device IDs using clGetDeviceIDs and must NOT be returned as the CL_DEVICE_TYPE for any device.
  3. Clarifies that CL_DEVICE_TYPE_ALL also must only be used to get device IDs using clGetDeviceIDs.
  4. Adds an informative note that most implementations should only return a single device type for CL_DEVICE_TYPE, and should not return a combination of device types. Updated: Adds the requirement that the device must return only a single device type for CL_DEVICE_TYPE.

@bashbaug bashbaug added this to In progress in OpenCL specification maintenance via automation Feb 26, 2024
@bashbaug bashbaug moved this from In progress to Needs WG discussion in OpenCL specification maintenance Feb 26, 2024
Copy link
Contributor

@alycm alycm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Textually LGTM. Group needs to approve overall change.

api/opencl_platform_layer.asciidoc Outdated Show resolved Hide resolved
OpenCL specification maintenance automation moved this from Needs WG discussion to Reviewer approved Feb 27, 2024
Copy link
Contributor

@alycm alycm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New wording still approved, it's very clear on returning a single value.

@bashbaug
Copy link
Contributor Author

bashbaug commented Mar 4, 2024

Had a thought: Would we want CL_DEVICE_TYPE_DEFAULT and CL_DEVICE_TYPE_ALL to be valid values to pass to clCreateContextFromType? I think we would.

If so, I should adjust the descriptions of these devices types so it is clearer that this is allowed. In other words, CL_DEVICE_TYPE_ALL could be passed to clGetDeviceIDs or to clCreateContextFromType, though it will never be returned as a device type for CL_DEVICE_TYPE.

@bashbaug bashbaug marked this pull request as draft March 12, 2024 16:54
@bashbaug bashbaug marked this pull request as ready for review March 25, 2024 18:02
@bashbaug
Copy link
Contributor Author

I've updated this PR so it describes clCreateContextFromType also. I think it's ready to go.

@bashbaug bashbaug merged commit 65fc388 into KhronosGroup:main Mar 26, 2024
2 checks passed
OpenCL specification maintenance automation moved this from Reviewer approved to Done Mar 26, 2024
@bashbaug bashbaug deleted the strengthen-device-type-query branch March 26, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants