Summary:
The type of each `initial_ivalue` is completely known at some point but that information is discarded by the time a call to it is emitted. This PR is kind of a hack, as a better (longer) solution, the method should know about the type of each initial value.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18156
Differential Revision:
D14525768
Pulled By: driazati
fbshipit-source-id:
52d53e9711a07a4551c988bd95fe997e654aa465
<< " attempting to call a method with parameters/attributes"
" from a raw graph. File a bug report";
}
- matched_schema->inputs.push_back(caller->get_or_add_parameter(member));
+ // TODO: preserve the type information so we don't have to infer it here
+ auto type = incompleteInferTypeFrom(*member);
+ matched_schema->inputs.push_back(
+ caller->get_or_add_attribute(type, member));
}
callee.check_single_output();
return inlineCallTo(graph, *callee.graph(), matched_schema->inputs).at(0);