Add script standard library documentation + cleanup (#14912)
authorDavid Riazati <davidriazati@fb.com>
Wed, 12 Dec 2018 20:25:40 +0000 (12:25 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 12 Dec 2018 20:30:13 +0000 (12:30 -0800)
commit5837320b7062a360ad9c17e76650f318652d46a2
tree864883cc7df4168c730f6332004a29ec5c20c89c
parent64b336420918d31ee3da623bbcb7afadc73edb6d
Add script standard library documentation + cleanup (#14912)

Summary:
Documents what is supported in the script standard library.

* Adds `my_script_module._get_method('forward').schema()` method to get function schema from a `ScriptModule`
* Removes `torch.nn.functional` from the list of builtins. The only functions not supported are `nn.functional.fold` and `nn.functional.unfold`, but those currently just dispatch to their corresponding aten ops, so from a user's perspective it looks like they work.
* Allow printing of `IValue::Device` by getting its string representation
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14912

Differential Revision: D13385928

Pulled By: driazati

fbshipit-source-id: e391691b2f87dba6e13be05d4aa3ed2f004e31da
docs/source/jit.rst
torch/csrc/jit/pybind_utils.h
torch/csrc/jit/script/init.cpp
torch/jit/__init__.py
torch/jit/supported_ops.py