pytorch/torch/csrc/jit/script
Zachary DeVito fd31eae9ad Switch import/export to python printing (#14400)
Summary:
Stacked on https://github.com/pytorch/pytorch/pull/14378, only look at the last commit.

This changes the way methods are defined in TorchScript archives to use
PythonPrint rather than ONNX protobufs.

It also updates torch.proto to directly document the tensor data
structure actually being serialized.

Notes:
* because PythonPrint prints all the methods at once per module, this
  removes MethodDef in favor of a single torchscript_area and a separate
  caffe2_graphs entry. Note that NetDef's already have method names,
  so there is no need or a separate method name entry.
* This switches cpp/pickle area to RecordRef (references to a file in
  the container format) since it is possible the data in these arenas
  may be large and not suited to json ouput.
* Removes 'annotations' -- annotations should be re-added on the first
  commit that actually has a practical use for them. In the current state
  it is unlikely they are representing the right information.
* Some expect files have changed because PythonPrint is preserving more
  debug name information for parameter names.
* MethodEncoder (the ONNX output format) has been deleted. There is still
  some cleanup possible combining EncoderBase and GraphEncode now that there
  is only a single pathway using EncoderBase.
* This incorporates the changes from #14397
  to define TensorDef
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14400

Reviewed By: suo

Differential Revision: D13231800

Pulled By: zdevito

fbshipit-source-id: af5c1152d0bd6bca8b06c4703f59b161bb19f571
2018-11-29 17:53:49 -08:00
..
builtin_functions.cpp Import a method from an python_print string (#13959) 2018-11-15 16:11:37 -08:00
builtin_functions.h Introduce builtin script functions (#12141) 2018-09-28 10:55:08 -07:00
compiler.cpp Switch import/export to python printing (#14400) 2018-11-29 17:53:49 -08:00
compiler.h Add boolean dispatch for function overloading (#14425) 2018-11-27 19:36:47 -08:00
error_report.h Add modernize-* checks to clang-tidy (#13196) 2018-11-02 20:30:40 -07:00
init.cpp Switch import/export to python printing (#14400) 2018-11-29 17:53:49 -08:00
init.h [jit] Have ScriptModule inherit from Module (#5769) 2018-03-22 00:17:49 -04:00
jit_exception.h First step at adding exceptions (#12789) 2018-10-30 20:25:50 -07:00
lexer.cpp add floordiv and bitwise ops 2018-11-13 16:32:22 -08:00
lexer.h Address jittering issues in python_print (#14064) 2018-11-21 06:38:29 -08:00
module.cpp Change return type of Tensor::dtype() from ScalarType to TypeMeta (#12766) 2018-10-26 09:27:09 -07:00
module.h Handling of pretty-printing methods (#14378) 2018-11-27 17:10:23 -08:00
parser.h Print default values and introduce ir view classes (#14176) 2018-11-27 11:48:27 -08:00
python_tree_views.cpp Print default values and introduce ir view classes (#14176) 2018-11-27 11:48:27 -08:00
python_tree_views.h Add workaround to fix include warnings in Python 2 builds. (#6716) 2018-04-24 12:30:19 -07:00
tree_views.h Print default values and introduce ir view classes (#14176) 2018-11-27 11:48:27 -08:00
tree.h Add modernize-* checks to clang-tidy (#13196) 2018-11-02 20:30:40 -07:00