9 Star 14 Fork 0

Tecorigin / Teco-AL

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
BSD-3-Clause

Teco-AL

仓库简介

Teco-AL(Teco-Accelerated Libraries,太初加速库)提供了统一的算子库模型,用户可以基于ual计算层,使用SDAA C编程模型实现灵活多样的算子接口。文档说明可以查阅Teco-AL算子开发指南

环境依赖

Teco-AL的运行依赖以下组件,可以查阅环境安装手册进行对应工具安装。

  • TecoDriver v1.0.0
  • TecoToolKit v1.0.0

编译运行

Teco-AL仓库采用CMake统一构建,推荐用户使用source env.sh配置仓库规范,然后使用./build.sh脚本构建。

以tecoalAddTensor()算子运行为例,编译、运行、测试命令示例如下:

source env.sh
bash build.sh --test on
cd build/bin
./test_add_tensor

出现以下结果,则表示运行成功:

...
C success rate 1.00

出现以下结果,则表示运行失败,需要添加算法分支指定数字,通常为0~6,如./test_hgemm 6

...
The executable file parameter is incorrect

编程规范

Teco-AL仓库为C++代码仓库,采用C++11标准,统一使用谷歌的C++风格,推荐使用仓库下tools/format2google工具进行自动化调整。

目录结构

Teco-AL仓库通过将不同的组件和功能模块化,让项目的可维护性和可扩展性得到了增强。具体目录如下:

.
├── README.md                 # 项目的README文件,包含项目介绍、使用方法等
├── build.sh                  # 构建脚本,用于编译项目
├── CMakeLists.txt            # CMake配置文件,指定如何编译项目和链接依赖
├── CPPLINT.cfg               # C++代码风格检查的配置文件
├── env.sh                    # 环境设置脚本,设置编译和运行项目所需的环境变量
├── interface                 # 接口定义目录
│   ├── common                # 存放一些通用的接口定义或工具
│   ├── include               # 公共头文件目录
│   └── ops                   # 存放各算子的接口定义,调用和组合ual层封装好的OP类接口
│       ├── add_tensor.cpp
│       └── other_ops.cpp
├── samples                   # 存放测试样例代码
│   ├── add_tensor
│   │   └── test_add_tensor.cpp
│   └── other_ops
├── tools                     # 存放项目相关的工具脚本或程序
└── ual                       # 实际计算层,将各算子封装为单独的OP对象,在OP中集成分支派发、__global__属性的接口
    ├── args                  # 存放各算子需要的参数结构定义
    │   ├── add_tensor_args.h
    │   └── other_ops.h
    ├── com                   # 通用组件或工具
    ├── ops                   # 算子实现与分支派发目录
    │   ├── add_tensor
    │   │   ├── add_tensor.hpp
    │   │   ├── find_add_tensor.cpp
    │   │   └── find_add_tensor.h
    │   └── other_ops
    └── kernel                # 设备端核心计算逻辑的实现代码
        ├── add_tensor
        │   ├── add_tensor_ft16.scpp
        │   └── add_tensor.h
        └── other_ops
BSD 3- Clause License Copyright (c) 2024, Tecorigin Co., Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

Teco-AL基于SDAA C编程模型,提供了灵活多样的加速库算子实现。 展开 收起
C++ 等 5 种语言
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/tecorigin/teco-al.git
git@gitee.com:tecorigin/teco-al.git
tecorigin
teco-al
Teco-AL
develop

搜索帮助