Skip to content

Engine identity

The digest of the engine that computes cached artifacts. The fit cache and the persisted meta-phase library key their entries by it, so an artifact is reused only by the engine that computed it.

engine

The identity of the engine that computes cached artifacts.

A cached artifact is reused only by the engine that computed it: engine_identity digests the quivers version, the kernel ABI, the content-hash format, the torch and Python versions, and the platform, and every cache key that depends on the engine includes it.

engine_identity

engine_identity() -> str

The digest of the engine that computes cached artifacts.

RETURNS DESCRIPTION
str

The digest of the quivers version, the kernel ABI, the content-hash format, the torch version, the Python implementation and version, and the operating system and machine. An artifact computed under any other engine is not reused, since checked modules and floating-point results may differ.

Source code in src/quivers/incremental/engine.py
def engine_identity() -> str:
    """The digest of the engine that computes cached artifacts.

    Returns
    -------
    str
        The digest of the quivers version, the kernel ABI, the content-hash
        format, the torch version, the Python implementation and version, and
        the operating system and machine. An artifact computed under any
        other engine is not reused, since checked modules and floating-point
        results may differ.
    """
    return tagged_digest(
        "engine",
        {
            "quivers": __version__,
            "qiec_abi": QIEC_ABI,
            "content_hash": CONTENT_HASH_FORMAT,
            "torch": torch.__version__,
            "python": f"{platform.python_implementation()} {platform.python_version()}",
            "system": platform.system(),
            "machine": platform.machine(),
        },
    )