Factor Module into Object and Module

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/29500

Test Plan: Imported from OSS

Differential Revision: D18463064

Pulled By: jamesr66a

fbshipit-source-id: d37bef242a8626593d4b8754042152cfc0f0acb2
This commit is contained in:
James Reed
2019-11-17 22:56:49 -08:00
committed by Facebook Github Bot
parent 14946a8891
commit 18bdf97dbb
24 changed files with 368 additions and 301 deletions

View File

@@ -64,7 +64,7 @@ void testModuleInterfaceSerialization() {
parentMod.register_attribute(
"subMod",
cu->get_interface("__torch__.OneForward"),
subMod.module_object(),
subMod._ivalue(),
/*is_parameter=*/false);
parentMod.define(parentForward, nativeResolver());
ASSERT_TRUE(parentMod.hasattr("subMod"));