Skip to content

Commit c46bd47

Browse files
flaviotruzzifacebook-github-bot
authored andcommitted
- Clean torch.check (#4871)
Summary: torch._check expects a string, however this was passing a lambda function that returned a string, which was causing a issues when compiling the code with PT2. Just cleaned it up to use f-string. Reviewed By: spcyppt Differential Revision: D82347053
1 parent 36c506b commit c46bd47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fbgemm_gpu/fbgemm_gpu/quantize_comm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def calc_quantized_size(
230230
ctx = none_throws(ctx)
231231
torch._check(
232232
input_len % ctx.row_dim == 0,
233-
lambda: f"input_len {input_len} is not a multiple of row dim {ctx.row_dim}",
233+
f"input_len {input_len} is not a multiple of row dim {ctx.row_dim}",
234234
)
235235
assert input_len % ctx.row_dim == 0, (
236236
f"input_len {input_len} is not a multiple of row dim {ctx.row_dim} "

0 commit comments

Comments
 (0)