Skip to content

Commit bbda1ee

Browse files
laithsakkafacebook-github-bot
authored andcommitted
Remove guard_size_oblivious from embedding_backward_split_meta_template.
Summary: X-link: facebookresearch/FBGEMM#1990 guard_size_oblivious will be deprecated. Differential Revision: D83886041
1 parent 534ce1b commit bbda1ee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fbgemm_gpu/codegen/training/backward/embedding_backward_split_meta_template.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Tensor {{ mdesc }}_embedding{{ ndesc }}_backward_codegen_{{ optimizer }}_{{ desc
159159
{%- endif %}
160160

161161
// short-circuit if there are zero indices.
162-
if (TORCH_GUARD_SIZE_OBLIVIOUS(indices.sym_numel().sym_eq(0))) {
162+
if (TORCH_GUARD_OR_FALSE(indices.sym_numel().sym_eq(0))) {
163163
{%- if dense %}
164164
return grad_dev_weights;
165165
{%- elif optimizer == "none" %}
@@ -213,7 +213,7 @@ Tensor {{ mdesc }}_embedding{{ ndesc }}_backward_codegen_{{ optimizer }}_{{ desc
213213

214214
// Took allocation from https://www.internalfb.com/code/fbsource/fbcode/deeplearning/fbgemm/fbgemm_gpu/src/split_embeddings_utils.cu?lines=339-347
215215
Tensor sorted_linear_indices_run;
216-
if (TORCH_GUARD_SIZE_OBLIVIOUS(total_unique_indices.sym_gt(0))) {
216+
if (TORCH_GUARD_OR_TRUE(total_unique_indices.sym_gt(0))) {
217217
sorted_linear_indices_run = at::empty_symint({total_unique_indices}, indices.options());
218218
} else {
219219
sorted_linear_indices_run = at::empty_like(indices);

0 commit comments

Comments
 (0)