Skip to content

Add support for tt.dot using 3d tensors - #352

Open
Daniel (Dasor) wants to merge 1 commit into
microsoft:mainfrom
Dasor:dot3d
Open

Add support for tt.dot using 3d tensors#352
Daniel (Dasor) wants to merge 1 commit into
microsoft:mainfrom
Dasor:dot3d

Conversation

@Dasor

@Dasor Daniel (Dasor) commented Sep 9, 2025

Copy link
Copy Markdown

Really simple change to emit linalg.batch_matmul instead of linalg.matmul if the input to tt.dot is a 3d tensor.

@ziliangzl

Copy link
Copy Markdown
Contributor

Hi Daniel (@Dasor), I'm just curious if there would be a Triton kernel that could actually utilize a 3d tt.dot?

@Dasor

Copy link
Copy Markdown
Author

Hi Ziliang Zhang (@ziliangzl) yes there are, I added support for it because this test from triton-cpu was failing:

https://github.com/triton-lang/triton-cpu/blob/main/python/test/unit/language/test_core.py#L4203

@ziliangzl

Copy link
Copy Markdown
Contributor

Oh I see, I honestly didn’t know that a 3D tt.dot could be implemented this way.
Thanks a lot for pointing me to the test, that’s really helpful!🙏

@Dasor

Copy link
Copy Markdown
Author

May I have this PR and my other one review? Micah Weston (@red1bluelost)

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.

2 participants