forked from pytorch/FBGEMM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add lock for l2 cache set/get (pytorch#3153)
Summary: X-link: facebookresearch/FBGEMM#248 Pull Request resolved: pytorch#3153 In non pipelining mode, the sequence is - get_cuda(): L2 read and insert L2 cache misses into queue for bg L2 write - L1 cache eviction: insert into bg queue for L2 write - ScratchPad update: insert into bg queue for L2 write in non-prefetch pipeline, cuda synchronization guarantee get_cuda() happen after SP update in prefetch pipeline, cuda sync only guarantee get_cuda() happen after L1 cache eviction pipeline case, SP bwd update could happen in parallel with L2 read lock is used for l2 cache to do read / write exclusively add unittest to capture L2 cache functionality and the cases discussed above Reviewed By: q10 Differential Revision: D63010906 fbshipit-source-id: 3951ce138acb53da4f7aba01a03c46409a6fc630
- Loading branch information
1 parent
12710ef
commit 904a1c6
Showing
6 changed files
with
337 additions
and
14 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.