Store the optimize flag in module (#14166)
authorLu Fang <lufang@fb.com>
Mon, 19 Nov 2018 22:29:31 +0000 (14:29 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 19 Nov 2018 22:34:05 +0000 (14:34 -0800)
commitf34c848f525ca346637cb57e8b7a607285769e50
treea9ae97b60aa9cbde2722a48621e6b33b2e67b132
parent7fd1ea6ab792ac572f6e1261cc995d6447e66705
Store the optimize flag in module (#14166)

Summary:
When the save/load of script module, we store optimize flag in module instead of encoding it in method.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/14166

Reviewed By: ezyang

Differential Revision: D13117577

Pulled By: dzhulgakov

fbshipit-source-id: dc322948bda0ac5809d8ef9a345497ebb8f33a61
caffe2/proto/torch.proto
torch/csrc/jit/export.cpp
torch/csrc/jit/import.cpp
torch/csrc/jit/script/module.h