函数说明
KDNN目前支持的算子如表1所示。
算子名称 |
算子说明 |
|---|---|
GEMM(单线程)&Linear(多线程) |
矩阵乘法算子。 |
Linear+postops |
在Linear算子计算后进行relu、silu、gelu、resext、resmul及residential等操作。 |
Softmax |
Softmax归一化算子。 |
Conv2d/Conv3d |
2d/3d卷积算子。 |
Group Normalization |
组归一化算子。 |
Layer Normalization |
层归一化算子。 |
Embedding |
映射。 |
Root Mean Square Normalization |
均方根归一化算子。 |
Rotary Position Embedding |
旋转位置编码。 |
常用对象如表2所示说明。
参数名称 |
数据类型 |
描述 |
|---|---|---|
shape |
struct KDNN::Shape |
{d1, d2, d3, m, n}最高5d要和layout对应。 |
type |
struct KDNN::Element::Type |
枚举类型支持以下4种:
|
layout |
enum class KDNN::Layout |
枚举类型,具体支持的排布参考各算子TensorInfo对象初始化时支持的layout类型表格。 |
父主题: KuDNN算子库函数说明