Skip to content

Commit bfa83ec

Browse files
spcypptmeta-codesync[bot]
authored andcommitted
Fix warning for front/backend package mismatch (#5117)
Summary: Pull Request resolved: #5117 X-link: https://github.com/facebookresearch/FBGEMM/pull/2123 as titled Reviewed By: gchalump, q10 Differential Revision: D86804784 fbshipit-source-id: c597f04f89f28108520845e5524898d82807ef19
1 parent 58ae4dd commit bfa83ec

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

fbgemm_gpu/codegen/training/pt2/embedding_split_host_pt2_autograd_template.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,13 +1236,15 @@ Tensor {{ bwd_mdesc }}_embedding_codegen_lookup_{{ optimizer }}_function_pt2(
12361236

12371237
{%- if has_gpu_support or has_cpu_support %}
12381238

1239-
TORCH_WARN_ONCE(aux_tensor.size() <= AUX_TENSOR_SIZE,
1240-
"aux_tensor.size() should not be larger than ",
1241-
AUX_TENSOR_SIZE,
1242-
"but found to be ",
1243-
aux_tensor.size(),
1244-
". This means frontend package does not match with backend package, so some functionalities might be missing. Please contact FBGEMM team for any assistance."
1245-
);
1239+
if (aux_tensor.size() > AUX_TENSOR_SIZE){
1240+
TORCH_WARN_ONCE(
1241+
"aux_tensor.size() should not be larger than ",
1242+
AUX_TENSOR_SIZE,
1243+
" but found to be ",
1244+
aux_tensor.size(),
1245+
". This is possibly due to frontend package does not match with backend package, so some functionalities from the backend might be missing. Please contact FBGEMM team for any assistance."
1246+
);
1247+
}
12461248

12471249
{%- if not dense %}
12481250
// Load the config value from JK once

0 commit comments

Comments
 (0)