tree: 6d99d2611ba3e2889b92aa57c3bf83c89869bece [path history] [tgz]
  1. README.md
torch/csrc/lazy/generated/README.md

This folder contains generated sources for the lazy torchscript backend.

The main input file that drives which operators get codegen support for torchscript backend is ../../../../aten/src/ATen/native/ts_native_functions.yaml

The code generator lives at torchgen/gen_lazy_tensor.py.

It is called automatically by the torch autograd codegen (tools/setup_helpers/generate_code.py) as a part of the build process in OSS builds (CMake/Bazel) and Buck.

External backends (e.g. torch/xla) call gen_lazy_tensor.py directly, and feed it command line args indicating where the output files should go.

For more information on codegen, see these resources: