S100 OpenExplorer

# #HBIR Operator Definition

## #`hbir.abs` (::mlir::hbdk::hbir::AbsOp)

HBIR tensor abs.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, EltwiseLike, MoveF16CastLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.acos` (::mlir::hbdk::hbir::AcosOp)

HBIR tensor acos.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.acosh` (::mlir::hbdk::hbir::AcoshOp)

HBIR tensor acosh.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.add` (::mlir::hbdk::hbir::AddOp)

HBIR tensor addition.

Applies addition operator element-wise, y i=l h s i+r h s i y_i=lhs_i+rhs_i y i​=l h s i​+r h s i​.

Note:

- Our arithmetic operator support broadcast.

Prototype: Pytorch add.

Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: CalibOp, HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.asin` (::mlir::hbdk::hbir::AsinOp)

HBIR tensor asin.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.asinh` (::mlir::hbdk::hbir::AsinhOp)

HBIR tensor asinh.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.atan` (::mlir::hbdk::hbir::AtanOp)

HBIR tensor atan.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.atanh` (::mlir::hbdk::hbir::AtanhOp)

HBIR tensor atanh.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.avg_pool` (::mlir::hbdk::hbir::AvgPoolOp)

HBIR n-D average pooling(only support 1d and 2d currently).

Applies a nD average pooling over input.

In the simplest case, the output value of the operator with input size (N,H,W,C)(N, H, W, C)(N,H,W,C), output (N,H o u t,W o u t,C)(N, H_{out}, W_{out}, C)(N,H o u t​,W o u t​,C) and kernel size (k e r h,k e r w)(ker_{h}, ker_{w})(k e r h​,k e r w​) can be precisely described as:

o u t(N i,h,w,C j)=1 k e r h∗k e r w∑m=0 k e r h−1∑n=0 k e r w−1 i n p u t(N i,s t r i d e[0]×h+m,s t r i d e[1]×w+n,C j)out(N_i, h, w, C_j) = \frac{1} { ker_h *ker_w } \sum_{m = 0} ^ { ker_h - 1 }\sum_{n = 0} ^ { ker_w - 1 } input(N_i, stride[0]\times h + m, stride[1] \times w + n, C_j)o u t(N i​,h,w,C j​)=k e r h​∗k e r w​1​∑m=0 k e r h​−1​∑n=0 k e r w​−1​in p u t(N i​,s t r i d e[0]×h+m,s t r i d e[1]×w+n,C j​)

where h,w h,w h,w respectively represent the size of H and W.

Note:

- parameters has the same manner as the Conv2D operator, the same goes for the output size.

- ceilMode controls output's compute is mode of floor or ceil, it's default value is false.

Shape:

- Input: (N,H i n,W i n,C)(N, H_{in}, W_{in}, C)(N,H in​,W in​,C) or (H i n,W i n,C)(H_{in}, W_{in}, C)(H in​,W in​,C) or (∗,H i n,W i n)(*, H_{in}, W_{in})(∗,H in​,W in​)

- Output: (N,H o u t,W o u t,C)(N, H_{out}, W_{out}, C)(N,H o u t​,W o u t​,C) or (H o u t,W o u t,C)(H_{out}, W_{out}, C)(H o u t​,W o u t​,C) or (∗,H o u t,W o u t,C)(*, H_{out}, W_{out}, C)(∗,H o u t​,W o u t​,C), where ∗*∗ represents any number of dimension.

H o u t=⌊H i n+p a d d i n g[0]+p a d d i n g[2]−k e r n e l[0]s t r i d e[0]+1⌋H_{out} = \lfloor {\frac{H_{in} + padding[0] + padding[2] - kernel[0]} {stride[0]} + 1}\rfloor H o u t​=⌊s t r i d e[0]H in​+p a dd in g[0]+p a dd in g[2]−k er n e l[0]​+1⌋

W o u t=⌊W i n+p a d d i n g[1]+p a d d i n g[3]−k e r n e l[1]s t r i d e[1]+1⌋W_{out} = \lfloor {\frac{W_{in} + padding[1] + padding[3] - kernel[1]} {stride[1]} + 1}\rfloor W o u t​=⌊s t r i d e[1]W in​+p a dd in g[1]+p a dd in g[3]−k er n e l[1]​+1⌋

if ceilMode = true, please use ceil replace floor in the above output formula.

Prototype: Pytorch avg_pool.

Traits: CommonVerifier, PoolLike, StencilLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`kernel` | ::mlir::ArrayAttr | 64-bit integer array attribute
`stride` | ::mlir::ArrayAttr | 64-bit integer array attribute
`pad` | ::mlir::ArrayAttr | 64-bit integer array attribute
`dilation` | ::mlir::ArrayAttr | 64-bit integer array attribute
`ceilMode` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type

## #`hbir.batchnorm` (::mlir::hbdk::hbir::BatchNormOp)

Hbir Batch Normalize

Applies Batch Normalization over each dimension of input. This compute can be precisely described as:

y=x−m e a n[x]V a r[x]+ϵ∗w e i g h t+b i a s y = \frac{x-mean[x]}{\sqrt{Var[x]+\epsilon}}*weight+bias y=Va r[x]+ϵ
​x−m e an[x]​∗w e i g h t+bia s

This mean and standard-deviation are calculated per-dimension over the batches and weight and bias are learnable parameter vectors of the input size.

Note:

- eps - a value added to the denominator for numerical stability.
- m e a n(x)mean(x)m e an(x) and V a r[x]Var[x]Va r[x]'s shape are (C)(C)(C).
- weight and bias are learnable scalar.

Shape:

- Input: (N,H,W,C)(N,H,W,C)(N,H,W,C) or (N,M,H,W,C)(N,M,H,W,C)(N,M,H,W,C) or (H,W,C)(H,W,C)(H,W,C) or (∗,H,W,C)(*,H,W,C)(∗,H,W,C), where ∗*∗ reprensent any number of dimension.
- Output: same shape as input.

Prototype: Pytorch BatchNorm.

Traits: CommonVerifier, Misc, SameVariadicOperandSize

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`eps` | ::mlir::FloatAttr | 64-bit float attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`mean` | 1D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`var` | 1D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`weight` | 1D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`bias` | 1D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.bev_pool_v2` (::mlir::hbdk::hbir::BevPoolV2Op)

HBIR bev_pool_v2 op, cpu operator, from mmdet3d, no corresponding operator in torch/onnx

Convert several planar image inputs into bev image outputs, thus providing support for data processing under bird's eye view.

Parameters:

- depth: the depth tensor.
- feat: the feat tensor.
- ranks_depth: Stores the index value of depth.
- ranks_feat: Stores the index value of feat.
- ranks_bev: Stores the Voxel index value of the valid bev space.
- interval_starts: Each element marks the starting point of each "continuation segment" of the ranks_bev feat.
- interval_lengths: Each element identifies the length of each "continuous segment" of the ranks_bev feat.
- bev_feat_shape: output's shape. Aligned with the public version of cudu kernel, no permute(0, 4, 1, 2, 3) operation is performed in the kernel. And can support rank>=4.

Shape:

- depth: (B, N, D, fH, fW)
- feat: (B, N, fH, fW, C)
- ranks_depth: (N_points, )
- ranks_feat: (N_points, )
- ranks_bev: (N_points, )
- interval_starts: (N_pillar, )
- interval_lengths: (N_pillar, )
- output: shape same as bev_feat_shape, (B, D_Z, D_Y, D_X, C)

Traits: CommonVerifier, Misc

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`bev_feat_shape` | ::mlir::ArrayAttr | 64-bit integer array attribute

### #Operands:

Operand | Description
--- | ---
`depth` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`feat` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`ranks_depth` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type
`ranks_feat` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type
`ranks_bev` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type
`interval_starts` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type
`interval_lengths` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.cast_type` (::mlir::hbdk::hbir::CastTypeOp)

elemental type cast operation

Data are actually moved. Traits: CommonVerifier, Misc, NaiveRoiInfer, NaiveTiling, SameOperandsAndResultShape

Interfaces: CastOpInterface, HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`forceSaturate` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values

## #`hbir.ceil` (::mlir::hbdk::hbir::CeilOp)

HBIR tensor ceil.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, EltwiseLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.clip` (::mlir::hbdk::hbir::ClipOp)

HBIR Clip Op.

Clamps all elements in input into the range [m i n,m a x][min, max] [min,ma x].Assume min_value and max_value be min and max, respectively, this performs:

y i=m i n(m a x(x i,m i n_v a l u e i),m a x_v a l u e i)y_i = min(max(x_i, min\_value_i), max\_value_i)y i​=min(ma x(x i​,min_v a l u e i​),ma x_v a l u e i​)

Note:

- min(min_value): lower-bound of the range to be clamped to
- max(max_value): upper-bound of the range to be clamped to

Shape:

- Input: (*), where * means any number of dimensions.
- Output: (*), same shape as the input.

Prototype: Pytorch hardtanh.

Traits: CommonVerifier, LutLike, MoveF16CastLike, NaiveRoiInfer, NaiveTiling, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`min` | ::mlir::Attribute | 64-bit float attribute or 64-bit signless integer attribute
`max` | ::mlir::Attribute | 64-bit float attribute or 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.concat` (::mlir::hbdk::hbir::ConcatOp)

Concatenates tensors along one dimension

Concatenates the given sequence of seq tensors in the given dimension. No elemental type conversion.

Note:

- dim - the dimension over which the tensors are concatenated.

Prototype: Pytorch cat.

Traits: CommonVerifier, MoveLike, NaiveTiling, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, Layout, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, PortAccess, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dim` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`inputs` | variadic of tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.constant` (::mlir::hbdk::hbir::ConstantOp)

HBIR constant generation op.

Generate a constant with specified type and value Traits: CommonVerifier, Constant, NoFuseFp16TypeLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`values` | ::mlir::ElementsAttr | constant vector/tensor attribute

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values

## #`hbir.conv2d` (::mlir::hbdk::hbir::Conv2dOp)

HBIR 2-D convolution.

Applies a 2D convolution over an input signal composed of several input channels.

In the simplest case, the output value of the layer with input size (N,H i n,W i n,C i n)(N, H_{in}, W_{in}, C_{in})(N,H in​,W in​,C in​) and output (N,H o u t,W o u t,C o u t)(N, H_{out}, W_{out}, C_{out})(N,H o u t​,W o u t​,C o u t​) can be precisely descibed as:

o u t(N i,C o u t j)=b i a s(C o u t j)+∑k=0 C i n−1 w e i g h t(C o u t j,k)⋆i n p u t(N i,k)out(N_i,C_{out_j}) = bias(C_{out_j}) + \sum_{k=0}^{C_{in} - 1}weight(C_{out_j},k) \star input(N_i,k)o u t(N i​,C o u t j​​)=bia s(C o u t j​​)+∑k=0 C in​−1​w e i g h t(C o u t j​​,k)⋆in p u t(N i​,k)

where ⋆\star⋆ is the valid 2D cross-correlation operation, N N N is the batch size, C C C denotes a number of channels, H H H and W W W are the size of pixels.

Note:

- stride controls the stride for the cross-correlation, an integer array with 2 elements, default value is (1,1).

- padding controls the amount of padding applied to the input, an integer array with 4 elements, the padding sequences is (h_begin,w_begin,h_end,w_end), default value is (0,0,0,0).

- dilation controls the spacing between kernel points, an integer array with 2 elements, default value is (0,0). It's harder to describe, but this link has a nice visualization of what dilation does.

- groups controls the connections between inputs and outputs, an integer variable, default value is 1.

- Weight: (C o u t,K H,K W,C i n)(C_{out}, KH, KW, C_{in})(C o u t​,KH,K W,C in​), bias shape = C o u t C_{out}C o u t​ where KW and KH represent kernel's height and width, respectively.

Shape:

- Input: (N,H i n,W i n,C i n)(N,H_{in},W_{in},C_{in})(N,H in​,W in​,C in​) or (H i n,W i n,C i n)(H_{in},W_{in},C_{in})(H in​,W in​,C in​) or (N,M,H i n,W i n,C i n)(N,M,H_{in},W_{in},C_{in})(N,M,H in​,W in​,C in​) or (∗,H i n,W i n,C i n)(*,H_{in},W_{in},C_{in})(∗,H in​,W in​,C in​), where * represent any number of dimension.

- Output: (N,H o u t,W o u t,C o u t)(N,H_{out},W_{out},C_{out})(N,H o u t​,W o u t​,C o u t​) or (H o u t,W o u t,C o u t)(H_{out},W{out},C_{out})(H o u t​,W o u t,C o u t​) or (N,M,H o u t,W o u t,C o u t)(N,M,H_{out},W_{out},C_{out})(N,M,H o u t​,W o u t​,C o u t​) or (∗,H o u t,W o u t,C o u t)(*,H_{out},W_{out},C_{out})(∗,H o u t​,W o u t​,C o u t​)

H o u t=⌊H i n+p a d d i n g[0]+p a d d i n g[2]−d i l a t i o n[0]×(k e r n e l[0]−1)−1 s t r i d e[0]+1⌋H_{out}=\lfloor \frac{H_{in} + padding[0] + padding[2] - dilation[0]\times(kernel[0]-1)-1}{stride[0]}+1\rfloor H o u t​=⌊s t r i d e[0]H in​+p a dd in g[0]+p a dd in g[2]−d i l a t i o n[0]×(k er n e l[0]−1)−1​+1⌋ W o u t=⌊W i n+p a d d i n g[1]+p a d d i n g[3]−d i l a t i o n[1]×(k e r n e l[1]−1)−1 s t r i d e[1]+1⌋W_{out}=\lfloor \frac{W_{in}+padding[1]+padding[3]-dilation[1]\times(kernel[1]-1)-1}{stride[1]}+1\rfloor W o u t​=⌊s t r i d e[1]W in​+p a dd in g[1]+p a dd in g[3]−d i l a t i o n[1]×(k er n e l[1]−1)−1​+1⌋

Prototype: Pytorch convolution.

Traits: CommonVerifier, ConvLike, NoFuseFp16TypeLike, StencilLike

Interfaces: CalibOp, HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`stride` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 2 elements
`pad` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 4 elements
`dilation` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 2 elements
`groupNum` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`weight` | 4D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`bias` | 1D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type

## #`hbir.conv2dtranspose` (::mlir::hbdk::hbir::Conv2dTransposeOp)

HBIR transposed conv2d op.

Inverse operation of Conv2dTranspose in shape.

Parameters:

- input: the input tensor
- weight: the deconvolution kernel
- stride: same as conv2d's stride, [s_h, s_w]
- pad: pad information for clipping output [h_top,w_left,h_bottom,w_right]
- dilation: same as conv2d's dilation, [d_h, d_w]
- group: same as conv2d's group

Shape:

- input: (∗,h,w,i n_c h a n n e l)(*, h, w, in\_channel)(∗,h,w,in_c hann e l)
- weight: (i n_c h a n n e l,k h,k w,o u t_c h a n n e l/g r o u p)(in\_channel, kh, kw, out\_channel / group)(in_c hann e l,kh,k w,o u t_c hann e l/g ro u p)
- output: (∗,h o,w o,o u t_c h a n n e l)(*, ho, wo, out\_channel)(∗,h o,w o,o u t_c hann e l)
- bias: o u t_c h a n n e l out\_channel o u t_c hann e l

where:

h o=(h−1)∗s t r i d e[0]−(p a d[0]+p a d[2])+d i l a t i o n[0]∗(k h−1)+1 ho = (h - 1) * stride[0] - (pad[0] + pad[2]) + dilation[0] * (kh - 1) + 1 h o=(h−1)∗s t r i d e[0]−(p a d[0]+p a d[2])+d i l a t i o n[0]∗(kh−1)+1 w o=(w−1)∗s t r i d e[1]−(p a d[1]+p a d[3])+d i l a t i o n[1]∗(k w−1)+1 wo = (w - 1) * stride[1] - (pad[1] + pad[3]) + dilation[1] * (kw - 1) + 1 w o=(w−1)∗s t r i d e[1]−(p a d[1]+p a d[3])+d i l a t i o n[1]∗(k w−1)+1

Traits: CommonVerifier, ConvLike, StencilLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`stride` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 2 elements
`pad` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 4 elements
`dilation` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 2 elements
`groupNum` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`illegalWeight` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`weight` | 4D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`bias` | 1D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type values

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type

## #`hbir.conv3d` (::mlir::hbdk::hbir::Conv3dOp)

HBIR 3-D convolution.

Applies a 3D convolution over an input signal composed of several input planes.

In the simplest case, the output value of the layer with input size (N,C i n,D,H,W)(N, C_{in}, D, H, W)(N,C in​,D,H,W) and output (N,C o u t,D o u t,H o u t,W o u t)(N, C_{out}, D_{out}, H_{out}, W_{out})(N,C o u t​,D o u t​,H o u t​,W o u t​) can be precisely described as:

o u t(N i,C o u t j)=b i a s(C o u t j)+∑k=0 C i n−1 w e i g h t(C o u t j,k)⋆i n p u t(N i,k)out(N_i, C_{out_j}) = bias(C_{out_j}) + \sum_{k = 0}^{C_{in} - 1} weight(C_{out_j}, k) \star input(N_i, k)o u t(N i​,C o u t j​​)=bia s(C o u t j​​)+∑k=0 C in​−1​w e i g h t(C o u t j​​,k)⋆in p u t(N i​,k)

where ⋆\star⋆ is the valid 3D [cross-correlation] operation, N N N is the batch size, C C C denotes a number of channels, D D D, H H H and W W W are the size of pixels.

Note:

- stride controls the stride for the cross-correlation, an integer array with 3 elements, default value is (1,1,1).

- padding controls the amount of padding applied to the input, an integer array with 5 elements, the padding sequences is (d_begin,h_begin,w_begin,d_end,h_end,w_end), default value is (0,0,0,0,0,0).

- dilation controls the spacing between kernel points, an integer array with 3 elements, default value is (0,0,0). It's harder to describe, but this link has a nice visualization of what dilation does.

- groups controls the connections between inputs and outputs, an integer variable, default value is 1.

- Weight: (C o u t,K D,K H,K W,C i n)(C_{out}, KD, KH, KW, C_{in})(C o u t​,KD,KH,K W,C in​), bias shape = C o u t C_{out}C o u t​ where KW and KH represent kernel's height and width, respectively.

Shape:

- Input: (N,D i n,H i n,W i n,C i n)(N,D_{in},H_{in},W_{in},C_{in})(N,D in​,H in​,W in​,C in​) or (D i n,H i n,W i n,C i n)(D_{in},H_{in},W_{in},C_{in})(D in​,H in​,W in​,C in​) or (∗,D i n,H i n,W i n,C i n)(*,D_{in},H_{in},W_{in},C_{in})(∗,D in​,H in​,W in​,C in​), where * represent any number of dimension.

- Output: (N,D o u t,H o u t,W o u t,C o u t)(N,D_{out},H_{out},W_{out},C_{out})(N,D o u t​,H o u t​,W o u t​,C o u t​) or (D o u t,H o u t,W o u t,C o u t)(D_{out},H_{out},W{out},C_{out})(D o u t​,H o u t​,W o u t,C o u t​) or (∗,D o u t,H o u t,W o u t,C o u t)(*,D_{out},H_{out},W_{out},C_{out})(∗,D o u t​,H o u t​,W o u t​,C o u t​).

D o u t=⌊D i n+p a d d i n g[0]+p a d d i n g[3]−d i l a t i o n[0]×(k e r n e l[0]−1)−1 s t r i d e[0]+1⌋D_{out}=\lfloor \frac{D_{in} + padding[0] + padding[3] - dilation[0]\times(kernel[0]-1)-1}{stride[0]}+1\rfloor D o u t​=⌊s t r i d e[0]D in​+p a dd in g[0]+p a dd in g[3]−d i l a t i o n[0]×(k er n e l[0]−1)−1​+1⌋

H o u t=⌊H i n+p a d d i n g[1]+p a d d i n g[4]−d i l a t i o n[1]×(k e r n e l[1]−1)−1 s t r i d e[1]+1⌋H_{out}=\lfloor \frac{H_{in} + padding[1] + padding[4] - dilation[1]\times(kernel[1]-1)-1}{stride[1]}+1\rfloor H o u t​=⌊s t r i d e[1]H in​+p a dd in g[1]+p a dd in g[4]−d i l a t i o n[1]×(k er n e l[1]−1)−1​+1⌋

W o u t=⌊W i n+p a d d i n g[2]+p a d d i n g[5]−d i l a t i o n[2]×(k e r n e l[2]−1)−1 s t r i d e[2]+1⌋W_{out}=\lfloor \frac{W_{in} + padding[2] + padding[5] - dilation[2]\times(kernel[2]-1)-1}{stride[2]}+1\rfloor W o u t​=⌊s t r i d e[2]W in​+p a dd in g[2]+p a dd in g[5]−d i l a t i o n[2]×(k er n e l[2]−1)−1​+1⌋

Prototype: Pytorch convolution.

Traits: CommonVerifier, ConvLike, StencilLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`stride` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 3 elements
`pad` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 6 elements
`dilation` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 3 elements
`groupNum` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`weight` | 5D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`bias` | 1D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type

## #`hbir.conv` (::mlir::hbdk::hbir::ConvOp)

HBIR convolution.

Applies a convolution over an input signal composed of several input planes.

rank in convolution is an integer greater than or equal to 1.

In the simplest case, for 2D convolution, rank=2 the output value of the layer with input size (N,H i n,W i n,C i n)(N, H_{in}, W_{in}, C_{in})(N,H in​,W in​,C in​) and output (N,H o u t,W o u t,C o u t)(N, H_{out}, W_{out}, C_{out})(N,H o u t​,W o u t​,C o u t​) can be precisely descibed as:

o u t(N i,C o u t j)=b i a s(C o u t j)+∑k=0 C i n−1 w e i g h t(C o u t j,k)⋆i n p u t(N i,k)out(N_i,C_{out_j}) = bias(C_{out_j}) + \sum_{k=0}^{C_{in} - 1}weight(C_{out_j},k) \star input(N_i,k)o u t(N i​,C o u t j​​)=bia s(C o u t j​​)+∑k=0 C in​−1​w e i g h t(C o u t j​​,k)⋆in p u t(N i​,k)

where ⋆\star⋆ is the valid 2D cross-correlation operation, N N N is the batch size, C C C denotes a number of channels, H H H and W W W are the size of pixels.

Note:

- stride controls the stride for the cross-correlation, an integer array with rank elements, default value is (1,1,...).

- padding controls the amount of padding applied to the input, an integer array with 2*rank elements, when rank=2, the padding sequences is (h_begin,w_begin,h_end,w_end), default value is (0,0,0,0), when n=3, the padding sequences is (d_begin,h_begin,w_begin,d_end,h_end,w_end), default value is (0,0,0,0,0,0).

- dilation controls the spacing between kernel points, an integer array with rank elements, default value is (0,0,...). It's harder to describe, but this link has a nice visualization of what dilation does.

- groups controls the connections between inputs and outputs, an integer variable, default value is 1.

- Weight for 2D: (C o u t,K H,K W,C i n)(C_{out}, KH, KW, C_{in})(C o u t​,KH,K W,C in​), bias shape = C o u t C_{out}C o u t​ where KW and KH represent kernel's height and width, respectively.

Shape for 2D:

- Input: (N,H i n,W i n,C i n)(N,H_{in},W_{in},C_{in})(N,H in​,W in​,C in​) or (H i n,W i n,C i n)(H_{in},W_{in},C_{in})(H in​,W in​,C in​) or (N,M,H i n,W i n,C i n)(N,M,H_{in},W_{in},C_{in})(N,M,H in​,W in​,C in​) or (∗,H i n,W i n,C i n)(*,H_{in},W_{in},C_{in})(∗,H in​,W in​,C in​), where * represent any number of dimension.

- Output: (N,H o u t,W o u t,C o u t)(N,H_{out},W_{out},C_{out})(N,H o u t​,W o u t​,C o u t​) or (H o u t,W o u t,C o u t)(H_{out},W{out},C_{out})(H o u t​,W o u t,C o u t​) or (N,M,H o u t,W o u t,C o u t)(N,M,H_{out},W_{out},C_{out})(N,M,H o u t​,W o u t​,C o u t​) or (∗,H o u t,W o u t,C o u t)(*,H_{out},W_{out},C_{out})(∗,H o u t​,W o u t​,C o u t​)

H o u t=⌊H i n+p a d d i n g[0]+p a d d i n g[2]−d i l a t i o n[0]×(k e r n e l[0]−1)−1 s t r i d e[0]+1⌋H_{out}=\lfloor \frac{H_{in} + padding[0] + padding[2] - dilation[0]\times(kernel[0]-1)-1}{stride[0]}+1\rfloor H o u t​=⌊s t r i d e[0]H in​+p a dd in g[0]+p a dd in g[2]−d i l a t i o n[0]×(k er n e l[0]−1)−1​+1⌋ W o u t=⌊W i n+p a d d i n g[1]+p a d d i n g[3]−d i l a t i o n[1]×(k e r n e l[1]−1)−1 s t r i d e[1]+1⌋W_{out}=\lfloor \frac{W_{in}+padding[1]+padding[3]-dilation[1]\times(kernel[1]-1)-1}{stride[1]}+1\rfloor W o u t​=⌊s t r i d e[1]W in​+p a dd in g[1]+p a dd in g[3]−d i l a t i o n[1]×(k er n e l[1]−1)−1​+1⌋

Prototype: Pytorch convolution.

Traits: CommonVerifier, ConvLike, NoFuseFp16TypeLike, StencilLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`stride` | ::mlir::ArrayAttr | 64-bit integer array attribute
`pad` | ::mlir::ArrayAttr | 64-bit integer array attribute
`dilation` | ::mlir::ArrayAttr | 64-bit integer array attribute
`groupNum` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`channelLast` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`weight` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`bias` | 1D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type

## #`hbir.cos` (::mlir::hbdk::hbir::CosOp)

HBIR tensor cos.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.cosh` (::mlir::hbdk::hbir::CoshOp)

HBIR tensor cosh.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.cumsum` (::mlir::hbdk::hbir::CumSumOp)

HBIR cumsum.

Performs cumulative sum of the input elements along the given axis. By default, it will do the sum inclusively meaning the first element is copied as is. Through an exclusive attribute, this behavior can change to exclude the first element. It can also perform summation in the opposite direction of the axis. For that, set reverse attribute to 1.

Args: input (Tensor): the input tensor. output (Tensor): Output tensor of the same type as input with cumulative sums of the input elements Attribute: axis (int): Must be in the range [-rank(input), rank(input)-1]. Negative value means counting dimensions from the back. exclusive (int): Must be 0 or 1, defaut is 0. 0 means the first element is copied to output, 1 will not. reverse (int): Must be 0 or 1, defaut is 0. 1 means performing summation in the opposite direction of the axis.

Prototype: Pytorch cumsum.

Traits: CommonVerifier, Misc, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`axis` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`exclusive` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`reverse` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.deform_conv2d` (::mlir::hbdk::hbir::DeformConv2dOp)

HBIR deformable 2-D convolution.

Applies a deformable 2D convolution over an input signal composed of several input channels.

Note:

- offset controls the offset for the sampling locations in the convolution kernel.

- mask controls different weights to different positions in the convolution kernel.

- stride controls the stride for the cross-correlation, an integer array with 2 elements, default value is (1,1).

- padding controls the amount of padding applied to the input, an integer array with 4 elements, the padding sequences is (h_begin,w_begin,h_end,w_end), default value is (0,0,0,0).

- dilation controls the spacing between kernel points, an integer array with 2 elements, default value is (0,0). It's harder to describe, but this link has a nice visualization of what dilation does.

- groups controls the connections between inputs and outputs, an integer variable, default value is 1.

- offsetGroup controls the connections between inputs and offset, an integer variable, default value is 1.

- weight: (C o u t,K H,K W,C i n)(C_{out}, KH, KW, C_{in})(C o u t​,KH,K W,C in​), bias shape = C o u t C_{out}C o u t​ where KW and KH represent kernel's height and width, respectively.

Shape:

- Input: (N,H i n,W i n,C i n)(N,H_{in},W_{in},C_{in})(N,H in​,W in​,C in​) or (∗,H i n,W i n,C i n)(*,H_{in},W_{in},C_{in})(∗,H in​,W in​,C in​), where * represent any number of dimension.

- Offset: (N,H o u t,W o u t,2\timesoffset g r o u p s\timeskernel[0]\timeskernel[1])(N,H_{out},W_{out},2\timesoffset_groups\timeskernel[0]\timeskernel[1])(N,H o u t​,W o u t​,2\timesoffset g​ro u p s\timeskernel[0]\timeskernel[1]) or (∗,H o u t,W o u t,2\timesoffset g r o u p s\timeskernel[0]\timeskernel[1])(*,H_{out},W_{out},2\timesoffset_groups\timeskernel[0]\timeskernel[1])(∗,H o u t​,W o u t​,2\timesoffset g​ro u p s\timeskernel[0]\timeskernel[1]), where * represent any number of dimension.

- Mask: (N,H o u t,W o u t,o f f s e t g r o u p s\timeskernel[0]\timeskernel[1])(N,H_{out},W_{out},offset_groups\timeskernel[0]\timeskernel[1])(N,H o u t​,W o u t​,o ff se t g​ro u p s\timeskernel[0]\timeskernel[1]) or (∗,H o u t,W o u t,o f f s e t g r o u p s\timeskernel[0]\timeskernel[1])(*,H_{out},W_{out},offset_groups\timeskernel[0]\timeskernel[1])(∗,H o u t​,W o u t​,o ff se t g​ro u p s\timeskernel[0]\timeskernel[1]), where * represent any number of dimension.

- Output: (N,H o u t,W o u t,C o u t)(N,H_{out},W_{out},C_{out})(N,H o u t​,W o u t​,C o u t​) or (H o u t,W o u t,C o u t)(H_{out},W{out},C_{out})(H o u t​,W o u t,C o u t​) or (∗,H o u t,W o u t,C o u t)(*,H_{out},W_{out},C_{out})(∗,H o u t​,W o u t​,C o u t​)

H o u t=⌊H i n+p a d d i n g[0]+p a d d i n g[2]−d i l a t i o n[0]×(k e r n e l[0]−1)−1 s t r i d e[0]+1⌋H_{out}=\lfloor \frac{H_{in}+padding[0]+padding[2]-dilation[0]\times(kernel[0]-1)-1}{stride[0]}+1\rfloor H o u t​=⌊s t r i d e[0]H in​+p a dd in g[0]+p a dd in g[2]−d i l a t i o n[0]×(k er n e l[0]−1)−1​+1⌋ W o u t=⌊W i n+p a d d i n g[1]+p a d d i n g[3]−d i l a t i o n[1]×(k e r n e l[1]−1)−1 s t r i d e[1]+1⌋W_{out}=\lfloor \frac{W_{in}+padding[1]+padding[3]-dilation[1]\times(kernel[1]-1)-1}{stride[1]}+1\rfloor W o u t​=⌊s t r i d e[1]W in​+p a dd in g[1]+p a dd in g[3]−d i l a t i o n[1]×(k er n e l[1]−1)−1​+1⌋

Prototype: Pytorch convolution.

Traits: CommonVerifier, Misc, NoFuseFp16TypeLike, SameVariadicOperandSize, StencilLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`stride` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 2 elements
`pad` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 4 elements
`dilation` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 2 elements
`groupNum` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`offsetGroupNum` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`useMask` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`weight` | 4D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`offset` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`mask` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`bias` | 1D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type

## #`hbir.div` (::mlir::hbdk::hbir::DivOp)

HBIR tensor division.

Applies division operator element-wise, y i=l h s i÷r h s i y_i=lhs_i\div rhs_i y i​=l h s i​÷r h s i​.

Note:

- Our arithmetic operator support broadcast.

Prototype: Pytorch div.

Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.equal` (::mlir::hbdk::hbir::EqualOp)

HBIR tensor equal.

Determines whether two tensors are equal element by element - wise, y i=(l h s i==r h s i)y_i = (lhs_i == rhs_i) y i​=(l h s i​==r h s i​). Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of values or none type

## #`hbir.exp` (::mlir::hbdk::hbir::ExpOp)

HBIR tensor exp.

Applies exponential operator element - wise, y=e x y=e^{x}y=e x.

Note:

- Returns a new tensor with the exponential of the elements of the input tensor input.

Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.fake_cast` (::mlir::hbdk::hbir::FakeCastOp)

fake elemental type cast operation

Cast float input to specified dtype, and then cast back to the same float type. Traits: CommonVerifier, Misc, SameElementType, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dtype` | ::mlir::TypeAttr | any type attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 32-bit float or 16-bit float values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 32-bit float or 16-bit float values

## #`hbir.flip` (::mlir::hbdk::hbir::FlipOp)

HBIR flip

Reverse the order of the input tensor along given axis in dims.

Parametes:

- input: the input tensor.
- dims: axis need to reverse.

Shape:

- input: (∗)(*)(∗), where * represents any dimension.
- output: same as the input.

Traits: CommonVerifier, MoveF16CastLike, MoveLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.floor` (::mlir::hbdk::hbir::FloorOp)

HBIR tensor floor.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, EltwiseLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.gelu` (::mlir::hbdk::hbir::GELUOp)

HBIR GELU activation.

Applies gelu funciton element-wise. Gelu functon defined as:

G e l u(x)=x P(X≤x)=x∗ϕ(x)Gelu(x) = xP(X\leq x) = x*\phi(x)G e l u(x)=x P(X≤x)=x∗ϕ(x)

Note:

- Gelu is shorthand for Gaussian Error Linear Unit.

Shape:

- Input: (*), where * means any number of dimensions.
- Output: (*), same shape as the input.

Prototype: Pytorch gelu.

Traits: CommonVerifier, LutLike, NaiveRoiInfer, NaiveTiling, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.gather_elements` (::mlir::hbdk::hbir::GatherElementsOp)

HBIR gather op for onnx GatherElements.

HBIR gather op for onnx GatherElements. Traits: CommonVerifier, Misc, MoveF16CastLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, IndexOpInterface, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dim` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`indices` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.gather_nd` (::mlir::hbdk::hbir::GatherNdOp)

HBIR gather_nd op for onnx gather_nd.

HBIR gather_nd op for onnx gather_nd. Traits: CommonVerifier, Misc

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, IndexOpInterface, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`batchDim` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`indices` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values

## #`hbir.greater_equal` (::mlir::hbdk::hbir::GreaterEqualOp)

HBIR tensor greater_equal.

Applies greater_equal operator element - wise, y i=l h s i>=r h s i y_i = lhs_i > = rhs_i y i​=l h s i​>=r h s i​. Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of values or none type

## #`hbir.greater` (::mlir::hbdk::hbir::GreaterOp)

HBIR tensor greater.

Applies greater operator element - wise, y i=l h s i>r h s i y_i = lhs_i > rhs_i y i​=l h s i​>r h s i​. Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of values or none type

## #`hbir.grid_sample` (::mlir::hbdk::hbir::GridSampleOp)

HBIR grid_sample.

From the input and a flow-field grid, computes the output using input values and pixel locations from the grid.

Shape:

- input: input of shape (∗,H i n,W i n,C i n)(*, H_{in}, W_{in}, C_{in}) (∗,H in​,W in​,C in​), where * represent any number of dimension.
- grid: flow - field of shape (∗,H o u t,W o u t,2)(*, H_{out}, W_{out}, 2)(∗,H o u t​,W o u t​,2)
- output: (∗,H o u t,W o u t,C i n)(*, H_{out}, W_{out}, C_{in})(∗,H o u t​,W o u t​,C in​)

Traits: CommonVerifier, Expansion, Round, SampleLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`mode` | ::mlir::hbdk::InterpolationModeAttr | interpolation mode for all march
`expansionMode` | ::mlir::hbdk::ExpansionModeAttr | mode to expand input feature on H/W
`alignCorner` | ::mlir::BoolAttr | bool attribute
`padValue` | ::mlir::Attribute | 64-bit float attribute or 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`grid` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.index` (::mlir::hbdk::hbir::IndexOp)

HBIR index op for aten::index_select

Returns a new tensor which indexes the :attr:`input` tensor along dimension :attr:`dim` using the entries in :attr:`index` which is a `LongTensor`.

The returned tensor has the same number of dimensions as the original tensor (:attr:`input`). The :attr:`dim`\ th dimension has the same size as the length of :attr:`index`; other dimensions have the same size as in the original tensor.

Args: input (Tensor): the input tensor. dim (int): the dimension in which we index index (IntTensor or LongTensor): the tensor containing the indices to index

Traits: CommonVerifier, Misc, MoveF16CastLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, IndexOpInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dim` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`index` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.layernorm` (::mlir::hbdk::hbir::LayerNormOp)

Hbir Layer Normalize

Applies Layer Normalization over a mini - batch of inputs. This compute can be precisely described as:

y=x−m e a n[x]V a r[x]+ϵ∗w e i g h t+b i a s y = \frac{x - mean[x]} {\sqrt{Var[x] +\epsilon}} * weight + bias y=Va r[x]+ϵ
​x−m e an[x]​∗w e i g h t+bia s

The Mean and standard-deviation are calculated over the last D dimensions, where D is the dimension of normalized_shape(dims).

Note:

- Unlike Batch Normalization, which compute mean and standard - deviation, LayerNormalization compute these in single sample's different dimension.
- dims controls normalized_shape.

Shape:

- Input: (N,∗)(N, *)(N,∗)
- Output: (N,∗)(N, *)(N,∗) (same shape as input)

Prototype: Pytorch layerNorm.

Traits: CommonVerifier, Misc, SameVariadicOperandSize

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, Layout, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute
`eps` | ::mlir::FloatAttr | 64-bit float attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`weight` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`bias` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.leaky_relu` (::mlir::hbdk::hbir::LeakyReLUOp)

HBIR Leaky ReLU Op.

Applies LeakyRelu funciton element - wise.LeakyRelu function defined as:

L e a k y R e l u(x)=m a x(0,x)+s l o p e∗m i n(0,x)LeakyRelu(x) = max(0, x) + slope * min(0, x)L e ak y R e l u(x)=ma x(0,x)+s l o p e∗min(0,x)

Note:

- slope - Controls the angle of the negative slope.

Shape:

- Input: (*), where * means any number of dimensions.
- Output: (*), same shape as the input.

Prototype: Pytorch leaky_relu.

Traits: CommonVerifier, LutLike, NaiveRoiInfer, NaiveTiling, SameElementType, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`slop` | ::mlir::FloatAttr | 64-bit float attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.less_equal` (::mlir::hbdk::hbir::LessEqualOp)

HBIR tensor less_equal.

Applies less_equal operator element - wise, y i=l h s i<=r h s i y_i = lhs_i < = rhs_i y i​=l h s i​<=r h s i​. Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of values or none type

## #`hbir.less` (::mlir::hbdk::hbir::LessOp)

HBIR tensor less.

Applies less operator element - wise, y i=l h s i<r h s i y_i = lhs_i < rhs_i y i​=l h s i​<r h s i​. Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of values or none type

## #`hbir.linear` (::mlir::hbdk::hbir::LinearOp)

HBIR Linear.

Applies a linear transformation to the incoming data: y=x W T+b y = xW ^ T + b y=x W T+b

Note:

- Weight's shape is (C i n,C o u t)(C_{in},C_{out})(C in​,C o u t​).

Shape:

- Input: (∗,C i n)(*, C_{in})(∗,C in​) where ∗*∗ represents any number of dimensions and C i n C_{in}C in​ = in_features.
- Output: (∗,C o u t)(*, C_{out})(∗,C o u t​) where all but the last dimension are the same shape as the input and C o u t C_{out}C o u t​ = out_features.

Prototype: pytorch linear.

Traits: CommonVerifier, LinearLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`weight` | 2D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`bias` | 1D tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values

## #`hbir.log` (::mlir::hbdk::hbir::LogOp)

HBIR tensor log.

Applies natural logarithm operator element - wise, y=log⁡e(x)y = \log_e{(x)}y=log e​(x).

Note:

- Returns a new tensor with the natural logarithm of the elements of input.

Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.log_softmax` (::mlir::hbdk::hbir::LogSoftmaxOp)

HBIR LogSoftmax Op.

Applies the LogSoftmax function to an n - dimensional input Tensor rescaling them so that the elements of the n-dimensional output. The output tensor has the same dimension and shape as the input with values in the range [-inf, 0)

LogSoftmax function is defined as:

L o g S o f t m a x(x i)=l o g(e x p(x i)∑j e x p(x j))LogSoftmax(x_i) = log(\frac{exp(x_i)} {\sum_jexp(x_j)})L o g S o f t ma x(x i​)=l o g(∑j​e x p(x j​)e x p(x i​)​)

Shape:

- Input(*), where * means, any number of additional dimensions.
- Output(*), same shape as the input.

Prototype: Pytorch LogSoftmax.

Traits: CommonVerifier, LutLike, NaiveRoiInfer, NaiveTiling, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dim` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.logical_and` (::mlir::hbdk::hbir::LogicalAndOp)

HBIR tensor and.

Applies 'logical and' operator element - wise, y i=l h s i&&r h s i y_i = lhs_i \&\& rhs_i y i​=l h s i​&&r h s i​. Traits: Broadcastable, CommonVerifier, EltwiseLike, SameOperandsElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 8-bit signed integer or 16-bit signed integer or or 16-bit float or values or none type
`rhs` | tensor of 8-bit signed integer or 16-bit signed integer or or 16-bit float or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of values or none type

## #`hbir.logical_not` (::mlir::hbdk::hbir::LogicalNotOp)

HBIR tensor logical not, output bool.

Traits: CommonVerifier, EltwiseLike, SameOperandsAndResultShape, SameOperandsElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 8-bit signed integer or 16-bit signed integer or 16-bit float or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of values or none type

## #`hbir.logical_or` (::mlir::hbdk::hbir::LogicalOrOp)

HBIR tensor or.

Applies 'logical or' operator element - wise, y i=l h s i∣∣r h s i y_i = lhs_i || rhs_i y i​=l h s i​∣∣r h s i​. Traits: Broadcastable, CommonVerifier, EltwiseLike, SameOperandsElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 8-bit signed integer or 16-bit signed integer or or 16-bit float or values or none type
`rhs` | tensor of 8-bit signed integer or 16-bit signed integer or or 16-bit float or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of values or none type

## #`hbir.matmul` (::mlir::hbdk::hbir::MatMulOp)

HBIR Matrix Multiplication.

Applies matrix multiplication between two inputs: C=A×B C = A \times B C=A×B, where ×\times× means matrix multiplication.

Note:

- If both tensors are 1-dimensional, the dot product (scalar) is returned
- If both arguments are 2-dimensional, the matrix-matrix product is returned
- If the first argument is 1-dimensional and the second argument is 2-dimensional, the matrix-vector product is returned
- If the first argument is 2-dimensional and the second argument is 1-dimensional, the matrix-vector product is returned
- If both arguments are at least 1-dimensional and at least one argument is N-dimensional (where N > 2), then a batched matrix multiply is returned

Shape:

- lhs: (B l,M,C)(B_{l}, M, C)(B l​,M,C), where B l B_{l}B l​ represent any number of dimension.
- rhs: (B r,C,N)(B_{r}, C, N)(B r​,C,N), where B r B_{r}B r​ represent any number of dimension.
- output: (B o,M,N)(B_{o}, M, N)(B o​,M,N), where B o B_{o}B o​ represent represent the result of broadcast between B l B_{l}B l​ and V r V_{r}V r​.

Prototype: Pytorch Matmul.

Traits: CommonVerifier, MatmulLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values

## #`hbir.max` (::mlir::hbdk::hbir::MaxOp)

HBIR tensor max.

Applies maximum operator element-wise, y i=m a x(l h s i,r h s i)y_i=max(lhs_i,rhs_i)y i​=ma x(l h s i​,r h s i​).

Note:

- Our arithmetic operator support broadcast.

Traits: Broadcastable, CommonVerifier, EltwiseLike, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.max_pool` (::mlir::hbdk::hbir::MaxPoolOp)

HBIR n-D max pooling(only support 1d and 2d currently).

Applies a n-D max Pooling over an input.

In the 2d case, for example, the output value of the operator with input size (N,H,W,C)(N, H, W, C)(N,H,W,C), output (N,H o u t,W o u t,C)(N, H_{out}, W_{out}, C)(N,H o u t​,W o u t​,C) and kernel size (k e r h,k e r w)(ker_{h}, ker_{w})(k e r h​,k e r w​) can be precisely described as:

o u t(N i,h,w,C j)=1 k e r h∗k e r w max⁡m=0 k e r h−1 max⁡n=0 k e r w−1 i n p u t(N i,s t r i d e[0]×h+m,s t r i d e[1]×w+n,C j)out(N_i, h, w, C_j) = \frac{1} { ker_h *ker_w }\max_{m = 0} ^ { ker_h - 1 }\max_{n = 0} ^ { ker_w - 1 } input(N_i, stride[0] \times h + m, stride[1] \times w + n, C_j)o u t(N i​,h,w,C j​)=k e r h​∗k e r w​1​max m=0 k e r h​−1​max n=0 k e r w​−1​in p u t(N i​,s t r i d e[0]×h+m,s t r i d e[1]×w+n,C j​)

where h,w h,w h,w respectively represent the size of H and W.

Note:

- parameters has the same manner as the Conv2D operator, the same goes for the output size.
- ceilMode controls output 's compute is mode of floor or ceil, it' s default value is false.

Shape:

- Input: (N,H i n,W i n,C)(N, H_{in}, W_{in}, C)(N,H in​,W in​,C) or (H i n,W i n,C)(H_{in}, W_{in}, C)(H in​,W in​,C) or (∗,H i n,W i n)(*, H_{in}, W_{in})(∗,H in​,W in​)

- Output: (N,H o u t,W o u t,C)(N, H_{out}, W_{out}, C)(N,H o u t​,W o u t​,C) or (H o u t,W o u t,C)(H_{out}, W_{out}, C)(H o u t​,W o u t​,C) or (∗,H o u t,W o u t,C)(*, H_{out}, W_{out}, C)(∗,H o u t​,W o u t​,C), where ∗*∗ represents any number of dimension.

H o u t=⌊H i n+p a d d i n g[0]+p a d d i n g[2]−k e r n e l[0]s t r i d e[0]+1⌋H_{out} = \lfloor {\frac{H_{in} + padding[0] + padding[2] - kernel[0]} {stride[0]} + 1}\rfloor H o u t​=⌊s t r i d e[0]H in​+p a dd in g[0]+p a dd in g[2]−k er n e l[0]​+1⌋

W o u t=⌊W i n+p a d d i n g[1]+p a d d i n g[3]−k e r n e l[1]s t r i d e[1]+1⌋W_{out} = \lfloor {\frac{W_{in} + padding[1] + padding[3] - kernel[1]} {stride[1]} + 1}\rfloor W o u t​=⌊s t r i d e[1]W in​+p a dd in g[1]+p a dd in g[3]−k er n e l[1]​+1⌋

if ceilMode = true, please use ceil replace floor in the above ouput formula.

Prototype: Pytorch max_pool.

Traits: CommonVerifier, MoveF16CastLike, PoolLike, StencilLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`kernel` | ::mlir::ArrayAttr | 64-bit integer array attribute
`stride` | ::mlir::ArrayAttr | 64-bit integer array attribute
`pad` | ::mlir::ArrayAttr | 64-bit integer array attribute
`dilation` | ::mlir::ArrayAttr | 64-bit integer array attribute
`ceilMode` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or values or none type

## #`hbir.min` (::mlir::hbdk::hbir::MinOp)

HBIR tensor min.

Applies minimum operator element-wise, y i=m i n(l h s i,r h s i)y_i=min(lhs_i,rhs_i)y i​=min(l h s i​,r h s i​).

Note:

- Our arithmetic operator support broadcast.

Traits: Broadcastable, CommonVerifier, EltwiseLike, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.mod` (::mlir::hbdk::hbir::ModOp)

Hbir get modulo of two dividing tensors

Computes the modulo function. It is equivalent to the operator x1 % x2

Parameters:

- sameSignAsDividend: result has the same sign as dividend or divisor. Default true means same sign as dividend.

Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`sameSignAsDividend` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.mul` (::mlir::hbdk::hbir::MulOp)

HBIR tensor multiplication.

Applies multiplication operator element-wise, y i=l h s i×r h s i y_i=lhs_i\times rhs_i y i​=l h s i​×r h s i​.

Note:

- Our arithmetic operator support broadcast.

Prototype: Pytorch mul.

Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: CalibOp, HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.nan_to_num` (::mlir::hbdk::hbir::NanToNumOp)

HBIR tensor nan_to_num.

Replaces NaN, positive infinity, and negative infinity values in input with the values specified by nan, posinf, and neginf.

Note:

- Returns a new tensor with the replace value of the elements of input.

Traits: CommonVerifier, EltwiseLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`nan` | ::mlir::FloatAttr | 64-bit float attribute
`posinf` | ::mlir::FloatAttr | 64-bit float attribute
`neginf` | ::mlir::FloatAttr | 64-bit float attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type values or none type

## #`hbir.neg` (::mlir::hbdk::hbir::NegOp)

HBIR tensor neg.

Applies negation operator element - wise, y=x×−1 y = x\times - 1 y=x×−1.

Note:

- Returns a new tensor with the negative of the elements of input.

Traits: CommonVerifier, EltwiseLike, MoveF16CastLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.nonzero` (::mlir::hbdk::hbir::NonZeroOp)

HBIR nonzero op for torch.nonzero

Find all indices in tensor that are not 0

Traits: CommonVerifier, Misc

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer values or none type

## #`hbir.pad` (::mlir::hbdk::hbir::PadOp)

Pad at both edges of Tensor.

Padding at the begin and end position with constant / border value. Traits: CommonVerifier, Expansion, Foldable, MoveF16CastLike, MoveLike, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, Layout, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`begin` | ::mlir::ArrayAttr | 64-bit integer array attribute
`end` | ::mlir::ArrayAttr | 64-bit integer array attribute
`expansionMode` | ::mlir::hbdk::ExpansionModeAttr | mode to expand input feature on H/W
`padValue` | ::mlir::Attribute | 64-bit float attribute or 64-bit signless integer attribute
`foldable` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values

## #`hbir.point_pillar_preprocess` (::mlir::hbdk::hbir::PointPillarPreProcessOp)

HBIR point pillar preprocess op.

HBIR point pillar preprocess.Voxelization and Normalization Traits: CommonVerifier, Misc

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, IndexOpInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`pcRanges` | ::mlir::ArrayAttr | 64-bit float array attribute
`normRanges` | ::mlir::ArrayAttr | 64-bit float array attribute
`voxelSizes` | ::mlir::ArrayAttr | 64-bit float array attribute
`maxVoxelNum` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`maxPointsPerVoxel` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`normDims` | ::mlir::ArrayAttr | 64-bit integer array attribute

### #Operands:

Operand | Description
--- | ---
`points` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`voxels` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`coords` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type

## #`hbir.pow` (::mlir::hbdk::hbir::PowOp)

HBIR tensor pow.

Pow takes input data(lhs) and exponent Tensor(rhs), and produces one output data where the function f(x)=x e x p o n e n t f(x) = x ^ {exponent}f(x)=x e x p o n e n t, is applied to the data tensor element - wise Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.prelu` (::mlir::hbdk::hbir::PreluOp)

HBIR tensor prelu

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, Misc

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`slope` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.relu` (::mlir::hbdk::hbir::ReLUOp)

HBIR ReLU activation.

Applies the rectified linear unit function element - wise.Relu function is defined as:

R e L U(x)=(x)+=m a x(0,x)ReLU(x) = (x) ^ + = max(0, x)R e LU(x)=(x)+=ma x(0,x)

Shape:

- Input(*), where * means any number of dimensions.
- Output(*), same shapes as the input.

Prototype: Pytorch Relu.

Traits: CommonVerifier, LutLike, NaiveRoiInfer, NaiveTiling, SameElementType, SameOperandsAndResultShape

Interfaces: CalibOp, HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.reciprocal` (::mlir::hbdk::hbir::ReciprocalOp)

HBIR tensor reciprocal.

Applies reciprocal operator element - wise, y=1 x y = \frac{1}{x}y=x 1​.

Note:

- Returns a new tensor with the reciprocal of the elements of input.

Traits: CommonVerifier, EltwiseLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.reduce_all` (::mlir::hbdk::hbir::ReduceAllOp)

Tests if all elements in input evaluate to True.

Return True if all elements in the row evaluate to True and False otherwise.

Parameters:

- input: the input tensor.
- dims: dimensions to perform reduce all on. If it's a list, reduce over all of them. Accepted range is [-r, r - 1] where r = rank(input).
- keepDim: keep the reduced dimensions or not. Default true means keep reduced dimensions.

Shape:

- input: (∗)(*)(∗), where * represents any dimension.
- output: if keepDim is True, same as input. Otherwise, all reduced dims will be discarded (e.g. if input is of shape 1x2x3x4 and dims=[1, 2], the output shape will be 1x4).

Traits: CommonVerifier, ReduceLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute
`keepDim` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of values or none type

## #`hbir.reduce_argmax` (::mlir::hbdk::hbir::ReduceArgmaxOp)

Calculate max on multiple axes and return its index.

Return the indices of the max elements of the input tensor's element along the provided axis.

Parameters:

- input: the input tensor.
- dims: dimension to perform reduce argmax on. Accepted range is [-r, r - 1] where r = rank(input).
- keepDim: keep the reduced dimensions or not. Default true means keep reduced dimensions.

Shape:

- input: (∗)(*)(∗), where * represents any dimension.
- output: if keepDim is True, same as input. Otherwise, all reduced dims will be discarded (e.g. if input is of shape 1x2x3x4 and dims=[1], the output shape will be 1x3x4).

Prototype: ONNX ReduceArgMax.

Traits: CommonVerifier, ReduceLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, IndexOpInterface, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute
`keepDim` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type

## #`hbir.reduce_argmin` (::mlir::hbdk::hbir::ReduceArgminOp)

Calculate min on multiple axes and return its index.

Return the indices of the min elements of the input tensor's element along the provided axis.

Parameters:

- input: the input tensor.
- dims: dimension to perform reduce argmin on. Accepted range is [-r, r - 1] where r = rank(input).
- keepDim: keep the reduced dimensions or not. Default true means keep reduced dimensions.

Shape:

- input: (∗)(*)(∗), where * represents any dimension.
- output: if keepDim is True, same as input. Otherwise, all reduced dims will be discarded (e.g. if input is of shape 1x2x3x4 and dims=[1], the output shape will be 1x3x4).

Prototype: ONNX ReduceArgMin.

Traits: CommonVerifier, ReduceLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, IndexOpInterface, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute
`keepDim` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type

## #`hbir.reduce_max` (::mlir::hbdk::hbir::ReduceMaxOp)

Calculate max on multiple axes.

Return the max value of all elements in the provided axes of the input tensor.

Parameters:

- input: the input tensor.
- dims: dimensions to perform reduce max on. If it's a list, reduce over all of them. Accepted range is [-r, r - 1] where r = rank(input).
- keepDim: keep the reduced dimensions or not. Default true means keep reduced dimensions.

Shape:

- input: (∗)(*)(∗), where * represents any dimension.
- output: if keepDim is True, same as input. Otherwise, all reduced dims will be discarded (e.g. if input is of shape 1x2x3x4 and dims=[1, 2], the output shape will be 1x4).

Prototype: ONNX ReduceMax.

Traits: CommonVerifier, MoveF16CastLike, ReduceLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute
`keepDim` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.reduce_mean` (::mlir::hbdk::hbir::ReduceMeanOp)

Calculate mean on multiple axes.

Return the mean of all elements in the provided axes of the input tensor.

Parameters:

- input: the input tensor.
- dims: dimensions to perform reduce mean on. If it's a list, reduce over all of them. Accepted range is [-r, r - 1] where r = rank(input).
- keepDim: keep the reduced dimensions or not. Default true means keep reduced dimensions.

Shape:

- input: (∗)(*)(∗), where * represents any dimension.
- output: if keepDim is True, same as input. Otherwise, all reduced dims will be discarded (e.g. if input is of shape 1x2x3x4 and dims=[1, 2], the output shape will be 1x4).

Prototype: ONNX ReduceMean.

Traits: CommonVerifier, ReduceLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute
`keepDim` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.reduce_min` (::mlir::hbdk::hbir::ReduceMinOp)

Calculate min on multiple axes.

Return the min value of all elements in the provided axes of the input tensor.

Parameters:

- input: the input tensor.
- dims: dimensions to perform reduce min on. If it's a list, reduce over all of them. Accepted range is [-r, r - 1] where r = rank(input).
- keepDim: keep the reduced dimensions or not. Default true means keep reduced dimensions.

Shape:

- input: (∗)(*)(∗), where * represents any dimension.
- output: if keepDim is True, same as input. Otherwise, all reduced dims will be discarded (e.g. if input is of shape 1x2x3x4 and dims=[1, 2], the output shape will be 1x4).

Prototype: ONNX ReduceMin

Traits: CommonVerifier, MoveF16CastLike, ReduceLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute
`keepDim` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.reduce_sum` (::mlir::hbdk::hbir::ReduceSumOp)

Calculate sum on multiple axes.

Return the sum of all elements in the provided axes of the input tensor.

Parameters:

- input: the input tensor.
- dims: dimensions to perform reduce sum on. If it's a list, reduce over all of them. Accepted range is [-r, r - 1] where r = rank(input).
- keepDim: keep the reduced dimensions or not. Default true means keep reduced dimensions.

Shape:

- input: (∗)(*)(∗), where * represents any dimension.
- output: if keepDim is True, same as input. Otherwise, all reduced dims will be discarded (e.g. if input is of shape 1x2x3x4 and dims=[1, 2], the output shape will be 1x4).

Prototype: ONNX ReduceSum.

Traits: CommonVerifier, ReduceLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute
`keepDim` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.reshape` (::mlir::hbdk::hbir::ReshapeOp)

View a tensor as another shape

Returns a tensor with the same data and number of elements as input, but with the specified shape.When possible, the returned tensor will be a view of input.

Note:

- shape - the new shape.

Prototype: Pytorch reshape.

Traits: CommonVerifier, Foldable, MoveF16CastLike, MoveLike, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, Layout, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`shape` | ::mlir::ArrayAttr | 64-bit integer array attribute
`foldable` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.resize2d` (::mlir::hbdk::hbir::Resize2dOp)

HBIR 2-D resizing.

Scale the input proportionally.

Note:

- ratio controls zoom size.*mode controls interpolation type, it's default value is nearest.

Shape:

- Input: (∗,H i n,W i n,C)(*, H_{in}, W_{in}, C)(∗,H in​,W in​,C)
- Output: (∗,H o u t,W o u t,C)(*, H_{out}, W_{out}, C)(∗,H o u t​,W o u t​,C), where

H o u t=⌊H i n∗r a t i o⌋H_{out} = \lfloor{H_{in} * ratio}\rfloor H o u t​=⌊H in​∗r a t i o⌋

W o u t=⌊W i n∗r a t i o⌋W_{out} = \lfloor{W_{in} * ratio}\rfloor W o u t​=⌊W in​∗r a t i o⌋

Prototype: Pytorch upsample_nearest2d.

Traits: CommonVerifier, Expansion, Round, SampleLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`ratio` | ::mlir::ArrayAttr | 64-bit float array attribute with exactly 2 elements
`size` | ::mlir::ArrayAttr | 64-bit integer array attribute with exactly 2 elements
`step` | ::mlir::ArrayAttr | 64-bit float array attribute with exactly 2 elements
`initialOffset` | ::mlir::ArrayAttr | 64-bit float array attribute with exactly 2 elements
`mode` | ::mlir::hbdk::InterpolationModeAttr | interpolation mode for all march
`expansionMode` | ::mlir::hbdk::ExpansionModeAttr | mode to expand input feature on H/W
`padValue` | ::mlir::Attribute | 64-bit float attribute or 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.roll` (::mlir::hbdk::hbir::RollOp)

Roll the tensor along the given dimensions

Roll the tensor along the given dimension.Elements that are shifted beyond the last position are re-introduced at the first position.

Note:

- shifts - The number of places by which the elements of the tensor are shifted.
- dims -Axis along which to roll.

Prototype: Pytorch roll.

Traits: CommonVerifier, MoveF16CastLike, MoveLike, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`shifts` | ::mlir::ArrayAttr | 64-bit integer array attribute
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.round` (::mlir::hbdk::hbir::RoundOp)

HBIR tensor round.

Rounds elements of input to the nearest integer.

Note:

- This function implements the round half to even.
- Returns a new tensor with the round of the elements of input.

Traits: CommonVerifier, EltwiseLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`decimals` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.rsqrt` (::mlir::hbdk::hbir::RsqrtOp)

HBIR tensor rsqrt.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.scatter_elements` (::mlir::hbdk::hbir::ScatterElementsOp)

HBIR scatter elements op. Same semantics as scatter elements in onnx. In addition, it supports the mean mode of torch scatter_reduce

HBIR scatter elements scatter.The ONNX op link: https: // github.com/onnx/onnx/blob/main/docs/Operators.md#ScatterElements

Copy the data to output, the specify a direction axis, use the values in updates to update the values in output at specific location according to indices.

In addition, it supports the mean mode of torch scatter_reduce.

Traits: CommonVerifier, Misc

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, IndexOpInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`axis` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`scatterReduceMode` | ::mlir::hbdk::ScatterReduceModeAttr | scatter reduce mode

### #Operands:

Operand | Description
--- | ---
`data` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`indices` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values or none type
`updates` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.scatter_nd` (::mlir::hbdk::hbir::ScatterNDOp)

HBIR scatterND op. Same semantics as scatterND in onnx.

HBIR scatterDN.The ONNX op link: https: // github.com/onnx/onnx/blob/main/docs/Operators.md#ScatterND

Copy the data to output, then use the values in updates to update the values in the output at some directions given by the indices.

Traits: CommonVerifier, Misc

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, IndexOpInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`scatterReduceMode` | ::mlir::hbdk::ScatterReduceModeAttr | scatter reduce mode

### #Operands:

Operand | Description
--- | ---
`data` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values
`indices` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer values
`updates` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values

## #`hbir.select` (::mlir::hbdk::hbir::SelectOp)

select a tensor from a bigger tensor on a specific dim and index

Slices the input tensor along the selected dimension at the given index.

Note:

- dim - the dimension to slice.
- index - the index to select with.
- Select operator is equivalent to slicing.

Prototype:Pytorch select.

Traits: CommonVerifier, MoveF16CastLike, MoveLike, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dim` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`index` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.sigmoid` (::mlir::hbdk::hbir::SigmoidOp)

HBIR Sigmoid activation.

Applies the element - wise function.Sigmoid function is defined as:

S i g m o i d(x)=1 1+e x p(−x)Sigmoid(x) = \frac{1} {1 + exp(-x)}S i g m o i d(x)=1+e x p(−x)1​

Shape:

- Input: (*), where * means any number of dimensions.
- Output: (*), same shape as the input.

Prototype: Pytorch sigmoid.

Traits: CommonVerifier, LutLike, NaiveRoiInfer, NaiveTiling, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.sign` (::mlir::hbdk::hbir::SignOp)

HBIR tensor sign.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, EltwiseLike, MoveF16CastLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.sin` (::mlir::hbdk::hbir::SinOp)

HBIR tensor sin.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.sinh` (::mlir::hbdk::hbir::SinhOp)

HBIR tensor sinh.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.slice` (::mlir::hbdk::hbir::SliceOp)

Slice a tensor out of a tensor

Slicing like python's style means taking elements from one given index to another given index.

Note:

- begin -the index start to pick(inclusive).
- end -the index end to pick(exclusive).
- step -the step interval of picking.

Prototype: Pytorch slice.

Traits: CommonVerifier, Foldable, MoveF16CastLike, MoveLike, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, Layout, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`begin` | ::mlir::ArrayAttr | 64-bit integer array attribute
`end` | ::mlir::ArrayAttr | 64-bit integer array attribute
`step` | ::mlir::ArrayAttr | 64-bit integer array attribute
`foldable` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.slice_scatter` (::mlir::hbdk::hbir::SliceScatterOp)

Embeds the values of the src tensor into input at the given dimension

Embeds the values of the src tensor into input at the given dimension. This function returns a tensor with fresh storage; it does not create a view.

Note:

- src (Tensor) -the tensor to embed into input.
- dim (int) -the dimension to insert the slice into.
- start (int) -the start index of where to insert the slice.
- end (int) -the end index of where to insert the slice.
- step (int) -the how many elements to skip in.

Prototype: Pytorch slice_scatter.

Traits: CommonVerifier, Misc

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dim` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`start` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`end` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`step` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`src` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.softmax` (::mlir::hbdk::hbir::SoftmaxOp)

HBIR Softmax Op.

Applies the Softmax function to an n - dimensional input Tensor rescaling them so that the elements of the n-dimensional output. Tensor lie in the range [0,1][0, 1] [0,1] and sum to 1.

Softmax function is defined as:

S o f t m a x(x i)=e x p(x i)∑j e x p(x j)Softmax(x_i) = \frac{exp(x_i)} {\sum_jexp(x_j)}S o f t ma x(x i​)=∑j​e x p(x j​)e x p(x i​)​

Shape:

- Input(*), where ∗*∗ means, any number of additional dimensions.Output(), same shape as the input.

Prototype: Pytorch softmax.

Traits: CommonVerifier, Misc, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dim` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.softplus` (::mlir::hbdk::hbir::SoftplusOp)

HBIR Softplus Op.

Applies the SoftPlus function element-wise. SoftPlus function defined as:

S o f t P l u s(x)=1 β∗l o g(1+e x p(β∗x))SoftPlus(x) = \frac{1}{\beta}*log(1+exp(\beta * x))S o f tPl u s(x)=β 1​∗l o g(1+e x p(β∗x))

SoftPlus is a smooth approximation to the ReLU function.

Note:

- beta - the β\beta β value for the Softplus formulation.
- max - values is for numerical stability, when β∗x>m a x,S o f t P l u s(x)=x\beta *x > max, SoftPlus(x)=x β∗x>ma x,S o f tPl u s(x)=x.

Shape:

- Input: (*), where * means any number of dimensions.
- Output: (*), same shape as the input.

Prototype: Pytorch softplus.

Traits: CommonVerifier, LutLike, NaiveRoiInfer, NaiveTiling, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`beta` | ::mlir::FloatAttr | 64-bit float attribute
`threshold` | ::mlir::FloatAttr | 64-bit float attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.sort` (::mlir::hbdk::hbir::SortOp)

HBIR tensor sort

Sorts the elements of the input tensor along a given dimension in ascending order by value.

Parameters:

- input: the input tensor.
- dim: the dimension to sort along.
- descending: controls the sorting order (ascending or descending).
- stable: makes the sorting routine stable, which guarantees that the order of equivalent elements is preserved.

Shape:

- Input: (N,∗)(N, *)(N,∗)
- Values: (N,∗)(N, *)(N,∗) (same shape as input)
- Indices: (N,∗)(N, *)(N,∗) (same shape as input)

Prototype: Pytorch sort.

Traits: CommonVerifier, Misc

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, IndexOpInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dim` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`descending` | ::mlir::BoolAttr | bool attribute
`stable` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`values` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`indices` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer values or none type

## #`hbir.sqrt` (::mlir::hbdk::hbir::SqrtOp)

HBIR tensor sqrt.

Applies square root operator element - wise, y=x y = \sqrt{x}y=x
​.

Note:

- Returns a new tensor with the square root of the elements of input. If input is negative, then it will return NaN.

Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.stack` (::mlir::hbdk::hbir::StackOp)

Stack multiple tensors along one extra dimension

Concatenates a sequence of tensors along a new dimension.No elemental type conversion.

Note:

- All tensors need to be of the same size.

Prototype: Pytorch stack.

Traits: CommonVerifier, MoveLike, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dim` | ::mlir::IntegerAttr | 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`inputs` | variadic of tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.sub` (::mlir::hbdk::hbir::SubOp)

HBIR tensor substraction.

Applies substraction operator element-wise, y i=l h s i−r h s i y_i=lhs_i-rhs_i y i​=l h s i​−r h s i​.

Note:

- Our arithmetic operator support broadcast.

Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: CalibOp, HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.tan` (::mlir::hbdk::hbir::TanOp)

HBIR tensor tan.

Return tensor after the operation, which has the same shape as the input. Traits: CommonVerifier, LutLike, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.tanh` (::mlir::hbdk::hbir::TanhOp)

HBIR Tanh activation.

Applies the tanh function element - wise.Tanh function is defined as:

T a n h(x)=e x p(x)−e x p(−x)e x p(x)+e x p(−x)Tanh(x) =\frac{exp(x) - exp(-x)} {exp(x) + exp(-x)}T anh(x)=e x p(x)+e x p(−x)e x p(x)−e x p(−x)​

Shape:

- Input: (*), where * means any number of dimensions.
- Output: (*), same shape as the input.

Prototype: Pytorch tanh.

Traits: CommonVerifier, LutLike, NaiveRoiInfer, NaiveTiling, SameOperandsAndResultShape

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, MoveTransposeInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.tile` (::mlir::hbdk::hbir::TileOp)

Constructs a tensor by tiling a given tensor.

Traits: CommonVerifier, MoveF16CastLike, MoveLike, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`multiplies` | ::mlir::ArrayAttr | 64-bit integer array attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

## #`hbir.topk` (::mlir::hbdk::hbir::TopkOp)

HBIR tensor topk

Returns the k largest elements of the given input tensor along a given dimension.

If dim is not given, the last dimension of the input is chosen.

If largest is False then the k smallest elements are returned.

values, indices are returned in separate tensors, where the indices are the indices of the elements in the original input tensor.

The boolean option sorted if True, will make sure that the returned k elements are themselves sorted.

Traits: CommonVerifier, Misc, MoveF16CastLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, IndexOpInterface, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`k` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`dim` | ::mlir::IntegerAttr | 64-bit signless integer attribute
`largest` | ::mlir::BoolAttr | bool attribute
`sorted` | ::mlir::BoolAttr | bool attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`values` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`indices` | tensor of 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer values or none type

## #`hbir.transpose` (::mlir::hbdk::hbir::TransposeOp)

Reverse or permute the dims of an array; returns the modified array.

Returns a tensor that is a view of the original tensor input with its dimesions permuted.

Note:

- input: the input tensor.
- dims: the desired ordering of dimensions.

Prototype: Pytorch permute.

Traits: CommonVerifier, MoveF16CastLike, MoveLike, SameElementType

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, Layout, NoMemoryEffect (MemoryEffectOpInterface), NonBatchAxesInfer, Perf, Quantizable, RoiInfer, SchedInterface, SchedTemp, ShapeInference, Tiling

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`dims` | ::mlir::ArrayAttr | 64-bit integer array attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values

## #`hbir.warp` (::mlir::hbdk::hbir::WarpOp)

HBIR warp.

From the input, sample(bi - linear interpolation) pixels specified by grid.

Shape:

- input: input of shape (∗,H i n,W i n,C i n)(*, H_{in}, W_{in}, C_{in})(∗,H in​,W in​,C in​), where * represent any number of dimension.
- grid: flow - field of shape (∗,H o u t,W o u t,2)(*, H_{out}, W_{out}, 2)(∗,H o u t​,W o u t​,2)
- output: (∗,H o u t,W o u t,C i n)(*, H_{out}, W_{out}, C_{in})(∗,H o u t​,W o u t​,C in​)

Traits: CommonVerifier, Expansion, Round, SampleLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Attributes:

Attribute | MLIR Type | Description
--- | --- | ---
`mode` | ::mlir::hbdk::InterpolationModeAttr | interpolation mode for all march
`expansionMode` | ::mlir::hbdk::ExpansionModeAttr | mode to expand input feature on H/W
`padValue` | ::mlir::Attribute | 64-bit float attribute or 64-bit signless integer attribute

### #Operands:

Operand | Description
--- | ---
`input` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type
`move` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or values or none type

## #`hbir.where` (::mlir::hbdk::hbir::WhereOp)

HBIR where op

Return a tensor of elements selected from either lhs or rhs, depending on condition.

Traits: Broadcastable, CommonVerifier, EltwiseLike

Interfaces: HBTLExecutable, HbdkExecutorInterface, HbdkInferType, NoMemoryEffect (MemoryEffectOpInterface), Perf, Quantizable, SchedInterface, SchedTemp, ShapeInference

Effects: MemoryEffects::Effect{}

### #Operands:

Operand | Description
--- | ---
`condition` | tensor of values or none type
`lhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type
`rhs` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

### #Results:

Result | Description
--- | ---
`output` | tensor of 64-bit float or 32-bit float or 16-bit float or bfloat16 type or 8-bit signed integer or 16-bit signed integer or 32-bit signed integer or 64-bit signed integer or 8-bit unsigned integer or 16-bit unsigned integer or 32-bit unsigned integer or 64-bit unsigned integer or or values or none type

On This Page