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

Lack of cl_khr_3d_image_writes extension causes failure in test_image_streams for CL1.2 #872

Closed
jenatali opened this issue Aug 5, 2020 · 2 comments · Fixed by #874
Closed
Assignees
Projects

Comments

@jenatali
Copy link
Contributor

jenatali commented Aug 5, 2020

In test_image_set in test_loops.cpp, there's this code:

    if ( ( 0 == is_extension_available( device, "cl_khr_3d_image_writes" )) && (imageType == CL_MEM_OBJECT_IMAGE3D) && (formatTestFn == test_write_image_formats) )
    {
        gFailCount++;
        log_error( "-----------------------------------------------------\n" );
        log_error( "FAILED: test writing CL_MEM_OBJECT_IMAGE3D images\n" );
        log_error( "This device does not support the mandated extension cl_khr_3d_image_writes.\n");
        log_error( "-----------------------------------------------------\n\n" );
        return -1;
    }

For OpenCL1.2, this extension is optional (https://www.khronos.org/registry/OpenCL/specs/3.0-unified/html/OpenCL_API.html#CL_DEVICE_EXTENSIONS):

Additionally, the following Khronos extension names must be returned by all devices that support OpenCL 2.0, OpenCL 2.1, or OpenCL 2.2. Note that these Khronos extension names are not required for devices supporting OpenCL 3.0:

cl_khr_3d_image_writes
...

@bashbaug bashbaug added this to To do in OpenCL 3.0 via automation Aug 6, 2020
@bashbaug
Copy link
Contributor

bashbaug commented Aug 6, 2020

Good catch. I think it should be sufficient to skip this test, similar to the way tests are skipped immediately following this check if testing mipmaps on devices that do not support the mipmap extensions. Will this work for you?

    if ( gTestMipmaps )
    {
        if ( 0 == is_extension_available( device, "cl_khr_mipmap_image" ))
        {
            log_info( "-----------------------------------------------------\n" );
            log_info( "This device does not support cl_khr_mipmap_image.\nSkipping mipmapped image test. \n" );
            log_info( "-----------------------------------------------------\n\n" );
            return 0;
        }
...

We'd probably want to keep failing the test if cl_khr_3d_image_writes isn't supported for an OpenCL 2.0, 2.1, or 2.2 devices for now, but ultimately I think these checks should move into a different "consistency" test instead.

@jenatali
Copy link
Contributor Author

jenatali commented Aug 6, 2020

Yep, such a change sounds like it would work. I see the 2.0+ requirement for cl_khr_3d_image_writes is checked by test_api's test_min_max_device_version sub-test.

@bashbaug bashbaug self-assigned this Aug 6, 2020
@kpet kpet closed this as completed in #874 Aug 14, 2020
OpenCL 3.0 automation moved this from To do to Done Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
OpenCL 3.0
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants