-
Notifications
You must be signed in to change notification settings - Fork 28
[WIP] Fix overflow when shape >= 32Kx32Kx32K, buffer overflow #1061
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
ba99de6
e3f601f
503ed39
9d4629f
cae348a
7a21b68
ac1e9f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -366,10 +366,11 @@ def testScaledBatchedGemmMXFP4Codegen(use_water_backend: bool, tmp_path: Path): | |
| "s_waitcnt vmcnt(0)", | ||
| "s_waitcnt vmcnt(0) lgkmcnt(0)", | ||
| "s_waitcnt vmcnt(0)", | ||
| "s_waitcnt lgkmcnt(14)", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is... a lot.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that's what error message stated.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What error message? This is a test looking for the presence of exact strings. It likely told you that a new string is present. But we need to understnad what that means, in particular we are adding a lot waits here, which will decrease performance. |
||
| "s_waitcnt lgkmcnt(7)", | ||
| "s_waitcnt lgkmcnt(5)", | ||
| "s_waitcnt lgkmcnt(4)", | ||
| "s_waitcnt lgkmcnt(3)", | ||
| "s_waitcnt lgkmcnt(6)", | ||
| "s_waitcnt lgkmcnt(1)", | ||
| "s_waitcnt lgkmcnt(2)", | ||
| "s_waitcnt lgkmcnt(1)", | ||
| "s_waitcnt lgkmcnt(0)", | ||
| ] | ||
|
|
@@ -834,6 +835,7 @@ def testScaledGemmMXFP4PreshuffleB( | |
| (64, 128, 256), | ||
| (64, 128, 128), | ||
| (64, 64, 128), | ||
| (64, 64, 256), | ||
| (32, 192, 256), | ||
| (32, 128, 256), | ||
| (32, 64, 256), | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fly-by: where does this number come from? This is an 8GB buffer, whereas it looks like we have M, N = 16, 16, meaning I'd expect to see 256 here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see the diff, it is updated from 1073741822 (f32) to 2147483646 (f16)
that is
((2^32 - 1) // 2) - 1There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but why do we use this number? Memref sizes are meaningful for MLIR optimization, you must not have a wrong size.