Skip to content

test: elementwise ops on mismatched sizes throw DimensionMismatch#731

Open
JohnCobbler wants to merge 1 commit into
JuliaGPU:mainfrom
JohnCobbler:test/dimension-mismatch-elementwise
Open

test: elementwise ops on mismatched sizes throw DimensionMismatch#731
JohnCobbler wants to merge 1 commit into
JuliaGPU:mainfrom
JohnCobbler:test/dimension-mismatch-elementwise

Conversation

@JohnCobbler

Copy link
Copy Markdown

Adding mismatched-size GPU arrays with + used to silently truncate to the
shorter operand (JuliaGPU/CUDA.jl#2812). That path is gone — + now goes
through Base promote_shape and throws DimensionMismatch symmetrically,
matching Base.Array. This adds a guard in the broadcasting testsuite so it
stays that way.

The check sits in the parameterized testsuite, so it runs for every backend;
on CPU CI it exercises the same dispatch (the throw happens in promote_shape
before any kernel launch), and a CUDA backend confirms the device path.

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant