pytorch/torch/jit
Alexander Grund 5b0f400488 Replace list(map(...)) constructs by list comprehensions (#46461)
Summary:
As discussed in https://github.com/pytorch/pytorch/issues/46392 this makes the code more readable and possibly more performant.

It also fixes a bug detected by this where the argument order of `map` was confused: 030a24906e (diff-5bb26bd3a23ee3bb540aeadcc0385df2a4e48de39f87ed9ea76b21990738fe98L1537-R1537)

Fixes https://github.com/pytorch/pytorch/issues/46392

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

Reviewed By: ailzhang

Differential Revision: D24367015

Pulled By: ezyang

fbshipit-source-id: d55a67933cc22346b00544c9671f09982ad920e7
2020-10-19 18:42:49 -07:00
..
mobile Move async + serialization implementation out of 'jit/__init__.py' (#41018) 2020-07-09 10:10:01 -07:00
__init__.py Expose script_if_tracing as public API (#46494) 2020-10-17 17:31:57 -07:00
_async.py move misc implementation out of jit/__init__.py (#41154) 2020-07-13 16:59:55 -07:00
_builtins.py [JIT] Add mypy type annotations for JIT (#43862) 2020-09-03 15:09:24 -07:00
_freeze.py move misc implementation out of jit/__init__.py (#41154) 2020-07-13 16:59:55 -07:00
_fuser.py Respect canFuseOn{CPU,GPU} in TE fuser (#43967) 2020-09-02 18:00:25 -07:00
_logging.py Experimental logging/counters API (#18235) 2019-03-29 17:14:03 -07:00
_pickle.py [jit] Add type tags to lists/dicts in pickle (#33255) 2020-03-10 19:17:01 -07:00
_recursive.py torch.nn.modules.LazyModuleMixin and torch.nn.LazyLinear (Shape Inference II) (#44538) 2020-10-19 13:13:54 -07:00
_script.py Fix TypeError when torch.jit.load is passed a pathlib.Path (#45825) 2020-10-08 01:29:29 -07:00
_serialization.py Fix TypeError when torch.jit.load is passed a pathlib.Path (#45825) 2020-10-08 01:29:29 -07:00
_state.py [JIT] Improve class type annotation inference (#45940) 2020-10-14 23:28:47 -07:00
_trace.py Expose script_if_tracing as public API (#46494) 2020-10-17 17:31:57 -07:00
annotations.py [JIT] Improve class type annotation inference (#45940) 2020-10-14 23:28:47 -07:00
frontend.py Replace list(map(...)) constructs by list comprehensions (#46461) 2020-10-19 18:42:49 -07:00
quantized.py Enable typechecks for torch.nn.quantized.modules.linear (#44154) 2020-09-03 19:52:49 -07:00
supported_ops.py [JIT] Add mypy type annotations for JIT (#43862) 2020-09-03 15:09:24 -07:00
unsupported_tensor_ops.py [JIT] Add mypy type annotations for JIT (#43862) 2020-09-03 15:09:24 -07:00