pytorch/torch/csrc/jit/python
Meghan Lele 484d53f4a0 [torch][JIT] Warn only once when using unscripted dictionary (#59287)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59287

D27211605 added a warning in `toIValue` that warns users to script their
dictionaries before passing them to TorchScript functions in order to get some
performance benefits and reference semantics. However, this warning is emitted
every time `toIValue` is called (e.g. when a dictionary is passed to
TorchScript function), which can lead to noisy log output. This diff changes
this changes to use `TORCH_WARN_ONCE` instead.

Test Plan: Sandcastle, OSS CI.

Reviewed By: hyuen

Differential Revision: D28824468

fbshipit-source-id: e651eade4380abaf77c6c8a81ec4e565b0c2c714
2021-06-02 11:41:37 -07:00
..
init.cpp [JIT] Disable Complete Shape Inlining For Testing Purposes (#56966) 2021-05-27 17:57:48 -07:00
init.h
module_python.h [jit] kill script namespace (#34515) 2020-03-11 23:32:48 -07:00
pybind_utils.cpp [torch][JIT] Warn only once when using unscripted dictionary (#59287) 2021-06-02 11:41:37 -07:00
pybind_utils.h [JIT] Add torch._C.ScriptDict (#52659) 2021-05-27 10:25:30 -07:00
pybind.h Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
python_arg_flatten.cpp Replace all direct cdata access with THPVariable_Unpack (#55799) 2021-04-15 08:57:04 -07:00
python_arg_flatten.h Move torch/csrc/utils/hash.h to c10/util/hash.h. (#42503) 2020-08-29 17:47:00 -07:00
python_custom_class.cpp Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
python_custom_class.h
python_dict.cpp [JIT] Add torch._C.ScriptDict (#52659) 2021-05-27 10:25:30 -07:00
python_dict.h [JIT] Add torch._C.ScriptDict (#52659) 2021-05-27 10:25:30 -07:00
python_interpreter.cpp Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
python_ir.cpp Add handling of symbolic shapes (#55925) 2021-05-21 08:50:52 -07:00
python_ir.h Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
python_ivalue.h Make DataPtr extraction in CUDAFuture faster for Python values (#56918) 2021-05-06 01:12:53 -07:00
python_sugared_value.cpp [torch][JIT] Predicate uses of RPC APIs on torch.distributed.rpc.is_available() (#58887) 2021-05-24 21:53:53 -07:00
python_sugared_value.h Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
python_tracer.cpp [Usability] Capture argument names for traced functions and modules (#51775) 2021-02-10 18:28:08 -08:00
python_tracer.h [Usability] Capture argument names for traced functions and modules (#51775) 2021-02-10 18:28:08 -08:00
python_tree_views.cpp Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
python_tree_views.h [jit] kill script namespace (#34515) 2020-03-11 23:32:48 -07:00
script_init.cpp [JIT] Add torch._C.ScriptDict (#52659) 2021-05-27 10:25:30 -07:00
script_init.h [jit] kill script namespace (#34515) 2020-03-11 23:32:48 -07:00
update_graph_executor_opt.cpp Make PyTorch code-base clang-tidy compliant (#56892) 2021-04-28 14:10:25 -07:00
update_graph_executor_opt.h [JIT] clang-format JIT code (#35115) 2020-03-26 11:24:51 -07:00