Skip to content

Closes 5040, fixing a bug in multi-dim matrix multiplication - #5042

Merged
ajpotts merged 2 commits into
Bears-R-Us:mainfrom
drculhane:Closes-5040
Nov 12, 2025
Merged

ajpotts merged 2 commits into
Bears-R-Us:mainfrom
drculhane:Closes-5040

Conversation

@drculhane

@drculhane drculhane commented Nov 10, 2025 •

Copy link
Copy Markdown
Contributor

Closes #5040.

As written, it was requiring matrices a and b to have the same domain, which was incorrect. The actual requirements are: (1) they have the same rank, and (2) the last two dimensions of each must be compatible with 2D matrix multiplication, i.e. m,k and k,n.

This fixes that bug.

Note about changes:

chapel-side: b now gets its own domain (named db), and the where clause in the proc includes da.rank == db.rank

python-side: the generic_msg call to the chapel-side now includes the rank of the right-side matrix (because the interface requires it), and pdaLeft and pdaRight have been renamed to pda_L and pda_R, largely because some lines were going over the 105 character limit.

@drculhane
drculhane marked this pull request as ready for review November 10, 2025 14:10

@e-kayrakli e-kayrakli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

Comment thread src/LinalgMsg.chpl Resolved
@ajpotts
ajpotts added this pull request to the merge queue Nov 12, 2025
Merged via the queue into Bears-R-Us:main with commit 972dfd1 Nov 12, 2025
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.

Fix bug in multidimmatmul proc declaration

3 participants