1
votes

I am currently using a Lenovo Yoga 510 which makes use of an AMD Radon R5 Graphics card. OpenCL works on it, but however, when I run my code to query and get platform details, the total number of available platforms is returned, but if gives an error that this platforms cannot be opened. Please see error message below.

Error: Failed to open platforms key SOFTWARE\Intel\OpenCL\Boards to load board library at runtime. Either link to the board library while compiling your host code or refer to your board vendor's documentation on how to install the board library so that it can be loaded at runtime.

Failed to close platforms key (null), ignoring Warning: Cannot find any Intel(R) FPGA Board libraries. No Intel(R) FPGA devices will be loaded. Please contact your board vender or see section "Linking Your Host Application to the Khronos ICD Loader Library" of the Programming Guide to set up FCD manually.

2 PLATFORM(s) FOUND

SEE MY CODE BELOW

[INCLUDE STATEMENTS] 

int main() {

    cl_int returned;
    cl_int zero = (cl_int)0;

    //SET-UP DEVICE EXECUTION ENVIRONMENT
    cl_uint no_of_platforms;
    //cl_uint no_of_entries;
    cl_platform_id* platforms;
    size_t device_info_val_size;
    char* detail;

    //1. Query and select the vendor specific platform
    returned = clGetPlatformIDs(zero, NULL, &no_of_platforms);
    if (returned == CL_SUCCESS) {
        printf("%d PLATFORM(s) FOUND \n", no_of_platforms);
    }
    else {
        printf("No Platform Found\n");
        return EXIT_FAILURE; //Terminante programme
    }

    platforms = (cl_platform_id*)malloc(sizeof(cl_platform_id) * no_of_platforms); //create enough space to put platofrm IDs into
    clGetPlatformIDs(no_of_platforms, platforms, NULL); //Fill in platform with their ID


    free(platforms);
    return 0;
}

Any Idea What I may be doing Wrong or have set-up wrong? I am wondering why it is looking for Intel FPGAs on my Radon graphics card

1
Where are you getting these error messages from? The only text output in this program is the printf("%d PLATFORM(s) FOUND \n", no_of_platforms); and printf("No Platform Found\n"); statements, and the OpenCL API doesn't dump information to the console unless explicitly instructed to do so. - Xirema
@Xirema Thats what shows on my console when i run the debugger in Visual Studio. I also do not have an idea where the error messages comes from, but I guess it should be something internal with the OpenCL library - Naz_Jnr

1 Answers

2
votes

Based on what you've provided, it sounds like the OpenCL ICD (Installable Client Driver) is configured incorrectly. This can be caused by a number of factors (independently):

  • Old/outdated graphics drivers
  • Corruption caused by a system update/Registry edit

The most reliable advice is to update (or, as a last resort, reinstall) your graphics drivers. Unless your GPU/iGPU are too old to have working OpenCL drivers, this should set everything up correctly.

Since you're using MSVC, I'll also recommend you to download the OpenCL SDK provided by Intel (or AMD if this were an AMD CPU), as not only does this ensure that you have the most up-to-date headers and utilities associated with OpenCL, it also installs a CPU ICD for OpenCL, giving you an extra platform to test with.