Nsight System & Nsight Compute
有关 Nsight System 和 Nsight Compute 的介绍与常用命令总结。 Introduction 核心定位:一个看“森林”,一个看“树木” 这是理解这两个工具最核心的一点。 Nsight Systems (nsys): 系统级性能分析器,负责看“森林”。它监控您的整个应用程序,告诉您CPU和GPU之间是如何交互的,时间都花在了哪些大的模块上(例如:哪个CUDA Kernel耗时最长、数据拷贝花了多久)。 Nsight Compute (ncu): Kernel级性能分析器,负责看“树木”。当nsys帮您找到最值得优化的那棵“树”(即耗时最长的Kernel)后,ncu会深入到这棵树的内部,详细分析它的每一个细节(例如:它的计算单元利用率如何?内存访问效率高不高?具体是哪一行代码拖慢了速度?)。 一个生动的比喻: nsys 就像城市交通地图,它告诉您哪条主干道(Kernel)发生了拥堵。 ncu 就像汽车引擎诊断仪,它负责分析堵在路上的那辆车,告诉您它的引擎、油路、电路具体哪里出了问题。 对比总结表 方面 (Aspect) NVIDIA...
Reading Notes for vLLM
This is the reading note for the Efficient Memory Management for Large Language Model Serving with PagedAttention. vLLM is one of the most popular open-source inference serving systems nowadays. Basically, there are two mainstream inference serving systems: one is vLLM, and the other is SGLang. Summary Abstract & Introduction & Background This is a paper about the vLLM, a serving system for inference. The most important idea they propose is PagedAttention. vLLM with the...
Resource I Have for MLSys
This is like a guidance page for the resources I know for MLSys, I’ll give a brief introduction to each of them and list the link here. The resources will contain books, papers, and notes I wrote. Books AI System This book is more about the hardware. I think it’s a little bit like for ECE students. I haven’t read it all yet, but I think you can find some useful topics here, such as the introduction to Nvidia GPUs, the Tensor Core, stream multiprocessors, and how the GPU actually do to...
Reading Notes for Orca
This is the reading notes for the ORCA: A Distributed Serving System for Transformer-Based Generative Models. This is an OSDI conference paper from 2022. Almost all the authors come from South Korea, and actually, this is the first time I have read papers written by Koreans. Summary Abstract & Introduction & Background The paper is focused on the inference serving, they point out that the existing system is not good enough for transformer-based models. So, they propose a new method...
Transformer
本篇blog讲了transformer里的几个比较重要的概念,attention,multi-head attention, self-attention & cross-attention 以及 encoder & decoder。 单头Attention最经典公式: Attention(Q,K,V)=softmax(QKTdk)V\text{Attention}(Q, K, V) = \text{softmax}\left(\frac{QK^T}{\sqrt{d_k}}\right)V Attention(Q,K,V)=softmax(dkQKT)V 多头Attention(Transformer中常用): MultiHead(Q,K,V)=Concat(softmax(QWiQ(KWiK)Tdk)VWiV)i=1hWO\text{MultiHead}(Q,K,V) =...
Linux 系统硬件信息检查命令总结
本文档总结了在 Linux 系统中查看各种硬件组件信息的常用命令。这些命令通常需要在终端中执行。 CPU 信息 🧠 lscpu: 显示 CPU 架构、核心数、线程数、速度、缓存等详细信息。 lscpu cat /proc/cpuinfo: 查看更详细的 CPU 底层信息,每个逻辑核心都会有条目。 cat /proc/cpuinfo 通过 dmidecode 查看处理器详情 (通常需要 sudo): sudo dmidecode -t processor 内存 (RAM) 信息 💾 free -h: 以人类可读格式显示总内存、已用、可用内存及交换空间情况。 free -h cat /proc/meminfo: 查看详细的内存使用和内核统计信息。 cat /proc/meminfo sudo dmidecode -t memory 或 sudo dmidecode -t 17: 查看每个物理内存条的详细信息,如制造商、型号、序列号、容量、速度、类型 (DDR4)、Rank、是否支持 ECC 等。 sudo dmidecode -t...
GitHub 实现多 page site(Hexo框架)
如果你是用通过网上搜到的一些教程去 GitHub 上实现你自己的个人主页的话,你可能会发现大家都会强调你把你的 GitHub repo 的名字命名为 username.github.io。但实际上你可以在任意把任意的 repo 设置成你的项目主页,网上你可以搜到几个相关 GitHub 设置多 page 的帖子,随便放在这里一个,感兴趣可以去再看看。 总之,如果你只想把你基于 Hexo 的 blog deploy 到 GitHub 的话,很简单,只需要改两个 config。 在你的 _config.yml 文件里,把 url 改成 https://<username>.github.io/<reponame>。然后再加一个 root , 这个填成 /<reponame>/ 。其他就正常配置就好了。 我唯一遇到的,可能会出问题的地方,是在那个 page setting 那里。 这里可能不能用 GitHub action,不过我也不确定,但我之前调到 GitHub action 的时候会出问题。如果你发现你 deploy 到 github...
Coding Diary(2025-5-19)
感觉我这个也不算是 coding diary,主要是就是技术方面的日志,好久没有写代码了。 这两天把服务器搞好了,虽然非常离谱的卖家已读不回,但毕竟啥都有,都能开机,就把我的 2080 ti 22 G 显卡直接装上开机了,声音是真的大,不得不说。第一次装显卡,真是小心翼翼的,一点都不敢乱动,而且还发现金手指背面倒数第二根少一块,真是吓死我了,我心思我这么轻的插拔都能有问题吗,还好搜完之后发现就是这么设计的。 ubuntu server 的安装也是非常简单,总体来讲都是一样的,就是把系统烧到一个 U 盘里,然后进 bios,选择启动盘,就 ok 了,整个过程都是比较 smooth 的。然后有一堆设置,就问 GPT 就完事了。 今天非常惨的一点是,我整 NAS,然后网太慢,就喊联通的来整网络,结果路由器整没了一个,相当于网关换了一个,直接连不上了,笑死了,然后我之前还整的静态内网...