Skip to content

handler

Classes

AotHandler

AotHandler(context: CodeGenContext)

Base class for all AOT code-generation handlers.

Lifecycle

The lifecycle of an AOT handler consists of three main stages:

  1. resolve() — inspect AIR, add any scratch tensors, choose kernels
  2. plan() — (optional) adjust memory plan or other per-handler scheduling
  3. emit() — write out headers, C sources, assets, etc.

Base class for AOT handlers.

Parameters:

Functions

resolve abstractmethod
resolve()

Resolve the handler's context and prepare for code generation.

plan
plan()

Hook for any handler-specific planning (default no-op).

emit abstractmethod
emit(save_path: Path)

Generate artifacts for the AOT handler.

Parameters:

  • save_path
    (Path) –

    The path where the generated code will be saved.