摘要: CUDA Bank Conflict 基础背景:Shared Memory 共享内存结构 GPU 的 shared memory(共享内存) 被切分成多个bank(存储体),硬件上是多组独立存储器,可以并行同时访问不同bank。 主流硬件: Kepler以后,Ampere以前:32个bank,每个b 阅读全文
posted @ 2026-08-13 23:34 judesongd 阅读(5) 评论(0) 推荐(0)
摘要: Shell 启动文件规范整理 一、POSIX / IEEE Std 1003.1(sh 系基线) POSIX 规定的 sh 启动仅 3 个加载点: 阶段 文件 登录 shell /etc/profile 登录 shell ~/.profile 非交互式 shell $ENV 指向的文件 注意:~/. 阅读全文
posted @ 2026-08-10 19:26 judesongd 阅读(2) 评论(0) 推荐(0)
摘要: mlir-tutorial ex7-convert Pass 部分源码分析 1. tablegen 文件 ex7-convert/include/toy/ToyPasses.td: #ifndef TOY_PASSES_TD #define TOY_PASSES_TD include "mlir/P 阅读全文
posted @ 2026-07-25 15:41 judesongd 阅读(6) 评论(0) 推荐(0)
摘要: class Pattern { enum class RootKind { Any, // 任意类型 OperationName, // 标记 op 的名字 InterfaceID, // 标记 op 具有某一组方法 TraitID // 标记 op 具有什么特性 }; public: ArrayR 阅读全文
posted @ 2026-07-20 14:03 judesongd 阅读(6) 评论(0) 推荐(0)
摘要: 万能引用是让函数同时接受左值(变量原始类型,引用)和右值(临时变量,std::move 返回值)作为引用形式的参数的一种方法。 这是一段来自 MLIR 项目的源代码,用于遍历 IR 对其执行操作: template <WalkOrder Order = WalkOrder::PostOrder, t 阅读全文
posted @ 2026-07-20 01:08 judesongd 阅读(7) 评论(0) 推荐(0)
摘要: 1. 什么是 CRTP Curiously Recurring Template Pattern。子类作为父类模板参数,父类用 static_cast<T*>(this) 调用子类方法,实现编译期多态。 2. 代码示例 #include <iostream> // 父类:模板参数 T 必须是继承它的 阅读全文
posted @ 2026-05-23 01:48 judesongd 阅读(8) 评论(0) 推荐(0)
摘要: 精度 尾数 指数 峰值算力 相对 FP32 适用场景 FP32 23bit 8bit ~19.5 TFLOPS 1× 通用计算、高精度需求 TF32 10bit 8bit ~156 TFLOPS 8× AI 训练 / 推理(默认) FP16 10bit 5bit ~312 TFLOPS 16× 极致 阅读全文
posted @ 2026-05-06 23:27 judesongd 阅读(35) 评论(0) 推荐(0)
摘要: 换源(ubuntu24): cp /etc/apt/sources.list.d/ubuntu.sources /etc/apt/sources.list.d/ubuntu.sources.bak sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu 阅读全文
posted @ 2026-05-06 00:50 judesongd 阅读(34) 评论(0) 推荐(0)
摘要: 0. 背景 tvm 0.24.dev0 + TinyLlama(LLama2 1.1B) 1. TinyLlama 模型架构定义 类 hg 的 config + model 模式,支持同一架构多个模型。 权重使用 hg 下载权重进行解析。 使用 tvm.relax.frontend.nn 搭建模型。 阅读全文
posted @ 2026-05-06 00:47 judesongd 阅读(21) 评论(0) 推荐(0)