Repository navigation
Translate OpenCL group and sub-group operations - #26
Merged
Merged
Conversation
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.
OpenCL.jl's
poclctarget and the arm64 “PoCL next” job fail on KernelInterface sub-group kernels withUNIMPLEMENTED instruction 262/264andUNIMPLEMENTED capability 64. These areOpGroupAny,OpGroupIAdd, andGroupNonUniformBallot.Translate the OpenCL group operations using the builtin mappings from Khronos SPIRV-LLVM-Translator. Coverage includes uniform votes/broadcasts/reductions/scans, non-uniform votes and ballots, arithmetic/bitwise/logical collectives and clustered reductions, shuffles and relative shuffles, rotations, ballot masks, and sub-group queries/barriers.
Preserve execution scope, signed min/max overloads and scan identities, boolean conversion, and broadcast coordinates. Enable the appropriate OpenCL extensions, including the missing shuffle pragma; work-group-only collectives no longer enable
cl_khr_subgroups. Reject scopes and operand types with no matching OpenCL builtin. Shader quad and vendor-specific instructions remain unsupported.Validation:
b06173c: all 5,933 KernelInterface checks pass on PoCL 7.2.2 with Julia 1.13.1, sub-groups enabled, and the OpenCL C backend forced, using this translator.OpenCL.jl will need a rebuilt
spirv2clc_jllto use the fix.