Skip to content

tenzr::OpDef

More...

#include <op_registry.h>

Public Attributes

Name
std::string name
OpCategory Category
std::string StablehloOp
Lowered StableHLO op name.
ShapeInferenceFn shape_fn
DTypeInferenceFn dtype_fn
Output dtype inference.
EmitFn emit_fn
StableHLO emitter.

Detailed Description

struct tenzr::OpDef;

Definition of a custom operator: its category, shape and dtype inference callbacks, and the StableHLO emitter that lowers it.

Public Attributes Documentation

variable name

std::string name;

variable Category

OpCategory Category {OpCategory::kUnaryElementwise};

variable StablehloOp

std::string StablehloOp;

Lowered StableHLO op name.

variable shape_fn

ShapeInferenceFn shape_fn;

variable dtype_fn

DTypeInferenceFn dtype_fn;

Output dtype inference.

variable emit_fn

EmitFn emit_fn;

StableHLO emitter.