fix(cml): correct MLCT layout and MatrixReg store addresses - #38
Merged
Conversation
Gs-ygc
requested review from
Wonicon,
ecall73,
he-sheng-jie,
wakafa1 and
yu-yake2002
and
a lite review from Copilot
and removed request for
Copilot
August 17, 2026 09:52
There was a problem hiding this comment.
Pull request overview
This PR fixes correctness issues in the CMemoryLoader (CML) related to MLCT load layout and MSC/MSCT store MatrixReg addressing, especially under out-of-order load responses and when using physical row-group strides.
Changes:
- Add
IsLoadTransposehandling and metadata tracking so out-of-order MLCT responses are scattered into the correct transposed C MatrixReg bank/entry/byte-lane locations. - Update store-side MatrixReg traversal to use physical row-group stride addressing (rather than packed logical addressing), including transpose-aware iterator progression.
- Add new ChiselTest regressions covering (a) out-of-order transpose-load scattering and (b) store MatrixReg address sequencing.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main/scala/CMemoryLoader.scala | Implements transpose-aware MLCT load scattering and fixes store MatrixReg address traversal/transpose block handling. |
| src/test/scala/cute/CMemoryLoaderTransposeSpec.scala | New regression test for out-of-order cacheline responses scattered into transposed C MatrixReg layout. |
| src/test/scala/cute/CMemoryLoaderStoreAddressSpec.scala | New regression test validating physical row-group stride addressing for store-side MatrixReg reads (transpose and non-transpose). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } | ||
| } | ||
|
|
||
| Current_Load_Scp_addr := Current_Load_Scp_addr + 1.U |
Contributor
|
LGTM |
ecall73
approved these changes
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
After the MLCT decode hang was fixed, a 64 x 64 e32 MLCT -> MSC self-check failed at the first element of the ninth 8 x 8 block:
The load path kept the non-transposed bank mapping, while the store path advanced packed logical addresses (
... 7, 8) instead of the physical row-group stride (... 7, 64).Fix
Tensor_MN / Matrix_MNstrideValidation
CMemoryLoaderTransposeSpecandCMemoryLoaderStoreAddressSpec: 3 tests passedmake comp: passedDefaultMatrixConfig: MLC/MLCT x MSC/MSCT all passed self-checkDepends on #37.