Commit 8189ad4
Add table_names as a instance variable of SplitTableBatchedEmbeddingBagsCodegen (pytorch#5133)
Summary:
Pull Request resolved: pytorch#5133
X-link: https://github.com/facebookresearch/FBGEMM/pull/2135
`table_names` is required for raw embedded streaming to support tracking in mpzch modules.
Example usage in embedding module to look up raw ids
```
assert hasattr(
self.emb_module, "res_params"
), "res_params should exist when raw_id_tracker is enabled"
res_params: RESParams = self.emb_module.res_params # pyre-ignore[9]
table_names = res_params.table_names
raw_ids_dict = raw_id_tracker_wrapper.get_indexed_lookups(
table_names, self.emb_module.uuid
)
```
`table_names` only exist when raw embedded streaming is enabled.
During testing, we may disable raw embedded streaming (hence no `res_params`) this tight coupling makes testing difficult. This diff adds `table_names` as a instance variable of `SplitTableBatchedEmbeddingBagsCodegen` so we can easily retrieve `table_names` w/o depending on raw embedded streaming.
Reviewed By: chouxi
Differential Revision: D87089649
fbshipit-source-id: 9f4d28a5d76d7c1fa605639343f1c535a49d58041 parent 05d804b commit 8189ad4
File tree
1 file changed
+1
-0
lines changed- fbgemm_gpu/fbgemm_gpu
1 file changed
+1
-0
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
| 713 | + | |
713 | 714 | | |
714 | 715 | | |
715 | 716 | | |
| |||
0 commit comments