Skip to content

add build option for zero platforms behavior #10

Open
@bashbaug

Description

@bashbaug

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions