Skip to main content

afe.apis.compilation_job

Source: afe/apis/compilation_job.py

Back to index

The API for controlling a compilation job. This API is intended for use in a user-defined module that is passed to the command-line interface.

Imports

Classes

  • CompilationJob(Generic[GroundTruth]) (line 31): A specification of how to calibrate, quantize, evaluate, and compile a model. Decorators: dataclasses.dataclass(frozen=True). Attributes:
    • preprocess_transforms (line 38) [type List[Transform]]
    • postprocess_transforms (line 41) [type List[Transform]]
    • calibration_input (line 44) [type Iterable[Tensors]]
    • evaluation_input (line 47) [type Iterable[Tuple[Tensors, GroundTruth]]]
    • evaluate_result (line 51) [type Statistic[Tuple[Tensors, GroundTruth], str]]

Functions

  • set_compilation_job(job: CompilationJob[Any]) -> None (line 54): Use the given CompilationJob to control compilation. If called multiple times, the job that is passed to the final call will be used.

    Parameters:

    • job: type CompilationJob[Any]

    Returns: None