# AISystem_lab3 **Repository Path**: pingpig_200/aisystem_lab3 ## Basic Information - **Project Name**: AISystem_lab3 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2025-04-16 - **Last Updated**: 2025-04-20 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AISystem_lab3 智能计算系统实验3代码仓库 ## 成员分工 洪书颖:基础实验代码、进阶实验代码编写,撰写实验报告主体 张锡宇:基础实验代码编写与测试,撰写自主学习任务1 牛沐曦:实验代码测试,撰写自主学习任务2 高歌阳:基础实验代码编写,撰写进阶实验任务1 ## 分支说明 master:基础实验较优版代码 float2half:进阶实验任务3代码 nchw2nhwc:进阶实验任务2代码 ## 运行说明 运行之前请检查scheduler.cu中的代码是否为预期测试的算子,如下所示的代码测试的是进阶实验任务2的v2版本代码。 ```cuda convPlanType conv_plans[7] = { {"testcase_1", impl_gemm_init, nhwc_gemm_v2_run, impl_gemm_exit}, {"testcase_2", impl_gemm_init, nhwc_gemm_v2_run, impl_gemm_exit}, {"testcase_3", impl_gemm_init, nhwc_gemm_v2_run, impl_gemm_exit}, {"testcase_4", impl_gemm_init, nhwc_gemm_v2_run, impl_gemm_exit}, {"testcase_5", impl_gemm_init, nhwc_gemm_v2_run, impl_gemm_exit}, {"testcase_6", impl_gemm_init, nhwc_gemm_v2_run, impl_gemm_exit}, {"umimplement", impl_gemm_init, nhwc_gemm_v2_run, impl_gemm_exit}, }; ``` 输入下面指令进行编译。 ```sh make ``` 输入下面指令进行测试,应该可以得到如result中类似的结果。 ```sh make comomit ``` ## 代码结构 ### master ```sh . ├── commit.sh ├── conv2d ├── include │   ├── conv2d.h │   └── verfiy.h ├── Makefile ├── README.md ├── result │   ├── 基础实验4090 │   │   ├── v0-1.png │   │   ├── v0-2.png │   │   ├── v1-1.png │   │   ├── v1-2.png │   │   ├── v2-1.png │   │   └── v2-2.png │   ├── 基础实验DCU │   │   ├── v0-1.png │   │   ├── v0-2.png │   │   ├── v1-1.png │   │   ├── v1-2.png │   │   ├── v2-1.png │   │   └── v2-2.png │   ├── 基础实验(机房) │   │   ├── v0-1.png │   │   ├── v0-2.png │   │   ├── v1-1.png │   │   ├── v1-2.png │   │   ├── v2-1.png │   │   └── v2-2.png │   ├── 进阶实验4090 │   │   ├── half-v0-1.png │   │   ├── half-v0-2.png │   │   ├── half-v1-1.png │   │   ├── half-v1-2.png │   │   ├── half-v2-1.png │   │   ├── half-v2-2.png │   │   ├── nhwc-v0-1.png │   │   ├── nhwc-v0-2.png │   │   ├── nhwc-v1-1.png │   │   ├── nhwc-v1-2.png │   │   ├── nhwc-v2-1.png │   │   └── nhwc-v2-2.png │   └── 进阶实验DCU │   ├── half-v0-1.png │   ├── half-v0-2.png │   ├── half-v1-1.png │   ├── half-v1-2.png │   ├── half-v2-1.png │   ├── half-v2-2.png │   ├── nhwc-v0-1.png │   ├── nhwc-v0-2.png │   ├── nhwc-v1-1.png │   ├── nhwc-v1-2.png │   ├── nhwc-v2-1.png │   └── nhwc-v2-2.png ├── src │   ├── conv2d.cu │   ├── c_style_implicit_gemm.cpp │   ├── directConvolution.cu │   ├── implicit_gemm_v0.cu │   ├── implicit_gemm_v1.cu │   ├── implicit_gemm_v2.cu │   ├── main.cu │   ├── scheduler.cu │   └── test └── test.sh 8 directories, 58 files ``` ### float2half ```sh . ├── commit.sh ├── include │   ├── conv2d.h │   └── verfiy.h ├── Makefile ├── src │   ├── conv2d.cu │   ├── c_style_implicit_gemm.cpp │   ├── main.cu │   ├── NHWC_c_style_gemm.cpp │   ├── NHWC_mma_gemm_v0.cu │   ├── NHWC_mma_gemm_v1.cu │   ├── NHWC_mma_gemm_v2.cu │   ├── scheduler.cu │   └── test └── test.sh 2 directories, 14 files ``` ### nchw2nhwc ``` . ├── commit.sh ├── conv2d ├── include │   ├── conv2d.h │   └── verfiy.h ├── Makefile ├── src │   ├── conv2d.cu │   ├── c_style_implicit_gemm.cpp │   ├── directConvolution.cu │   ├── implicit_gemm_v0.cu │   ├── implicit_gemm_v1.cu │   ├── implicit_gemm_v2.cu │   ├── main.cu │   ├── NHWC_c_style_gemm.cpp │   ├── NHWC_gemm_v0.cu │   ├── NHWC_gemm_v1.cu │   ├── NHWC_gemm_v2.cu │   ├── scheduler.cu │   └── test └── test.sh 2 directories, 19 files ```