Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set cache_precision = weights_precision in TBE if it is not explicitl…
…y set (#3370) Summary: Pull Request resolved: #3370 X-link: facebookresearch/FBGEMM#461 For historical reasons, we have decoupled cache_precision and weights_precision. This was to allow for lower precision embedding, while the hot ones in the cache are using higher precision. But it is not used. This decoupling has been source of unintentional difference in cache_precision and weights_precision for typical EMO usecases where we do want cache_precision == weights_precision. We had enforced this in torchrec (see [this](https://www.internalfb.com/code/fbsource/[3868325cdafd]/fbcode/torchrec/distributed/batched_embedding_kernel.py?lines=962-963%2C1446-1447)), but as new stacks are enabled, this could be overwritten. Here we enforce cache_precision = weights_precision if cache precision is not explicitly set. Reviewed By: sryap, zhangruiskyline Differential Revision: D65865527 fbshipit-source-id: a79e6aad3b30c46c80f607f406930589d089f37a
- Loading branch information