IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Python class

CompileOnlyModel

CompileOnlyModel​

class max.engine.CompileOnlyModel(name, compiled)

source

Bases: object

Stands in for a Model compiled under virtual devices.

A virtual device compiles for hardware that is not attached, so the compile half of a load finishes and the initialize half has nothing to do. Callers doing exactly that – cross-compiling, benchmarking a compile – want the load to return, so it returns this: an object that carries what was compiled and raises CompileOnlyExecutionError from everything that would need the device. A stand-in that answered those calls with placeholder values would move the failure to whatever consumed them.

Parameters:

execute()​

execute(*args, **kwargs)

source

Raises: a compile-only stand-in has nothing to execute on.

Parameters:

Return type:

NoReturn