Skip to content

api/clone_kernel: Fix kernel compilation failure#2712

Open
rjodinchr wants to merge 1 commit into
KhronosGroup:mainfrom
rjodinchr:clone-kernel
Open

api/clone_kernel: Fix kernel compilation failure#2712
rjodinchr wants to merge 1 commit into
KhronosGroup:mainfrom
rjodinchr:clone-kernel

Conversation

@rjodinchr
Copy link
Copy Markdown
Collaborator

Isolate 'set_kernel_exec_info_kernel' into its own program source string to prevent compilation failures on OpenCL 3.0 devices that only support OpenCL C 1.2.

The 'set_kernel_exec_info_kernel' uses a struct containing a pointer member (__global BufPtr* buffer), which is passed directly as a kernel argument. This construct triggers a multi-level pointer evaluation (__global int **) that violates Section 6.11.a of the OpenCL C 1.2 Specification.

Previously, this kernel was bundled inside
clone_kernel_test_kernel. On devices running OpenCL 3.0 but defaulting to OpenCL C 1.2 build options, the compiler would reject the entire source string, causing all unrelated clone_kernel API tests to fail program compilation.

This change extracts the problematic kernel into a dedicated clone_kernel_exec_info_kernel source, ensuring it is only compiled when SVM features are verified and active, preserving test suite conformance on 1.2-only compilers.

Isolate 'set_kernel_exec_info_kernel' into its own program source
string to prevent compilation failures on OpenCL 3.0 devices that only
support OpenCL C 1.2.

The 'set_kernel_exec_info_kernel' uses a struct containing a pointer
member (`__global BufPtr* buffer`), which is passed directly as a
kernel argument. This construct triggers a multi-level pointer
evaluation (`__global int **`) that violates Section 6.11.a of the
OpenCL C 1.2 Specification.

Previously, this kernel was bundled inside
`clone_kernel_test_kernel`. On devices running OpenCL 3.0 but
defaulting to OpenCL C 1.2 build options, the compiler would reject
the entire source string, causing all unrelated `clone_kernel` API
tests to fail program compilation.

This change extracts the problematic kernel into a dedicated
`clone_kernel_exec_info_kernel` source, ensuring it is only compiled
when SVM features are verified and active, preserving test suite
conformance on 1.2-only compilers.
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

Successfully merging this pull request may close these issues.

1 participant