Skip to content

Commit 1c20cfb

Browse files
jd7-trfacebook-github-bot
authored andcommitted
Fix flaky Github test (#3312)
Summary: Pull Request resolved: #3312 https://github.com/pytorch/torchrec/actions/runs/17154190656/job/48667060189 Reviewed By: nipung90 Differential Revision: D80832364 fbshipit-source-id: c8b8de0d81658219f0bed65a72d639ea2bfd0f01
1 parent e0e6446 commit 1c20cfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchrec/sparse/jagged_tensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1104,7 +1104,7 @@ def _maybe_compute_stride_kjt(
11041104
stride_per_key_per_rank is not None and stride_per_key_per_rank.numel() > 0
11051105
):
11061106
# For VBE KJT, batch size should be based on inverse_indices when set.
1107-
if inverse_indices is not None:
1107+
if inverse_indices is not None and inverse_indices[1].numel() > 0:
11081108
return inverse_indices[1].shape[-1]
11091109

11101110
s = stride_per_key_per_rank.sum(dim=1).max().item()

0 commit comments

Comments
 (0)