pytorch/torch/csrc/jit/python
Yanan Cao 655f376460 Implement Enum sugared value and Enum constant support (#42085)
Summary:
[3/N] Implement Enum JIT support

* Add enum value as constant support
* Add sugared value for EnumClass

Supported:
Enum-typed function arguments
using Enum type and comparing them
Support getting name/value attrs of enums
Using Enum value as constant

TODO:
Add PyThon sugared value for Enum
Support Enum-typed return values
Support serialization and deserialization

Pull Request resolved: https://github.com/pytorch/pytorch/pull/42085

Reviewed By: eellison

Differential Revision: D22758042

Pulled By: gmagogsfm

fbshipit-source-id: 5c6e571686c0b60d7fbad59503f5f94b3b3cd125
2020-07-31 17:29:55 -07:00
..
init.cpp Add done() API to Future (#42013) 2020-07-24 14:13:41 -07:00
init.h
module_python.h [jit] kill script namespace (#34515) 2020-03-11 23:32:48 -07:00
pybind_utils.h Implement Enum sugared value and Enum constant support (#42085) 2020-07-31 17:29:55 -07:00
pybind.h [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
python_arg_flatten.cpp [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
python_arg_flatten.h
python_custom_class.cpp s/torch::jit::class_/torch::class_/ (#40795) 2020-07-06 15:53:33 -07:00
python_custom_class.h
python_interpreter.cpp Unify boxed function signature between jit and c10 (#37034) 2020-06-29 19:24:26 -07:00
python_ir.cpp refactor canonical ordering to also be able to do isAfter checks (#42140) 2020-07-31 15:11:40 -07:00
python_ir.h [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00
python_ivalue.h Explicitly decref py::object in ConcretePyObjectHolder and PythonFunctionGuard (#38364) 2020-05-12 20:55:53 -07:00
python_sugared_value.cpp Implement Enum sugared value and Enum constant support (#42085) 2020-07-31 17:29:55 -07:00
python_sugared_value.h Implement Enum sugared value and Enum constant support (#42085) 2020-07-31 17:29:55 -07:00
python_tracer.cpp [jit] tracer flag to guard risky behaivors (#36277) 2020-04-13 22:35:03 -07:00
python_tracer.h [jit] tracer flag to guard risky behaivors (#36277) 2020-04-13 22:35:03 -07:00
python_tree_views.cpp [JIT] Add support for with statements (#34705) 2020-06-18 16:57:18 -07:00
python_tree_views.h [jit] kill script namespace (#34515) 2020-03-11 23:32:48 -07:00
script_init.cpp [JIT] Add support for backend-lowered submodules (#41146) 2020-07-10 16:35:24 -07:00
script_init.h [jit] kill script namespace (#34515) 2020-03-11 23:32:48 -07:00
update_graph_executor_opt.cpp Canonicalize includes in torch, and add tests for it (#36303) 2020-04-23 08:09:21 -07:00
update_graph_executor_opt.h [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00