pytorch/torch/csrc/jit/python
Bowen Bao 02e35ce17b [ONNX] Update onnx function export with comments and clean up (#66817) (#67803)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/67803

* Addresses comments from #63589

[ONNX] remove torch::onnx::PRODUCER_VERSION (#67107)

Use constants from version.h instead.
This simplifies things since we no longer have to update
PRODUCER_VERSION for each release.

Also add TORCH_VERSION to version.h so that a string is available for
this purpose.

[ONNX] Set `ir_version` based on opset_version. (#67128)

This increases the odds that the exported ONNX model will be usable.
Before this change, we were setting the IR version to a value which may
be higher than what the model consumer supports.

Also some minor clean-up in the test code:
* Fix string replacement.
* Use a temporary file so as to not leave files around in the test
  current working directory.

Test Plan: Imported from OSS

Reviewed By: msaroufim

Differential Revision: D32181306

Pulled By: malfet

fbshipit-source-id: 02f136d34ef8f664ade0bc1985a584f0e8c2b663

Co-authored-by: BowenBao <bowbao@microsoft.com>
Co-authored-by: Gary Miguel <garymiguel@microsoft.com>
Co-authored-by: Nikita Shulga <nshulga@fb.com>
2021-11-05 10:35:35 -07:00
..
init.cpp Dtype Analysis for Unary and Binary ops with Metatensors (#66898) 2021-11-04 19:00:50 -07:00
init.h
module_python.h
pybind_utils.cpp [jit] Reduce refcounting of Types (#65345) 2021-10-08 09:03:04 -07:00
pybind_utils.h [PyTorch] Adopt IValue::toTupleRef() where obvious (#65505) 2021-11-02 10:22:18 -07:00
pybind.h irange-ify 11 (#62121) 2021-07-28 13:32:09 -07:00
python_arg_flatten.cpp irange-ify 11 (#62121) 2021-07-28 13:32:09 -07:00
python_arg_flatten.h irange-ify 11 (#62121) 2021-07-28 13:32:09 -07:00
python_custom_class.cpp
python_custom_class.h
python_dict.cpp
python_dict.h
python_interpreter.cpp [jit] Make operation call accept Stack& instead Stack* (#63414) 2021-08-30 11:49:20 -07:00
python_ir.cpp [ONNX] Update onnx function export with comments and clean up (#66817) (#67803) 2021-11-05 10:35:35 -07:00
python_ir.h Fix InlinedCallStack annotation to account for module calling its own (#61791) 2021-07-26 15:00:57 -07:00
python_ivalue.h Modernize override (#61744) 2021-07-23 23:04:46 -07:00
python_list.cpp irange-ify 11 (#62121) 2021-07-28 13:32:09 -07:00
python_list.h [JIT] Add torch._C.ScriptList` (#52832) 2021-07-01 20:28:13 -07:00
python_sugared_value.cpp [jit] Remove graph() call from abstract Function interface. (#65967) 2021-10-27 11:54:26 -07:00
python_sugared_value.h [jit] Remove graph() call from abstract Function interface. (#65967) 2021-10-27 11:54:26 -07:00
python_tracer.cpp irange-ify 11 (#62121) 2021-07-28 13:32:09 -07:00
python_tracer.h
python_tree_views.cpp Add SourceView which doesn't own source text as base class of Source (#65309) 2021-10-18 23:17:22 -07:00
python_tree_views.h
script_init.cpp [jit] Replace get_executor() with call() in abstract Function interface. (#65969) 2021-10-28 13:11:29 -07:00
script_init.h
update_graph_executor_opt.cpp Disable avoid-non-const-global-variables lint check (#62008) 2021-07-22 18:04:40 -07:00
update_graph_executor_opt.h