-
Notifications
You must be signed in to change notification settings - Fork 17
optimize thread local cache for brgemm #353
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
29f25e2
add thread local cache for brgemm
37267a7
encapsulate thread local cache
880a3ff
best perf
64fe90e
use static func
36de9b0
fix comment
340c1ea
use vector
5f51e49
Merge remote-tracking branch 'origin/main' into zhangyan/fix_perf
cb77f94
Merge remote-tracking branch 'origin/main' into zhangyan/fix_perf
0fcf3e9
update
93f4031
Merge remote-tracking branch 'origin/main' into zhangyan/fix_perf
5c04e70
use static vector with size = 1024
6e92528
fix comment
a9e8265
Merge remote-tracking branch 'origin/main' into zhangyan/fix_perf
88437bd
fix comment
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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.
We are using a global temporary desc without syncronization?
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.
This is for save the desc object's address, which will be used in
g_cache.push_back(brgemm_cache_info_t{&desc, kernel, palette_buffer});
. Otherwise, the address will be invalid whendispatch func
return.Uh oh!
There was an error while loading. Please reload this page.
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.
But now every
&desc
points to the same object, and thebrgemm_desc_init
(will modify the global desc) has no synchronization at all?If we really need to use pointer of desc, I think we can appoint an maximal amount of dispatched kernel, and reserve desc vector pool of that size to avoid vector resizing, then we can use pointer to vector element.