apply() for ScriptModules (#14655)
authorJames Reed <jamesreed@fb.com>
Mon, 10 Dec 2018 23:35:11 +0000 (15:35 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Mon, 10 Dec 2018 23:40:31 +0000 (15:40 -0800)
commit0a36fe565d016cad5ff3296e1bf2a4f5716b6030
tree8172f6d781bf8430da37d24665c0d8de7e6c77ac
parent9bbb3efe2fe63e59b13ac1a7b13bc0d493ea6d3a
apply() for ScriptModules (#14655)

Summary:
This can be use to initialize state that is not necessarily eligible for serialization/is implementation-specific. Concretely, I'm going to use this to pack the weight matrices for quantized Linear modules according to the FBGEMM APIs
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14655

Differential Revision: D13404438

Pulled By: jamesr66a

fbshipit-source-id: 2d327cef5520fdd716b5b1b29effd60a049e8a4a
test/test_jit.py
torch/csrc/jit/script/init.cpp
torch/csrc/jit/script/module.h