move prim::None to a case in prim::Constant (#16160)
authorElias Ellison <eellison@fb.com>
Sat, 16 Feb 2019 00:12:44 +0000 (16:12 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Sat, 16 Feb 2019 00:27:57 +0000 (16:27 -0800)
commit7caa21f5cad52933c1ea48198d7daeea53a8b6f0
treef81b85369716b7d20c59a1f05bd97d76f787c762
parent4fcab92d6c38fdbb725e74de1c4b09cf54fa8132
move prim::None to a case in prim::Constant (#16160)

Summary:
This change simplifies analysis done on constants since prim::None does not need to be handled separately now.  To check if a constant node is None, use node->isNone().

Next step will be to remove prim::Undefined.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/16160

Differential Revision: D14109636

Pulled By: eellison

fbshipit-source-id: d26fd383976163a2ddd4c24984bd672a541cc876
34 files changed:
aten/src/ATen/core/interned_strings.h
aten/src/ATen/core/jit_type.h
test/cpp/jit/gtest.cpp
test/cpp/jit/no-gtest.cpp
test/cpp/jit/test_misc.h
test/expect/TestJit.test_conv.expect
test/expect/TestScript.test_if_is_none_dispatch.expect [new file with mode: 0644]
test/expect/TestScript.test_mutable_dce_graph_input.expect
test/test_jit.py
torch/csrc/jit/autodiff.cpp
torch/csrc/jit/constants.cpp
torch/csrc/jit/constants.h
torch/csrc/jit/export.cpp
torch/csrc/jit/import_method.cpp
torch/csrc/jit/ir.cpp
torch/csrc/jit/ir.h
torch/csrc/jit/passes/alias_analysis.cpp
torch/csrc/jit/passes/constant_pooling.cpp
torch/csrc/jit/passes/constant_propagation.cpp
torch/csrc/jit/passes/erase_number_types.cpp
torch/csrc/jit/passes/graph_fuser.cpp
torch/csrc/jit/passes/python_print.cpp
torch/csrc/jit/passes/shape_analysis.cpp
torch/csrc/jit/passes/to_batch.cpp
torch/csrc/jit/passes/utils/subgraph_utils.cpp
torch/csrc/jit/python_ir.cpp
torch/csrc/jit/register_prim_ops.cpp
torch/csrc/jit/script/compiler.cpp
torch/csrc/jit/script/file_check.cpp [new file with mode: 0644]
torch/csrc/jit/script/init.cpp
torch/csrc/jit/symbolic_script.cpp
torch/jit/__init__.py
torch/onnx/symbolic.py
torch/onnx/utils.py