Skip to content

Commit 7bee788

Browse files
Andrew Tullochfacebook-github-bot
authored andcommitted
Enable indices bounds check by default
Summary: ... Reviewed By: jianyuh Differential Revision: D31234815 fbshipit-source-id: 9584e7c00cb85c159522242a9f4c3e1a14f9af55
1 parent 581277e commit 7bee788

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fbgemm_gpu/fbgemm_gpu/split_table_batched_embeddings_ops.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -548,9 +548,8 @@ def forward(
548548
feature_requires_grad: Optional[Tensor] = None,
549549
) -> Tensor:
550550
(indices, offsets) = indices.long(), offsets.long()
551-
# TODO(tulloch): enable this after sufficient forward-compatibility period.
552-
# if self.bounds_check_mode_int != BoundsCheckMode.NONE.value:
553-
# torch.ops.fb.bounds_check_indices(self.rows_per_table, indices, offsets, self.bounds_check_mode_int, self.bounds_check_warning)
551+
if self.bounds_check_mode_int != BoundsCheckMode.NONE.value:
552+
torch.ops.fb.bounds_check_indices(self.rows_per_table, indices, offsets, self.bounds_check_mode_int, self.bounds_check_warning)
554553
self.step += 1
555554
if len(self.timesteps_prefetched) == 0:
556555
self.prefetch(indices, offsets)

0 commit comments

Comments
 (0)