pytorch/torch/csrc/jit/serialization
Michael Suo d4fa84bf5f Properly serialize types that only appear at function input (#47775)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47775

When serializing graphs, we check every node for named types referenced,
so that we can register them as dependencies. We were skipping this
check for the graph inputs themselves. Since types used at input are
almost always used somewhere in the graph, we never noticed this gap
until a user reported an issue with NamedTuples.

Test Plan: Imported from OSS

Reviewed By: jamesr66a

Differential Revision: D24896289

Pulled By: suo

fbshipit-source-id: 4ce76816cb7997a7b65e7cea152ea52ed8f27276
2020-11-11 15:27:00 -08:00
..
export_module.cpp Add error messages and workaround for RET failure of containers with a torch class type (#46543) 2020-10-26 10:46:07 -07:00
export.cpp [ONNX] Add dim_param support in export with onnx shape inference (#44920) 2020-09-30 21:56:24 -07:00
export.h [ONNX] Add dim_param support in export with onnx shape inference (#44920) 2020-09-30 21:56:24 -07:00
import_export_constants.h Get, save, and load module information for each operator (#42133) 2020-08-14 01:25:27 -07:00
import_export_functions.h
import_export_helpers.cpp
import_export_helpers.h
import_legacy.cpp Generalize constant_table from tensor only to ivalue (#40718) 2020-07-09 09:09:40 -07:00
import_legacy.h
import_source.cpp Implement JIT Enum type serialization and deserialization (#43460) 2020-08-24 12:04:31 -07:00
import_source.h Generalize constant_table from tensor only to ivalue (#40718) 2020-07-09 09:09:40 -07:00
import.cpp Compile less legacy code when BUILD_CAFFE2 is set to False (take 2) (#44453) 2020-09-11 16:27:47 -07:00
import.h
onnx.cpp [ONNX] Update ONNX shape inference (#43929) 2020-09-14 15:36:19 -07:00
onnx.h [ONNX] Utilize ONNX shape inference for ONNX exporter (#40628) 2020-08-30 18:35:46 -07:00
pickle.cpp
pickle.h
pickler.cpp Add an option to getWriteableTensorData to avoid copy CUDA tensor to CPU (#46524) 2020-10-20 08:54:58 -07:00
pickler.h Add an option to getWriteableTensorData to avoid copy CUDA tensor to CPU (#46524) 2020-10-20 08:54:58 -07:00
python_print.cpp Properly serialize types that only appear at function input (#47775) 2020-11-11 15:27:00 -08:00
python_print.h [jit] Speed up saving in case of many classes (#44589) 2020-09-15 15:10:45 -07:00
source_range_serialization_impl.h
source_range_serialization.cpp
source_range_serialization.h
type_name_uniquer.cpp
type_name_uniquer.h
unpickler.cpp Define the record_stream method in native_functions.yaml (#44301) 2020-10-13 09:15:22 -07:00
unpickler.h Extract rpc/tensorpipe_utils.{cpp,h} from rpc/utils.{cpp,h} (#44803) 2020-09-18 13:51:43 -07:00