File: README.md

package info (click to toggle)
pytorch-cuda 2.6.0%2Bdfsg-7
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 161,620 kB
  • sloc: python: 1,278,832; cpp: 900,322; ansic: 82,710; asm: 7,754; java: 3,363; sh: 2,811; javascript: 2,443; makefile: 597; ruby: 195; xml: 84; objc: 68
file content (18 lines) | stat: -rw-r--r-- 1,009 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# `torch._inductor.runtime`

This folder contains code needed at runtime by the output code of
Inductor.  The output code of Inductor will import `torch` and
`torch._inductor.runtime`, but should not import from other files in
`torch._inductor.*`.  Note that this code includes code that is
needed to actually perform Triton compilation, but is not needed
in the actual, final runtime execution of kernels.

Runtime includes Triton/C++ generated code, which are compiled (sometimes in
parallel) when the output code of Inductor is imported.  It also includes
the autotuning code and heuristics to decide block sizes of generated code.

One of the original motivations for this directory split was so that the Triton
compile subprocesses could access Triton and our compiler support code while
mocking out most of `torch`, which can take seconds to import (sometimes more
than a Triton compile itself).  An abandoned prototype of this can be found
[here](https://github.com/pytorch/pytorch/pull/124682/files).