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

add build option for zero platforms behavior #10

Open
bashbaug opened this issue Aug 17, 2020 · 0 comments
Open

add build option for zero platforms behavior #10

bashbaug opened this issue Aug 17, 2020 · 0 comments

Comments

@bashbaug
Copy link
Owner

The OpenCL spec does not describe any specific error behavior when no platforms are found, but the OpenCL ICD loader returns an error code for this case. This OpenCL runtime loader should have a build option to choose the desired behavior. This is hard-coded with an ifdef today.

    // The cl_khr_icd spec says that an error should be returned if no
    // platforms are found, but this is not an error condition in the OpenCL
    // spec.
#if 1
    return _SCL_PLATFORM_NOT_FOUND_KHR;
#else
    if (num_platforms) {
        num_platforms[0] = 0;
    }
    return CL_SUCCESS;
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant