Skip to content

Commit b4137fc

Browse files
kausvfacebook-github-bot
authored andcommitted
Fix test for embedding sharding (#4456)
Summary: X-link: facebookresearch/FBGEMM#1517 Pull Request resolved: #4456 We were trying to log an optional tensor. I added conditional logging. Failing test https://www.internalfb.com/intern/test/281475196311912 Reviewed By: q10 Differential Revision: D77963539 fbshipit-source-id: a79f7cae51a6b38ee2dee25b6e1be2e571865423
1 parent bea4890 commit b4137fc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fbgemm_gpu/fbgemm_gpu/tbe/ssd/training.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2291,8 +2291,7 @@ def split_optimizer_states(
22912291
table_offset += emb_height
22922292
logging.info(
22932293
f"KV ZCH tables split_optimizer_states query latency: {(time.time() - start_time) * 1000} ms, "
2294-
# pyre-ignore [16]
2295-
f"num ids list: {[ids.numel() for ids in sorted_id_tensor]}"
2294+
f"num ids list: {None if not sorted_id_tensor else [ids.numel() for ids in sorted_id_tensor]}"
22962295
)
22972296
return opt_list
22982297

0 commit comments

Comments
 (0)