Implement NetDef <--> JIT IR converters. (#16967)
authorMikhail Zolotukhin <mvz@fb.com>
Thu, 14 Feb 2019 02:15:57 +0000 (18:15 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 14 Feb 2019 02:39:39 +0000 (18:39 -0800)
commitd25fee31fcef8aea6489d8ebe8d2ece9aa6c5832
treee175a99408223812c39d53a3122e1f12f0152d77
parentdecc0893f242b014b21ed14409fea307da43d52a
Implement NetDef <--> JIT IR converters. (#16967)

Summary:
Currently the converters are very straightforward, i.e. there is no code for trying to
preserve semantics, we're purely perform conversion from one format to another.

Two things that we might want to add/change:
1. Add semantic conversion as well (but probably it would be a good idea to keep
it separate as a temporary thing).
2. Make sure we don't mess with value names, as they are crucial for current
uses of NetDefs.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16967

Differential Revision: D14062537

Pulled By: ZolotukhinM

fbshipit-source-id: 88b184ee7276779e5e9152b149d69857515ad98a
test/cpp/jit/gtest.cpp
test/cpp/jit/no-gtest.cpp
test/cpp/jit/test_netdef_converter.h [new file with mode: 0644]
torch/CMakeLists.txt
torch/csrc/jit/netdef_converter.cpp [new file with mode: 0644]
torch/csrc/jit/netdef_converter.h [new file with mode: 0644]