Skip to content

Commit 1b2cde4

Browse files
committed
fix(aten::neg): Fix a index bug in neg
Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent 2b23874 commit 1b2cde4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: core/conversion/evaluators/aten.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ auto aten_registrations = RegisterNodeEvaluators()
165165
}).evaluator({
166166
c10::Symbol::fromQualString("aten::neg"),
167167
[](const torch::jit::Node* n, kwargs& args) -> c10::optional<torch::jit::IValue> {
168-
auto el = args.at(n->input(1)).unwrapToInt();
168+
auto el = args.at(n->input(0)).unwrapToInt();
169169

170170
return el * -1;
171171
},

0 commit comments

Comments
 (0)