Skip to content

Commit

Permalink
fix wrongly exchanged variable
Browse files Browse the repository at this point in the history
Signed-off-by: Masaki Kozuki <mkozuki@nvidia.com>
  • Loading branch information
crcrpar committed May 12, 2023
1 parent db8e514 commit ef7e9c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchgen/api/autograd.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def is_reference_for_foreach(
f.func.name.name.base.split("_foreach_")[-1] == function_schema.name.name.base
and (
not function_schema.name.name.inplace
or str(function_schema.name) in _foreach_with_inplace_ref
or str(f.name) in _foreach_with_inplace_ref

Check failure on line 329 in torchgen/api/autograd.py

View workflow job for this annotation

GitHub Actions / lintrunner / linux-job

MYPYSTRICT [attr-defined]

"NativeFunction" has no attribute "name"
)
and all(
ref_arg.type in (arg.type, getattr(arg.type, "elem", None))
Expand Down

0 comments on commit ef7e9c6

Please sign in to comment.