Repository navigation
OpenCL: gate single-group launches by per-kernel work-group limit - #247
Open
Redkin-Aleksey wants to merge 1 commit into
Open
Redkin-Aleksey wants to merge 1 commit into
Redkin-Aleksey wants to merge 1 commit into
Conversation
…ork-group size limit
This branch has not been deployed
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.
Fixes #246.
Short description
On PowerVR BXE-2-32, single-group launches sized using
CL_DEVICE_MAX_WORK_GROUP_SIZE(512) exceed the per-kernel limit reported by the driver itself (480 — "the maximum work-group size that can be used to execute the kernel") and fail withCL_OUT_OF_RESOURCES; the ignored launch status turns the failure into silent data corruption.List of changes
Gate single-group launches by
CL_KERNEL_WORK_GROUP_SIZEinsrc/opencl/cl_reduce_by_key.hpp:cl_reduce_by_key(small path) andsrc/opencl/cl_sort_by_key.hpp:cl_sort_by_key_bitonic(local, pre-sort and global launches), with helpersrc/opencl/cl_program_builder.hpp/.cpp:kernel_group_limit; oversized requests fall back to the existing slow paths.Type of changes
Testing strategy (all runs on the PowerVR board; mechanism and numbers detailed in #246)
Standalone reproducer (gist):
./test_reduce_small—CL_OUT_OF_RESOURCESfor groups of 512, success up to the reported limit of 480. In-treesssp:./sssp --mtxpath=belgium_osm.mtx --niters=1yieldsCHECK accwith zeroVERIFYlines; same forroadNet-CA. No new in-tree tests: the failure needs PowerVR BXE-2-32 hardware absent from CI.Background
clEnqueueNDRangeKernel: https://manpages.debian.org/unstable/opencl-1.2-man-doc/clEnqueueNDRangeKernel.3clc.en.htmlclGetKernelWorkGroupInfo: https://manpages.debian.org/unstable/opencl-1.2-man-doc/clGetKernelWorkGroupInfo.3clc.en.html