Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build

- name: Upload build artifacts
if: matrix.node-version == '20.x'
uses: actions/upload-artifact@v4
with:
name: build-output
path: doc_build/
retention-days: 7
5 changes: 5 additions & 0 deletions docs/en/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
[
{
"text": "technical documentation",
"link": "../zh/technical/1-Overview",
"activeMatch": "../zh/technical/1-Overview"
},
{
"text": "Announcement",
"link": "/announcement/",
Expand Down
Empty file added docs/public/technical/AI/AI.txt
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
Binary file added docs/public/technical/Other/oh_my_zsh/image.png
5 changes: 5 additions & 0 deletions docs/zh/_meta.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
[
{
"text": "技术文档",
"link": "../zh/technical/1-Overview",
"activeMatch": "../zh/technical/1-Overview"
},
{
"text": "社团公告",
"link": "/announcement/",
Expand Down
71 changes: 71 additions & 0 deletions docs/zh/technical/1-Overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# 技术文档

## 欢迎

📢 欢迎来到我们的技术文档目录!这里包含了关于 Linux 运维、音视频开发、Docker 环境配置等方面的详细技术文档,帮助你更好地理解、使用和贡献我们的技术资源。

## 目录

- [技术文档](#技术文档)
- [欢迎](#欢迎)
- [目录](#目录)
- [Linux 运维](#linux-运维)
- [音视频开发](#音视频开发)
- [Docker 环境配置](#docker-环境配置)
- [数据库](#数据库)
- [环境配置](#环境配置)
- [基础知识](#基础知识)
- [其他主题](#其他主题)
- [贡献指南](#贡献指南)

## Linux 运维

- [基本的 Linux 命令行操作](./Basic-knowlegde/Linux_command.md)
- [conda环境名称无法显示的解决方案](./Back-end/C/Conda.md)
- [Linux_grub启动](./Operation-and-Maintenance/Linux_grub.md)
- [smb文件传输协议的使用](./Operation-and-Maintenance/linux_smb.md)
- [三种shell的介绍](./Operation-and-Maintenance/shell.md)
- [用户权限问题](./Operation-and-Maintenance/user_rights.md)
- [ssh连接超时问题](./Operation-and-Maintenance/ssh_connect.md)
- [root远程登录](./Operation-and-Maintenance/Linux_ssh_root.md)

## 音视频开发

- [音频处理入门指南](https://gitee.com/TSGU-OSC/ffmpeg_learn)
- [视频编码和解码原理](https://gitee.com/TSGU-OSC/ffmpeg_learn/tree/master/command/codec)

## Docker 环境配置

- [使用 Docker 部署和管理应用](./Operation-and-Maintenance/CentOS-Stream-9-Docker.md)

## 数据库

- [Mysql环境配置](./Back-end/Java/MysqlMarkdown.md)

<!-- - [Redis环境配置](./Back-end/Java/RedisMarkdown/redisStudy.md) -->

- [Minio环境配置](./Back-end/Java/MinioMarkdown.md)

## 环境配置

- [vs code C开发环境搭建](./Back-end/C/C_Environment_Configuration/1-README.md)

- [Conda及python的环境配置](./Back-end/C/Conda_Environment.md)

- [Node.js环境配置](./Front-end/nodeJsMarkdown.md)

## 基础知识

- [总览](./Basic-knowlegde/1-Overview.md)

## 其他主题

- [MC服务器搭建](./Operation-and-Maintenance/mc_server.md)
- [Stable Diffusion本地Docker快速部署](./AI/Stable_Diffusion.md)

## 贡献指南

🌟 如果你有兴趣贡献文档或发现了错误,请参考我们的 [贡献指南](./2-Contributing.md)。


---
60 changes: 60 additions & 0 deletions docs/zh/technical/2-Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 贡献指南

欢迎您对我们的开源技术文档仓库做出贡献!我们非常感谢您的帮助,以下是一些建议和指导,以确保贡献的顺利进行。

## 贡献方式

您可以通过以下方式贡献:

1. **报告问题**:发现了文档中的错误或有改进的地方?请创建一个 Issue 来报告问题。

2. **提出改进建议**:如果您有关于文档结构、内容或样式的建议,请通过 Issue 提出您的想法。

3. **提交文档**:如果您有自己的技术文档并希望分享,欢迎提交 Pull Request。

## 报告问题和提出建议

1. 在我们的 [Issues 页面](https://gitee.com/TSGU-OSC/OSC_main/issues) 创建一个新的 Issue。

2. 选择相应的标签,例如“bug”或“enhancement”。

3. 提供清晰而详细的说明,包括问题的复现步骤(如果是报告问题)或您的建议。

## 提交文档

1. Fork 这个仓库并在本地克隆它:

```bash
git clone https://github.com/your-username/your-repo-name.git
```
2. 在此目录下新建目录,以内容命名
```bash
cd ./blog
mkdir your_directory
```
3. 进入您刚刚创建的目录,创建并编辑您的markdown文档
```bash
cd ./your_directory
touch README.md
vim README.md
```
4. 提交您的修改
```bash
git add .
git commit -m "Add/modify your-documentation-file.md"
```
5. 推送到您的Fork
```bash
git push origin feature/your-feature
```
6. 创建一个 Pull Request(PR):

- 到您的 Fork 页面,点击 "New Pull Request"。
- 选择要将您的修改合并到的目标分支。
- 提供清晰而简洁的 PR 描述。
7. 我们将审查您的 PR,并在需要时提出建议或请求修改。

## 注意事项
- 请确保您的文档使用正确的 Markdown 语法,并注意格式的一致性。
- 如果您贡献的是新的主题,请在目录中添加相应的链接。
- 我们鼓励包含适当的图片、图表等以提高文档的可读性。如有图片请将图片放入image目录下。
63 changes: 63 additions & 0 deletions docs/zh/technical/AI/Buddy-MLIR_introduce.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Buddy-MLIR 技术解析与应用研究指南

Buddy-MLIR 是一个旨在简化基于 MLIR(Multi-Level Intermediate Representation)构建人工智能(AI)编译器和工具开发的开源项目。它通过提供更易于上手的工具、模块化组件和清晰的端到端流程,作为开发者的“伙伴”,帮助他们克服原生 MLIR 生态中复杂的学习障碍。


## 一、 Buddy-MLIR 的核心优点(为什么选择它?)

Buddy-MLIR 的价值在于它在继承 MLIR 强大功能的同时,极大地提升了开发者的效率和体验。

1. **极大地降低了 MLIR 的学习曲线**
- 清晰的端到端示例:提供从模型导入到代码生成的完整、可运行的示例。这些示例是初学者快速理解 MLIR 编译器工作流的最佳实践。
- 高层抽象的工具链:封装了原生 MLIR 的复杂性,提供更简洁的 API 和工具链,使开发者无需成为 MLIR 专家也能快速构建功能。

2. **增强了模块化和可复用性**
- 解耦的组件:架构设计高度模块化。其运行时(Runtime)、驱动程序和特定的优化 Pass 都是独立的组件,方便开发者抽取并集成到其他 AI 编译器或工具链中。
- 易于定制的后端:开发者可以基于 Buddy-MLIR 的基础架构,轻松地添加或修改针对特定硬件(如自定义加速器、FPGA 等)的后端支持。

3. **提供完整的 AI 编译流程和运行时支持**
- 全流程覆盖:区别于只关注某个转换阶段的项目,Buddy-MLIR 展示了一个从主流 AI 框架模型(如 ONNX/TensorFlow)输入,经过多级优化,直到生成可执行目标代码的完整、可部署的流程。
- 集成的运行时:包含一个轻量级、可定制的 C++ 运行时库,负责关键的部署任务,例如内存管理、权重加载和函数调用。

4. **聚焦于 AI 领域的性能优化**
AI 友好型 Pass:提供针对 AI 模型性能的关键优化 Pass,包括:
- 算子融合 (Operator Fusion):减少内存访问和内核启动开销。
- 内存布局优化:提高数据局部性(Data Locality)。
- 高性能循环转换:利用循环分块、循环展开等技术提升效率。


## 二、 模型优化和编译研究的使用指南

要开始使用 Buddy-MLIR 进行模型优化和编译研究,建议按以下三个阶段循序渐进地深入。


### 阶段一:环境搭建与前端(模型导入)

| 步骤 | 目标 | Buddy-MLIR 中的实践方法 | 关键研究点 |
|------|------|-------------------------|------------|
| 1. 环境搭建 | 编译并运行 Buddy-MLIR 项目。 | 遵循项目文档,编译 C++ 核心库和 Python 绑定。 | 熟悉 MLIR 编译器依赖和构建流程(CMake)。 |
| 2. 模型导入 | 将外部模型转换为 MLIR IR。 | 使用 Buddy-MLIR 提供的工具链或示例,将 ONNX/TensorFlow 模型转换为高层 MLIR 方言(如 TOSA 或 MHLO)。 | 研究算子映射的正确性,确保前端转换过程中的语义保真度。 |
| 3. 基础运行 | 验证 IR 转换的正确性。 | 运行未经优化的模型,验证其在目标硬件上的功能正确性。 | 理解 Buddy-MLIR 的**运行时(Runtime)** 机制及其在数据管理中的作用。 |


### 阶段二:中层优化与转换(性能核心)

这是利用 Buddy-MLIR 进行性能优化的核心研究阶段。

| 步骤 | 目标 | Buddy-MLIR 中的实践方法 | 关键研究方向 |
|------|------|-------------------------|--------------|
| 1. 算子融合 (Fusion) | 减少开销,提升性能。 | 观察和修改 Buddy-MLIR 中针对 Linalg 或特定 AI 算子设计的融合 Pass。 | 设计更高效的融合策略,以适应不同的模型结构(如 RNN、Transformer)和目标硬件特性。 |
| 2. 内存布局优化 | 提高数据局部性。 | 实验改变张量内存布局(如 NCHW $\rightarrow$ NHWC)的 Pass。 | 研究最优内存布局的自动选择机制,以及如何在多级缓存(L1/L2)的硬件上实现最佳的缓存命中率。 |
| 3. 高层转换 | 将 AI 语义降低到 Linalg 方言。 | 学习 TOSA/MHLO 等高层方言如何通过 Pass 转换到 linalg 方言。 | 专注于图优化技术,如常量折叠和图结构重写,以简化后续的编译工作。 |
| 4. 新优化 Pass 开发 | 实现自己的创新优化想法。 | 以 Buddy-MLIR 的现有 Pass 为模板,学习利用 MLIR 的 PassManager 和 PatternRewriter 来开发新的 Pass。 | 探索基于 MLIR 的硬件无关优化和形状推导。 |


### 阶段三:降低与代码生成(硬件适配)

此阶段重点是将优化后的 IR 转换为目标硬件可执行的代码。

| 步骤 | 目标 | Buddy-MLIR 中的实践方法 | 关键研究方向 |
|------|------|-------------------------|--------------|
| 1. 逐步降低 | 将 Linalg 降级到 Affine/SCF/Vector。 | 观察 Pass 流水线如何将 Linalg 算子逐步转换为循环 (affine/scf) 和 SIMD 指令 (vector)。 | 研究循环转换(如分块、剥离、展开)的策略及其对性能的影响,并探索自动代码生成工具(如 mlir-opt)的使用。 |
| 2. 向量化与并行化 | 利用硬件的 SIMD/多核能力。 | 检查 IR 如何降低到 Vector 方言,以及如何利用 GPU 或 LLVM 方言进行并行化。 | 专注于自动向量化的挑战,设计更智能的 Pass 来识别和转换适合并行执行的模式。 |
| 3. 新硬件后端集成 | 适配自定义或新的硬件架构。 | 在 Buddy-MLIR 的 JIT/AOT 流程中,扩展代码生成后端,以支持目标硬件所需的指令集或运行时 API 调用。 | 研究如何为新的**特定领域架构(DSA)** 定制 MLIR 方言和降低策略,实现高效的编译。 |s
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 在vscode中如何配置TableGen and MLIR

## 第一步:
如图所示,在vscode中寻找tablegen相关插件
![Alt text](../../../public/technical/AI/AI_vscode_TableGen_1.png)
下载图中用红框圈住的插件后进入`ctrl+,`快捷键进入设置界面,输入`tablegen-lsp.includePaths`
## 第二步:
![Alt text](../../../public/technical/AI/AI_vscode_TableGen_2.png)
如图所示,初次进入这里面应该是空白的,我们点击添加项,按照图中的路径找到你的llvm中`build/mlir/llvm`中的include把绝对路径粘贴上去\
⚠️请注意,如果llvm项目是你所开发项目的依赖,那么请在`Include Path`中添加你项目中`include`的路径,以确保它能够找到你的`.td等文件`
# 第三步:
最后一步按 `Ctrl+Shift+P` 运行 Developer: Reload Window,这样就能将你的配置保存起来了。你的tablegen就可以进行定义跳转等功能了

Loading