MLModelRunner that evaluates an EmitC‐compiled ML model.

Synopsis

Declared in <llvm/Analysis/EmitCModelRunner.h>

template<class TGen>
class EmitCModelRunner final
    : public MLModelRunner

Description

Wraps a compile‐time EmitC model (TGen) for inference.

Base Classes

Name

Description

MLModelRunner

Interface for evaluating an ML model given tensors as arguments.

Enums

Name

Description

Kind

Kind of concrete MLModelRunner implementation.

Member Functions

Name

Description

EmitCModelRunner [constructor]

Construct a runner over an EmitC‐compiled model.

~EmitCModelRunner [destructor] [virtual]

Destroy this EmitCModelRunner.

operator= [deleted]

Deleted copy assignment; MLModelRunner is not assignable.

evaluate

Evaluate the model and return the result cast to type T.

getKind

Return the concrete runner kind of this instance.

getTensor

getTensor overloads

getTensorUntyped

getTensorUntyped overloads

switchContext [virtual]

Switch the evaluation context to the named context Name.

Static Member Functions

Name

Description

classof

Return true if R is an EmitCModelRunner.

Protected Member Functions

Name

Description

evaluateUntyped [virtual]

Run the EmitC‐compiled model and return a pointer to the result.

setUpBufferForTensor

Bind input buffer Index to Buffer, or allocate owned storage.

Protected Data Members

Name

Description

Ctx

LLVM context used for diagnostics by this runner.

Type

Concrete kind of this MLModelRunner instance.

Created with MrDocs