api/clone_kernel: Fix kernel compilation failure#2712
Open
rjodinchr wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 unrelatedclone_kernelAPI tests to fail program compilation.This change extracts the problematic kernel into a dedicated
clone_kernel_exec_info_kernelsource, ensuring it is only compiled when SVM features are verified and active, preserving test suite conformance on 1.2-only compilers.