Skip to content

Commit 7d2d498

Browse files
author
Martin Yuan
committed
Update on "[Lite Interpreter] Enable __setstate__ "
1. Serialize bytecode of __setstate__ and run it when loading the model. 2. One use case is quantization. To test this use case a few operators are registered temporarily for lite interpreter. The "_" prefix registration will be removed when the operators are all migrated to mobile. Differential Revision: [D20162898](https://our.internmc.facebook.com/intern/diff/D20162898)
1 parent 203dc76 commit 7d2d498

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

torch/csrc/jit/serialization/export_module.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static IValue Table(const std::vector<std::pair<std::string, IValue>>& entries)
4141
c10::IValue getFunctionTuple(const Function& func) {
4242
auto graph = func.graph()->copy();
4343
Inline(*graph);
44-
torch::jit::Code code(graph);
44+
torch::jit::Code code(graph, func.name());
4545

4646
// operator names
4747
std::vector<c10::OperatorName> opnames;

0 commit comments

Comments
 (0)