tenzr::OpRegistrationBuilder¶
#include <op_registry.h>
Public Functions¶
| Name | |
|---|---|
| OpRegistrationBuilder(std::string name) | |
| OpRegistrationBuilder & | Category(OpCategory cat) Set the operator category. |
| OpRegistrationBuilder & | StablehloOp(std::string op) Set the StableHLO lowering name. |
| OpRegistrationBuilder & | shape(ShapeInferenceFn fn) Set the shape inference callback. |
| OpRegistrationBuilder & | Dtype(DTypeInferenceFn fn) Set the dtype inference callback. |
| OpRegistrationBuilder & | Emit(EmitFn fn) Set the StableHLO emitter callback. |
Detailed Description¶
Fluent builder used with the TENZR_REGISTER_OP macro to describe and register an operator.
Public Functions Documentation¶
function OpRegistrationBuilder¶
Parameters:
- name Operator name.
Begin building an operator registration with the given name.
function Category¶
Set the operator category.
Parameters:
- cat Category to assign.
Return: This builder.
Set the operator category.
function StablehloOp¶
Set the StableHLO lowering name.
Parameters:
- op StableHLO op name.
Return: This builder.
Set the StableHLO lowering and publish the operator.
function shape¶
Set the shape inference callback.
Parameters:
- fn Shape inference callback.
Return: This builder.
Set the shape inference function and publish the operator.
function Dtype¶
Set the dtype inference callback.
Parameters:
- fn Dtype inference callback.
Return: This builder.
Set the dtype inference function and publish the operator.
function Emit¶
Set the StableHLO emitter callback.
Parameters:
- fn Emission callback.
Return: This builder.
Set the MLIR emission function and publish the operator.