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

remove unavoidable error conditions #1269

Open
bashbaug opened this issue Oct 2, 2024 · 0 comments
Open

remove unavoidable error conditions #1269

bashbaug opened this issue Oct 2, 2024 · 0 comments
Labels
needs-new-opencl-minor-version This change requires a new minor version of OpenCL

Comments

@bashbaug
Copy link
Contributor

bashbaug commented Oct 2, 2024

Philosophically, it should be possible for a well-written OpenCL program to execute without generating any OpenCL errors. This means that no error conditions should be "unavoidable", where the only way to determine if an operation will be successful is to try making an API call and then check the returned error code.

This issue is to document places in the OpenCL spec where there are currently "unavoidable" error conditions and to document how to remove them. This will likely need to be done in a minor OpenCL API revision, since it is a change to specified behavior.

  1. clGetPlatformIDs returns CL_PLATFORM_NOT_FOUND_KHR if the cl_khr_icd extension is supported and zero platforms are available.
    • Why couldn't this just return CL_SUCCESS and num_platforms equal to zero, instead?
  2. clGetDeviceIDs returns CL_DEVICE_NOT_FOUND if no devices in the platform match the requested device type.
    • This is true even for CL_DEVICE_TYPE_ALL.
    • Why couldn't this just return CL_SUCCESS and num_devices equal to zero, instead?
@bashbaug bashbaug added the needs-new-opencl-minor-version This change requires a new minor version of OpenCL label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-new-opencl-minor-version This change requires a new minor version of OpenCL
Projects
Development

No branches or pull requests

1 participant