Skip to content
This repository was archived by the owner on Jan 28, 2026. It is now read-only.
1 change: 1 addition & 0 deletions tests/fixtures/misc/checker/logsumexp.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@
y = torch.log(2 + x)
y = torch.sum(torch.log(torch.exp(x)), 1)
y = torch.exp(torch.sum(torch.log(x), 1, keepdim=True))
y = torch.log(torch.sum(torch.exp(2.5)))
2 changes: 1 addition & 1 deletion torchfix/visitors/misc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ def visit_Call(self, node):
node.args[0].value.args[0].value
)
== "torch.exp"
):
) and len(node.args[0].value.args) > 1 and node.args[0].value.args[1].value is not None:
self.add_violation(
node,
error_code=self.ERRORS[0].error_code,
Expand Down