Skip to content

missing testing for __OPENCL_C_VERSION__ preprocessor macro #2670

@bashbaug

Description

@bashbaug

We have tests that ensure a program can be compiled for all of the OpenCL C versions advertised by a device, see:

https://github.com/KhronosGroup/OpenCL-CTS/blob/main/test_conformance/compiler/test_opencl_c_versions.cpp

However, we never check that the __OPENCL_C_VERSION__ preprocessor macro is set properly when compiling for each OpenCL C version.

https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_C.html#preprocessor-directives-and-macros

In addition to checking that a program can be compiled for a specific OpenCL C version, we should also check that the preprocessor macro is set correctly, for example by executing the kernel, writing the value of the preprocessor macro to a buffer, and checking that the value written is correct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cognizant-triageIssue proposed for addition to Cognizant's backlog (needs WG approval)missing-coverage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions