Repository navigation
Fix packed cache reuse across source layouts - #382
Open
vera-rubin wants to merge 1 commit into
Open
vera-rubin wants to merge 1 commit into
vera-rubin wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the PrepackedCache key in the ruy library to include the source matrix's layout (MatLayout). This ensures that different source views (which might have the same packed layout but different packed values, such as transposed views or different strides) are correctly distinguished in the cache and do not incorrectly reuse cached entries. To support this, an equality operator was added for MatLayout, the cache key hash function was updated to incorporate the source layout, and a new test suite was added to verify cache behavior with different source layouts. There are no review comments to address, and I have no additional feedback to provide.
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.
We omitted source layout, letting transposed LHS and RHS in
Mul(A, A)share wrong packed operands and reuse stale entries after view order or stride changes. Keys retain source pointer, packed layout and zero point, adding source dimensions, order and stride to equality and hashing.Regression checks self-product, changed views and repeated cache reuse using StandardCpp with one thread. Reproducer and regression failed at base. Both and five targeted existing CTest targets (caching, context, matrix layout, float and int8 multiplication) pass.
Version: base commit
2264753777198e4393fb83c44c693462d57a2be1, GCC 13.3.0 Release, Linux x86_64.Fixes #381
— ChipLab