You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
change from first element to a random element for cache missing items (#4955)
Summary:
Pull Request resolved: #4955
X-link: https://github.com/facebookresearch/FBGEMM/pull/1974
In inference zch backend, we cannot use initializer to randomized init value for cache missing items, as the intializer does not work in parallel read and write mode.
The current behavior is to always get the first item in hash map, but that has less randmization.
This diff added a randmization for cache missing ids, also add a log to show the missing ids in every batch.
update:
- changed back to use hashmap size, instead of allocated block for randomization base
- check if the block is used
the reason is that, there could be blocks allocated, but never being used, in that case, if we choose that value, it will return all 0s. Verified the new change in VG, and no performance reggression.
Reviewed By: EddyLXJ, steven1327
Differential Revision: D83612329
fbshipit-source-id: 23e7f0d1e249c9a3117800c6f992104900fca748
0 commit comments