Skip to content

Commit

Permalink
[jit] Allow custom class functions to be traced in invokeScriptMethod…
Browse files Browse the repository at this point in the history
…FromPython(). (pytorch#67380)

Summary: Pull Request resolved: pytorch#67380

Test Plan: eyes

Reviewed By: tugsbayasgalan

Differential Revision: D31975656

fbshipit-source-id: 47c8c9854899e9fed5a635f88470711dc4c95970
  • Loading branch information
zhxchen17 authored and facebook-github-bot committed Oct 27, 2021
1 parent 2267a98 commit f20614a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torch/csrc/jit/python/pybind_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ inline py::object runAndInsertCall(
// and then run the callee with tracing disabled.

// Get the graph `Value`s that represent the input IValues
auto inputs = last(stack, toGraphFunction(callee).graph()->inputs().size());
auto inputs = last(stack, callee.num_inputs());
auto input_values =
fmap(inputs, [](const IValue& v) { return tracer::getValueTrace(v); });
TORCH_INTERNAL_ASSERT(callee.getSchema().returns().size() == 1)
Expand Down

0 comments on commit f20614a

Please sign in to comment.