Remove python_default_init from ATen and use Optional (#15234)
authorWanchao Liang <wanchaol@users.noreply.github.com>
Thu, 20 Dec 2018 05:35:01 +0000 (21:35 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 20 Dec 2018 05:38:50 +0000 (21:38 -0800)
commitb89b46abfb20fb726cd1bc921ebdf6586e80f262
tree2438dbf6f94d332fd68b3373fa6cbe50325a1844
parent3fc889e9763c8224af2aff1f4e0cc75c289bd2bc
Remove python_default_init from ATen and use Optional (#15234)

Summary:
Optional clean up. This PR remove python_default_init from the yaml files, and the code-gen, and utilize optional type to do the work.

This also fix the bug in the #13149 to correctly adopt as_strided backward.

Fixes #9941
Pull Request resolved: https://github.com/pytorch/pytorch/pull/15234

Differential Revision: D13502044

Pulled By: wanchaol

fbshipit-source-id: 774b61fc4414482cf11d56e22bd0275aefb352a4
18 files changed:
aten/src/ATen/Declarations.cwrap
aten/src/ATen/core/Tensor.h
aten/src/ATen/core/TensorMethods.h
aten/src/ATen/core/Type.h
aten/src/ATen/function_wrapper.py
aten/src/ATen/native/ReduceOps.cpp
aten/src/ATen/native/SpectralOps.cpp
aten/src/ATen/native/TensorShape.cpp
aten/src/ATen/native/native_functions.yaml
aten/src/ATen/native_parse.py
tools/autograd/derivatives.yaml
tools/autograd/gen_python_functions.py
tools/autograd/templates/Functions.cpp
tools/jit/gen_jit_dispatch.py
torch/csrc/jit/passes/shape_analysis.cpp
torch/csrc/jit/tracer.cpp
torch/csrc/jit/tracer.h
torch/csrc/utils/python_arg_parser.h