Commit 3df231b
Convert ops_common.py to re-export shell (#5794)
Summary:
Pull Request resolved: #5794
Convert split_table_batched_embeddings_ops_common.py from a 528-line
module defining all TBE common types to a ~60-line re-export shell that
imports from the canonical locations:
- Core types (EmbeddingLocation, PoolingMode, etc.) from fbgemm_gpu.tbe.config
- Cache types (CacheAlgorithm, CacheState) from fbgemm_gpu.tbe.cache.cache_config
- SSD types (EvictionPolicy, KVZCHParams, etc.) from fbgemm_gpu.tbe.ssd.ssd_config
Infrastructure changes:
- Create lightweight :tbe_cache_config and :tbe_ssd_config BUCK targets
- Remove cache_config.py/ssd_config.py from their parent ops targets' srcs
- Add get_new_embedding_location() to tbe/config/embedding_config.py
All existing import paths continue to work unchanged.
Reviewed By: henrylhtsang
Differential Revision: D103477971
fbshipit-source-id: cf18816bdc8d42e0d839595b584058854de647601 parent 07767a8 commit 3df231b
23 files changed
Lines changed: 152 additions & 592 deletions
File tree
- fbgemm_gpu
- fbgemm_gpu
- tbe
- bench
- cache
- config
- ssd
- test/tbe/ssd
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
21 | 18 | | |
22 | 19 | | |
23 | 20 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 21 | | |
33 | 22 | | |
34 | 23 | | |
| |||
48 | 37 | | |
49 | 38 | | |
50 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
0 commit comments