pytorch/torch/csrc/jit
Vasiliy Kuznetsov ab8a99bd36 graph mode: add hardswish inplace handling (#40284)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/40284

Adds graph mode handling for inplace hardswish, and test coverage for functional hardswish.

Test Plan:
```
python test/test_quantization.py TestQuantizeScriptPTSQOps.test_hardswish
```

Imported from OSS

Differential Revision: D22140628

fbshipit-source-id: 55a514f7dc1130d510f69ee4e611d7cb5e08d02e
2020-06-21 09:40:50 -07:00
..
api Back out "[pytorch][PR] [JIT] Infer NamedTuple type attributes of nn.Modules correctly" (#40270) 2020-06-19 02:58:31 -07:00
backends [JIT] Add registry for backend lowering functions (#39552) 2020-06-16 10:23:14 -07:00
codegen Get rid of global constructors in cuda codegen (#40183) 2020-06-18 13:54:11 -07:00
docs [jit] update to serialization doc (#39025) 2020-06-05 17:49:08 -07:00
frontend [JIT] Add support for with statements (#34705) 2020-06-18 16:57:18 -07:00
ir [JIT] Add support for with statements (#34705) 2020-06-18 16:57:18 -07:00
mobile Back out "Revert D21986243: TORCH_FN" (#40110) 2020-06-16 13:38:29 -07:00
passes graph mode: add hardswish inplace handling (#40284) 2020-06-21 09:40:50 -07:00
python [vulkan] jit passes for vulkan conv2 prepack and fuse with clamp (#39282) 2020-06-20 14:12:21 -07:00
runtime [JIT] Add support for with statements (#34705) 2020-06-18 16:57:18 -07:00
serialization [JIT] Add support for with statements (#34705) 2020-06-18 16:57:18 -07:00
tensorexpr [TensorExpr] Eliminate Cond statements when each branch is a different kind of empty (#39754) 2020-06-11 17:08:14 -07:00
testing Add CHECK-SOURCE-HIGHLIGHTED to file check utils. (#39692) 2020-06-11 23:47:07 -07:00
jit_log.cpp [jit] Fix name collision on load (#35720) 2020-04-01 00:02:38 -07:00
jit_log.h make sure logs work inside aten/c10 namespaces as well (#37018) 2020-04-21 20:01:13 -07:00
OVERVIEW.md [JIT] Add support for with statements (#34705) 2020-06-18 16:57:18 -07:00
README.md [jit] add top-level readme to csrc/jit (#33916) 2020-02-27 19:21:05 -08:00
resource_guard.h

PyTorch JIT

This folder contains (most of) the C++ code for the PyTorch JIT, a language and compiler stack for executing PyTorch models portably and efficiently. To learn more about the JIT from a user perspective, please consult our reference documentation and tutorials.

A brief summary of the source tree:

  • OVERVIEW.md: High-level technical overview of the JIT.
  • frontend/: Taking PyTorch modules in Python and translating them into the JIT IR.
  • ir/: Core IR abstractions.
  • runtime/: Interpreter, graph execution, and JIT operators.
  • codegen/: Generating efficient, hardware-specific code for JIT subgraphs.
  • serialization/: Saving and loading modules.
  • api/: Any user-facing C++ or Python interfaces.
  • python/: Binding stuff into Python or accessing information from the Python environment.
  • testing/: Utilities and helpers for testing.
  • mobile/: Mobile-specific implementations of runtime components.
  • passes/: IR-to-IR passes, generally for optimization and lowering.
  • generated/: This folder is generated by the PyTorch build, and contains bindings for native PyTorch operators into the JIT.

Refer to each folder for more in-depth documentation.

Other relevant parts of the codebase not contained here:

  • aten/src/ATen/core: contains JIT code re-used by other elements of the runtime system (eager, mobile, etc.)