Skip to content

Test assigning through multi-dimensional masks - #818

Merged
maleadt merged 1 commit into
mainfrom
tb/logical-index-tests
Oct 22, 2026
Merged

maleadt merged 1 commit into
mainfrom
tb/logical-index-tests

Conversation

@maleadt

@maleadt maleadt commented Oct 19, 2026

Copy link
Copy Markdown
Member

The logical indexing tests only assigned through a vector mask. Assigning through the mask of a matrix (A[A .== 0] .= 1) goes through a SubArray indexed by CartesianIndex instead, which is what failed in JuliaGPU/oneAPI.jl#461 back when the indices stayed on the host. This adds that case, a mask mixed with a colon (A[:, m] .= 0), plain A[m] = B[m], and a check that view(A, mask) keeps its indices on the device.

With the 2-arg to_indices override disabled, all of the new tests fail on oneAPI.

The logical indexing tests only assigned through a vector mask. A mask
of a matrix goes through a SubArray of CartesianIndex instead, which is
what failed in oneAPI.jl#461 when the indices stayed on the host. Also
cover a mask mixed with a colon, plain setindex! through a mask, and
check that a view by mask keeps its indices on the device.
@maleadt maleadt added ci CI infrastructure, flaky tests, the test suite. arrays The array abstraction: broadcasting, mapreduce, indexing, views, generic linear algebra. labels Oct 19, 2026
@maleadt
maleadt merged commit c397972 into main Oct 22, 2026
18 checks passed
@maleadt
maleadt deleted the tb/logical-index-tests branch October 22, 2026 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrays The array abstraction: broadcasting, mapreduce, indexing, views, generic linear algebra. ci CI infrastructure, flaky tests, the test suite.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant