pytorch/torch/csrc/jit/script
Wanchao Liang ac00e85e36 Remove undefined tensor in jit script (#16379)
Summary:
This PR is a follow up of #15460, it did the following things:

* remove the undefined tensor semantic in jit script/tracing mode
* change ATen/JIT schema for at::index and other index related ops with `Tensor?[]` to align with what at::index is really doing and to adopt `optional[tensor]` in JIT
* change python_print to correctly print the exported script
* register both TensorList and ListOfOptionalTensor in JIT ATen ops to support both
* Backward compatibility for `torch.jit.annotate(Tensor, None)`

List of follow ups:

* remove the undefined tensor semantic in jit autograd, autodiff and grad_of
* remove prim::Undefined fully

For easy reviews, please turn on `hide white space changes` in diff settings.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16379

Differential Revision: D13855677

Pulled By: wanchaol

fbshipit-source-id: 0e21c14d7de250c62731227c81bfbfb7b7da20ab
2019-02-07 11:02:14 -08:00
..
builtin_functions.cpp Directly include headers from ATen. 2019-01-24 11:22:27 -08:00
builtin_functions.h clang format world (#15524) 2018-12-26 06:55:01 -08:00
compiler.cpp Remove undefined tensor in jit script (#16379) 2019-02-07 11:02:14 -08:00
compiler.h Trace fork and join calls 2019-01-26 14:42:45 -08:00
edit_distance.cpp Print out operator suggestions for unknown builtin op (#15183) 2019-01-04 13:04:44 -08:00
edit_distance.h Print out operator suggestions for unknown builtin op (#15183) 2019-01-04 13:04:44 -08:00
error_report.h clang format world (#15524) 2018-12-26 06:55:01 -08:00
final_returns.cpp clang format world (#15524) 2018-12-26 06:55:01 -08:00
final_returns.h clang format world (#15524) 2018-12-26 06:55:01 -08:00
init.cpp Rename DynamicType -> TensorType (#16787) 2019-02-06 17:31:07 -08:00
init.h Canonicalize all includes in PyTorch. (#14849) 2018-12-08 19:38:30 -08:00
jit_exception.h clang format world (#15524) 2018-12-26 06:55:01 -08:00
lexer.cpp clang format world (#15524) 2018-12-26 06:55:01 -08:00
lexer.h Add immutable dict support (#16208) 2019-01-31 14:29:23 -08:00
module.cpp Directly include headers from ATen. 2019-01-24 11:22:27 -08:00
module.h Integrate PyTorch quantization APIs into ensemble export modules (#309) 2019-02-05 01:55:11 -08:00
parse_string_literal.h clang format world (#15524) 2018-12-26 06:55:01 -08:00
parser.cpp Add immutable dict support (#16208) 2019-01-31 14:29:23 -08:00
parser.h clang format world (#15524) 2018-12-26 06:55:01 -08:00
python_tree_views.cpp Fix a lot of C++ build warnings (#16411) 2019-01-31 14:35:56 -08:00
python_tree_views.h clang format world (#15524) 2018-12-26 06:55:01 -08:00
schema_matching.cpp Remove undefined tensor in jit script (#16379) 2019-02-07 11:02:14 -08:00
schema_matching.h Remove undefined tensor in jit script (#16379) 2019-02-07 11:02:14 -08:00
sugared_value.cpp Rename DynamicType -> TensorType (#16787) 2019-02-06 17:31:07 -08:00
sugared_value.h clang format world (#15524) 2018-12-26 06:55:01 -08:00
tree_views.h Add immutable dict support (#16208) 2019-01-31 14:29:23 -08:00
tree.h clang format world (#15524) 2018-12-26 06:55:01 -08:00
type_parser.cpp Rename DynamicType -> TensorType (#16787) 2019-02-06 17:31:07 -08:00
type_parser.h clang format world (#15524) 2018-12-26 06:55:01 -08:00