Skip to content

Commit bfcbd1e

Browse files
chaodenguscmeta-codesync[bot]
authored andcommitted
Fix MPZCH model publish (#3464)
Summary: Pull Request resolved: #3464 Updated _hash_zch_bucket as a 2d tensor to enable quantization for GR Reviewed By: jeffreyjian, zlzhao1104 Differential Revision: D84944806 fbshipit-source-id: 8d46ba7741e88cd78d1ff5248f7bb98cbf975eec
1 parent 813a95e commit bfcbd1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchrec/modules/hash_mc_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def __init__(
305305

306306
self._max_probe = max_probe
307307
self._buckets = total_num_buckets
308-
self.register_buffer("_hash_zch_bucket", torch.tensor([total_num_buckets]))
308+
self.register_buffer("_hash_zch_bucket", torch.tensor([[total_num_buckets]]))
309309
# Do not need to store in buffer since this is created and consumed
310310
# at each step https://fburl.com/code/axzimmbx
311311
self._evicted_indices = []

0 commit comments

Comments
 (0)