CANN/ops-blas strttp算子
strttp 算子【免费下载链接】ops-blas本项目是CANN提供的高性能线性代数计算以及轻量化GEMM调用算子库。项目地址: https://gitcode.com/cann/ops-blas功能描述三角常规格式转压缩格式将常规二维三角矩阵压缩为 packed format 存储。uplo ACLBLAS_LOWER将A的下三角复制到APuplo ACLBLAS_UPPER将A的上三角复制到AP目录结构blas/trttp/ ├── README.md # 说明文档 └── arch35/ # 算子实现trttp操作族, strttpfloat32, arch35ascend950 ├── strttp_host.cpp ├── strttp_kernel.cpp └── strttp_tiling_data.h test/trttp/ # 测试代码 ├── CMakeLists.txt ├── strttp_param.h ├── strttp_golden.h └── arch35/ ├── strttp_npu_wrapper.h ├── strttp_test.cpp └── strttp_test.csv接口定义aclblasStatus_t aclblasStrttp(aclblasHandle_t handle, aclblasFillMode_t uplo, int n, const float *A, int lda, float *AP);参数说明参数类型说明handleaclblasHandle_tACL 流句柄uploaclblasFillMode_tACLBLAS_LOWER(122) 或ACLBLAS_UPPER(121)nint方阵维数Aconst float*常规三角矩阵device维度 lda x nldaintA 的 leading dimensionlda max(1, n)APfloat*输出压缩格式device长度 n*(n1)/2编译运行bash build.sh --opsstrttp --run --socascend950测试说明ST 采用 GTest 参数化 strttp_test.csvBlasTestStrttpParamfixture精度模式为EXACT。注意makeBlasArray的 size 参数为int64_t调用时需显式转换makeBlasArray(static_castint64_t(p.lda) * p.n, p.a)确保负值 n 正确返回空数组。【免费下载链接】ops-blas本项目是CANN提供的高性能线性代数计算以及轻量化GEMM调用算子库。项目地址: https://gitcode.com/cann/ops-blas创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考