Repository navigation
Fix kernel launches over more than INT_MAX work-items with DPC++ 2026.2 - #3089
Open
antonwolfy wants to merge 3 commits into
Open
antonwolfy wants to merge 3 commits into
antonwolfy wants to merge 3 commits into
Conversation
Starting with DPC++ 2026.2 the ID-queries range is recorded in the device image during the device link step. With the option passed only at compile time, the link step falls back to the default int range and kernels launched over more than INT_MAX work-items raise a RuntimeError.
antonwolfy
requested review from
ndgrigorian and
vlad-perevezentsev
as code owners
October 7, 2026 13:13
Contributor
|
View rendered docs @ https://intelpython.github.io/dpnp/pull/3089/index.html |
Collaborator
Contributor
|
Array API standard conformance tests for dpnp=0.21.0dev13=np2py314h8d9cdd5_4 ran successfully. |
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.
This PR fixes a
RuntimeErrorraised by kernels launched over more thanINT_MAXwork-items when dpnp is built with DPC++ compiler 2026.2:It affects operations on arrays with more than
2**31elements that go through a strided kernel, e.g. copying a broadcast view,dpnp.take, advanced indexing,dpnp.chooseand assignment through__setitem__. Builds with DPC++ 2026.1 are not affected.Starting with 2026.2, the range a kernel assumes for its work-item IDs is recorded in the device image at the device link step, and the SYCL runtime checks each launch against it. dpnp passed
-fno-sycl-id-queries-fit-in-intonly at compile time, so the link step recorded the defaultintrange even though the device code was built forsize_t.The existing option spelling is kept because both 2026.1 and 2026.2 accept it.
The third party tests for arrays with more than
2**31elements are updated:TestHugeArrays: newtest_take_negative_index_at_int32_size_boundary, which uses a broadcast view, needs no real allocation and runs by default; reworkedtest_take_arrayandtest_take_scalarTestTriLargeDimensionsfordpnp.triwith more than2**31rows or columnsValidated with DPC++ 2026.2 on Intel Data Center GPU Max 1100 (Level Zero) and on CPU (OpenCL), running the slow tests with
-m slow; results are the same on both devices:TestHugeArrays::test_advancedTestHugeArrays::test_take_arrayTestHugeArrays::test_take_scalarTestHugeArrays::test_chooseTestTriLargeDimensions(2 tests)The default (non-slow) run of the changed test files passes on both devices, and the build has no new warnings.