已关闭
[Requirement|需求建议]: 新增 aclsparseLtMatmulDescriptorInit 接口及 aclsparseLt 描述符类型体系 #113
zhengyifei创建于 7月24日关闭于 25 天前
zhengyifei
7月24日 评论:
7月24日 评论:
/assign @zhengyifei


7月24日 将 zhengyifei 设为负责人
7月24日 关联了pull request:feat: 新增 aclsparseLtMatmulDescriptorInit 接口及 aclsparseLt 描述符类型体系
25 天前 关闭了 issue
25 天前 添加了label:resolved
Thanks for sending an requirement! Please fill in the following template to help quickly solve your problem.
Backgroud(背景信息)
ops-sparse 仓已实现 aclsparseLt 库管理接口(Init/Destroy/GetErrorName/GetErrorString)和
aclsparseLtHandle_topaque 类型,为 sparseLt 子库提供了上下文管理基础设施。但当前 sparseLt 尚无描述符类型体系,无法描述结构化稀疏矩阵乘法运算所需的矩阵元信息(形状、布局、数据类型、操作类型、计算精度、稀疏模式等)。需要从零搭建 aclsparseLt 描述符类型体系,为后续 sparseLt matmul 规划/执行接口(Matmul / GetAlgo / Plan 等)提供描述符基础设施。
Origin(信息来源)
CANN 生态开发者
Benefit / Necessity (价值/作用)
Design(设计方案)
新增接口(5 个)
aclsparseLtDenseDescriptorInitaclsparseLtStructuredDescriptorInitaclsparseLtMatmulDescriptorInitaclsparseLtMatDescriptorDestroyaclsparseLtMatmulDescriptorDestroy新增类型
aclsparseLtMatDescriptor_t/aclsparseLtMatmulDescriptor_t(opaque pointer,对外仅前向声明,内部结构体定义在sparseLt/common/*_internal.h)aclsparseLtSparsity_t(50_PERCENT 2:4 结构化稀疏)aclsparseComputeType_t(独立计算精度枚举,与 aclDataType 解耦,对标 cusparseComputeType_t)接口原型
aclsparseStatus_t aclsparseLtDenseDescriptorInit( const aclsparseLtHandle_t *handle, aclsparseLtMatDescriptor_t *matDescr, int64_t rows, int64_t cols, int64_t ld, uint32_t alignment, aclDataType valueType, aclsparseOrder_t order); aclsparseStatus_t aclsparseLtStructuredDescriptorInit( const aclsparseLtHandle_t *handle, aclsparseLtMatDescriptor_t *matDescr, int64_t rows, int64_t cols, int64_t ld, uint32_t alignment, aclDataType valueType, aclsparseOrder_t order, aclsparseLtSparsity_t sparsity); aclsparseStatus_t aclsparseLtMatmulDescriptorInit( const aclsparseLtHandle_t *handle, aclsparseLtMatmulDescriptor_t *matmulDescr, aclsparseOperation_t opA, aclsparseOperation_t opB, const aclsparseLtMatDescriptor_t matA, const aclsparseLtMatDescriptor_t matB, const aclsparseLtMatDescriptor_t matC, const aclsparseLtMatDescriptor_t matD, aclsparseComputeType_t computeType); aclsparseStatus_t aclsparseLtMatDescriptorDestroy( const aclsparseLtMatDescriptor_t *matDescr); aclsparseStatus_t aclsparseLtMatmulDescriptorDestroy( const aclsparseLtMatmulDescriptor_t *matmulDescr);