[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-cfregly--ai-performance-engineering":3,"tool-cfregly--ai-performance-engineering":61},[4,18,28,37,45,53],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":24,"last_commit_at":25,"category_tags":26,"status":17},9989,"n8n","n8n-io\u002Fn8n","n8n 是一款面向技术团队的公平代码（fair-code）工作流自动化平台，旨在让用户在享受低代码快速构建便利的同时，保留编写自定义代码的灵活性。它主要解决了传统自动化工具要么过于封闭难以扩展、要么完全依赖手写代码效率低下的痛点，帮助用户轻松连接 400 多种应用与服务，实现复杂业务流程的自动化。\n\nn8n 特别适合开发者、工程师以及具备一定技术背景的业务人员使用。其核心亮点在于“按需编码”：既可以通过直观的可视化界面拖拽节点搭建流程，也能随时插入 JavaScript 或 Python 代码、调用 npm 包来处理复杂逻辑。此外，n8n 原生集成了基于 LangChain 的 AI 能力，支持用户利用自有数据和模型构建智能体工作流。在部署方面，n8n 提供极高的自由度，支持完全自托管以保障数据隐私和控制权，也提供云端服务选项。凭借活跃的社区生态和数百个现成模板，n8n 让构建强大且可控的自动化系统变得简单高效。",184740,2,"2026-04-19T23:22:26",[16,14,13,15,27],"插件",{"id":29,"name":30,"github_repo":31,"description_zh":32,"stars":33,"difficulty_score":10,"last_commit_at":34,"category_tags":35,"status":17},10095,"AutoGPT","Significant-Gravitas\u002FAutoGPT","AutoGPT 是一个旨在让每个人都能轻松使用和构建 AI 的强大平台，核心功能是帮助用户创建、部署和管理能够自动执行复杂任务的连续型 AI 智能体。它解决了传统 AI 应用中需要频繁人工干预、难以自动化长流程工作的痛点，让用户只需设定目标，AI 即可自主规划步骤、调用工具并持续运行直至完成任务。\n\n无论是开发者、研究人员，还是希望提升工作效率的普通用户，都能从 AutoGPT 中受益。开发者可利用其低代码界面快速定制专属智能体；研究人员能基于开源架构探索多智能体协作机制；而非技术背景用户也可直接选用预置的智能体模板，立即投入实际工作场景。\n\nAutoGPT 的技术亮点在于其模块化“积木式”工作流设计——用户通过连接功能块即可构建复杂逻辑，每个块负责单一动作，灵活且易于调试。同时，平台支持本地自托管与云端部署两种模式，兼顾数据隐私与使用便捷性。配合完善的文档和一键安装脚本，即使是初次接触的用户也能在几分钟内启动自己的第一个 AI 智能体。AutoGPT 正致力于降低 AI 应用门槛，让人人都能成为 AI 的创造者与受益者。",183572,"2026-04-20T04:47:55",[13,36,27,14,15],"语言模型",{"id":38,"name":39,"github_repo":40,"description_zh":41,"stars":42,"difficulty_score":10,"last_commit_at":43,"category_tags":44,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":46,"name":47,"github_repo":48,"description_zh":49,"stars":50,"difficulty_score":24,"last_commit_at":51,"category_tags":52,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",161692,"2026-04-20T11:33:57",[14,13,36],{"id":54,"name":55,"github_repo":56,"description_zh":57,"stars":58,"difficulty_score":24,"last_commit_at":59,"category_tags":60,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",109154,"2026-04-18T11:18:24",[14,15,13],{"id":62,"github_repo":63,"name":64,"description_en":65,"description_zh":66,"ai_summary_zh":66,"readme_en":67,"readme_zh":68,"quickstart_zh":69,"use_case_zh":70,"hero_image_url":71,"owner_login":72,"owner_name":73,"owner_avatar_url":74,"owner_bio":75,"owner_company":76,"owner_location":77,"owner_email":78,"owner_twitter":72,"owner_website":79,"owner_url":80,"languages":81,"stars":119,"forks":120,"last_commit_at":121,"license":122,"difficulty_score":123,"env_os":124,"env_gpu":125,"env_ram":126,"env_deps":127,"category_tags":140,"github_topics":65,"view_count":24,"oss_zip_url":65,"oss_zip_packed_at":65,"status":17,"created_at":141,"updated_at":142,"faqs":143,"releases":174},10216,"cfregly\u002Fai-performance-engineering","ai-performance-engineering",null,"ai-performance-engineering 是一套专为现代 AI 系统打造的性能工程代码库与资源集合，源自 O'Reilly 即将出版的同名技术著作。它旨在解决 AI 开发中常见的痛点：如何不再盲目追求算力峰值，而是通过精细化调优提升实际有效吞吐量（goodput），从而在训练和推理环节显著降低成本并提高效率。\n\n这套资源特别适合 AI\u002FML 工程师、系统架构师及平台团队使用。无论是需要优化大规模分布式训练，还是构建高吞吐的推理服务，用户都能从中找到实战方案。其核心技术亮点在于提供了一套“以剖析为先”的方法论，指导用户利用 Nsight 和 PyTorch Profiler 精准定位瓶颈；同时涵盖了从内存布局优化、PyTorch 与 Triton 编译器内核定制，到 vLLM、TensorRT-LLM 等前沿推理框架的高级技巧（如分页 KV 缓存、预填充与解码分离）。此外，它还包含大量针对 NVIDIA GPU 的 PyTorch 和 CUDA C++ 代码示例，以及一份涵盖 200 多项的检查清单，帮助团队在复杂系统中稳定复现性能增益，避免回归问题。","# AI Performance Engineering\n\n_**Update:** Are you interested in a hands-on course for this material?_\n\n_If so, fill out this [**form**](https:\u002F\u002Fdocs.google.com\u002Fforms\u002Fd\u002Fe\u002F1FAIpQLSf4TMDLsPcfuoLhaDktXu-hhKIGntQm550BY-ov6bRT_VMJhQ\u002Fviewform?usp=sharing&ouid=111382272947765737941) to express interest and be notified._\n\n## About This Repo\n\nAI Systems Performance Engineering code, tooling, and resources for the O'Reilly book covering GPU optimization, distributed training, inference scaling, and full-stack performance tuning for modern AI workloads.\n\n[**Chat**](https:\u002F\u002Fchatgpt.com\u002Fg\u002Fg-691a6b188d808191b16cdd2b7732cf11-ai-systems-performance-engineering) with this book directly!\n\nJust take me to the [**code**](code\u002F).\n\n[![O'Reilly Book](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcfregly_ai-performance-engineering_readme_92ad9c22ee23.png)](https:\u002F\u002Fwww.amazon.com\u002FSystems-Performance-Engineering-Optimizing-Algorithms\u002Fdp\u002FB0F47689K8\u002F)\n\n> **O'Reilly Book – November 2025**  \n> [Available on Amazon](https:\u002F\u002Fwww.amazon.com\u002FSystems-Performance-Engineering-Optimizing-Algorithms\u002Fdp\u002FB0F47689K8\u002F)\n\n### AI Systems Performance Engineering Book\nModern AI systems demand more than raw FLOPs—they need goodput‑driven, profile‑first engineering across hardware, software, and algorithms. This hands‑on guide shows how to turn GPUs, interconnects, and runtime stacks into efficient, reliable training and inference pipelines. \n\nYou’ll learn to diagnose real bottlenecks with Nsight and PyTorch profilers, squeeze bandwidth and memory, and use compiler stacks (PyTorch + OpenAI Triton) to craft high‑impact kernels. On the serving side, master high‑throughput inference with vLLM\u002FSGLang, TensorRT‑LLM, and NVIDIA Dynamo—including disaggregated prefill\u002Fdecode and paged KV cache—then scale across racks without blowing the budget.\n\nUsing a hands‑on, empirical methodology with case studies, profiling data, this book is useful for AI\u002FML engineers, systems engineers, researchers, and platform teams building or operating training\u002Finference at scale. The book contains thousands of lines of PyTorch and CUDA C++ code examples for modern NVIDIA GPUs.\n\n* Profile for goodput, not just utilization—use Nsight Systems\u002FCompute and the PyTorch profiler to find the real stall points. \n\n* Exploit memory & bandwidth—optimize layouts, caching, and data movement to feed the GPU continuously. \n\n* Tune with compilers—leverage the PyTorch compiler stack and Triton to generate high‑impact kernels without C++ boilerplate. \n\n* Scale training sanely—apply parallelism strategies (DP, FSDP, TP, PP, CP, and MoE) and overlap computation\u002Fcommunication to minimize bubbles. \n\n* Serve trillion parameter models efficiently—use vLLM, SGLang, TensorRT‑LLM and NVIDIA Dynamo with disaggregated prefill\u002Fdecode and KV‑cache movement.\n\n* Reduce cost per token—engineer for performance‑per‑watt and throughput per dollar, not just peak speed.\n\n* Adopt AI‑assisted optimization—let AI help synthesize and tune kernels as systems outgrow manual tweaking\n \n* Ship with confidence—apply the 200+ item [checklist](docs\u002Fappendix.md) to reproduce wins and prevent regressions across teams.\n\n### Author Bio\n\nChris Fregly is a performance engineer and AI product leader who has driven innovations at Netflix, Databricks, and Amazon Web Services (AWS). He has led performance‑focused engineering teams that built AI\u002FML products, scaled go‑to‑market initiatives, and reduced cost for large‑scale generative‑AI and analytics workloads. \n\nChris is the author of two other O’Reilly books: Data Science on AWS and Generative AI on AWS. He's also the creator of the O’Reilly course “High‑Performance AI in Production with NVIDIA GPUs\" and the DeepLearning.ai course \"Generative AI with Large-Language Models\" with Andrew Ng.\n\nHis work spans kernel‑level tuning, compiler‑driven acceleration, distributed training, and high‑throughput inference. Chris hosts a monthly meetup called [AI Performance Engineering](https:\u002F\u002Fwww.meetup.com\u002Fai-performance-engineering).\n\n### 200+ Item Performance [checklist](docs\u002Fappendix.md)\n\nThe book ships with a **200+ item performance [checklist](docs\u002Fappendix.md)** that captures field‑tested optimizations covering the entire lifecycle. You can apply these immediately:\n\n- ✅ Performance tuning mindset and cost optimization\n- ✅ Reproducibility and documentation best practices\n- ✅ System architecture and hardware planning\n- ✅ Operating system and driver optimizations\n- ✅ GPU programming and CUDA tuning\n- ✅ Distributed training and network optimization\n- ✅ Efficient inference and serving\n- ✅ Power and thermal management\n- ✅ Latest profiling tools and techniques\n- ✅ Architecture-specific optimizations\n\n### Links\n\n- **Book**: [AI Systems Performance Engineering on Amazon](https:\u002F\u002Fwww.amazon.com\u002FSystems-Performance-Engineering-Optimizing-Algorithms\u002Fdp\u002FB0F47689K8\u002F)\n- **Meetup**: [AI Performance Engineering](https:\u002F\u002Fwww.meetup.com\u002Fai-performance-engineering)\n- **YouTube**: [AI Performance Engineering Channel](https:\u002F\u002Fwww.youtube.com\u002F@AIPerformanceEngineering)\n\n> *Built in San Francisco for the AI performance engineering community*\n\n### Key Focus Areas\n\n- **GPU Architecture, PyTorch, CUDA, and OpenAI Triton Programming**\n- **Distributed Training & Inference**\n- **Memory Optimization & Profiling**\n- **PyTorch Performance Tuning**\n- **Multi-Node Scaling Strategies**\n\n## Book Chapters\n\n### Chapter 1: Introduction and AI System Overview\n\n- The AI Systems Performance Engineer\n- Benchmarking and Profiling\n- Scaling Distributed Training and Inference\n- Managing Resources Efficiently\n- Cross-Team Collaboration\n- Transparency and Reproducibility\n\n### Chapter 2: AI System Hardware Overview\n\n- The CPU and GPU \"Superchip\"\n- NVIDIA Grace CPU & Blackwell GPU\n- NVIDIA GPU Tensor Cores and Transformer Engine\n- Streaming Multiprocessors, Threads, and Warps\n- Ultra-Scale Networking\n- NVLink and NVSwitch\n- Multi-GPU Programming\n\n### Chapter 3: OS, Docker, and Kubernetes Tuning\n\n- Operating System Configuration\n- GPU Driver and Software Stack\n- NUMA Awareness and CPU Pinning\n- Container Runtime Optimizations\n- Kubernetes for Topology-Aware Orchestration\n- Memory Isolation and Resource Management\n\n### Chapter 4: Tuning Distributed Networking Communication\n\n- Overlapping Communication and Computation\n- NCCL for Distributed Multi-GPU Communication\n- Topology Awareness in NCCL\n- Distributed Data Parallel Strategies\n- NVIDIA Inference Transfer Library (NIXL)\n- In-Network SHARP Aggregation\n\n### Chapter 5: GPU-based Storage I\u002FO Optimizations\n\n- Fast Storage and Data Locality\n- NVIDIA GPUDirect Storage\n- Distributed, Parallel File Systems\n- Multi-Modal Data Processing with NVIDIA DALI\n- Creating High-Quality LLM Datasets\n\n### Chapter 6: GPU Architecture, CUDA Programming, and Maximizing Occupancy\n\n- Understanding GPU Architecture\n- Threads, Warps, Blocks, and Grids\n- CUDA Programming Refresher\n- Understanding GPU Memory Hierarchy\n- Maintaining High Occupancy and GPU Utilization\n- Roofline Model Analysis\n\n### Chapter 7: Profiling and Tuning GPU Memory Access Patterns\n\n- Coalesced vs. Uncoalesced Global Memory Access\n- Vectorized Memory Access\n- Tiling and Data Reuse Using Shared Memory\n- Warp Shuffle Intrinsics\n- Asynchronous Memory Prefetching\n\n### Chapter 8: Occupancy Tuning, Warp Efficiency, and Instruction-Level Parallelism\n\n- Profiling and Diagnosing GPU Bottlenecks\n- Nsight Systems and Compute Analysis\n- Tuning Occupancy\n- Improving Warp Execution Efficiency\n- Exposing Instruction-Level Parallelism\n\n### Chapter 9: Increasing CUDA Kernel Efficiency and Arithmetic Intensity\n\n- Multi-Level Micro-Tiling\n- Kernel Fusion\n- Mixed Precision and Tensor Cores\n- Using CUTLASS for Optimal Performance\n- Inline PTX and SASS Tuning\n\n### Chapter 10: Intra-Kernel Pipelining and Cooperative Thread Block Clusters\n\n- Intra-Kernel Pipelining Techniques\n- Warp-Specialized Producer-Consumer Model\n- Persistent Kernels and Megakernels\n- Thread Block Clusters and Distributed Shared Memory\n- Cooperative Groups\n\n### Chapter 11: Inter-Kernel Pipelining and CUDA Streams\n\n- Using Streams to Overlap Compute with Data Transfers\n- Stream-Ordered Memory Allocator\n- Fine-Grained Synchronization with Events\n- Zero-Overhead Launch with CUDA Graphs\n\n### Chapter 12: Dynamic and Device-Side Kernel Orchestration\n\n- Dynamic Scheduling with Atomic Work Queues\n- Batch Repeated Kernel Launches with CUDA Graphs\n- Dynamic Parallelism\n- Orchestrate Across Multiple GPUs with NVSHMEM\n\n### Chapter 13: Profiling, Tuning, and Scaling PyTorch\n\n- NVTX Markers and Profiling Tools\n- PyTorch Compiler (torch.compile)\n- Profiling and Tuning Memory in PyTorch\n- Scaling with PyTorch Distributed\n- Multi-GPU Profiling with HTA\n\n### Chapter 14: PyTorch Compiler, XLA, and OpenAI Triton Backends\n\n- PyTorch Compiler Deep Dive\n- Writing Custom Kernels with OpenAI Triton\n- PyTorch XLA Backend\n- Advanced Triton Kernel Implementations\n\n### Chapter 15: Multi-Node Inference Parallelism and Routing\n\n- Disaggregated Prefill and Decode Architecture\n- Parallelism Strategies for MoE Models\n- Speculative and Parallel Decoding Techniques\n- Dynamic Routing Strategies\n\n### Chapter 16: Profiling, Debugging, and Tuning Inference at Scale\n\n- Workflow for Profiling and Tuning Performance\n- Dynamic Request Batching and Scheduling\n- Systems-Level Optimizations\n- Quantization Approaches for Real-Time Inference\n- Application-Level Optimizations\n\n### Chapter 17: Scaling Disaggregated Prefill and Decode\n\n- Prefill-Decode Disaggregation Benefits\n- Prefill Workers Design\n- Decode Workers Design\n- Disaggregated Routing and Scheduling Policies\n- Scalability Considerations\n\n### Chapter 18: Advanced Prefill-Decode and KV Cache Tuning\n\n- Optimized Decode Kernels (FlashMLA, ThunderMLA, FlexDecoding)\n- Tuning KV Cache Utilization and Management\n- Heterogeneous Hardware and Parallelism Strategies\n- SLO-Aware Request Management\n\n### Chapter 19: Dynamic and Adaptive Inference Engine Optimizations\n\n- Adaptive Parallelism Strategies\n- Dynamic Precision Changes\n- Kernel Auto-Tuning\n- Reinforcement Learning Agents for Runtime Tuning\n- Adaptive Batching and Scheduling\n\n### Chapter 20: AI-Assisted Performance Optimizations\n\n- AlphaTensor AI-Discovered Algorithms\n- Automated GPU Kernel Optimizations\n- Self-Improving AI Agents\n- Scaling Toward Multi-Million GPU Clusters\n\n## Community Resources\n\nMonthly meetups with 100k+ members across 20+ cities:\n\n- [YouTube Channel](https:\u002F\u002Fwww.youtube.com\u002F@AIPerformanceEngineering)\n- [Meetup Group](https:\u002F\u002Fwww.meetup.com\u002Fai-performance-engineering)\n\nRecent sessions:\n\n- [Dynamic Adaptive RL Inference CUDA Kernel Tuning](resources\u002FDynamic_Adaptive_RL_Inference_CUDA_Kernel_Tuning.pdf)\n- [High Performance Agentic AI Inference Systems](resources\u002FHigh_Performance_Agentic_AI_Inference_Systems.pdf)\n- [PyTorch Model Optimization](resources\u002FPyTorch_Model_Optimization.pdf)\n\n### Monthly Meetup Summaries\n- **Feb 16, 2026** - [YouTube Coming Soon](https:\u002F\u002Fwww.youtube.com\u002F@AIPerformanceEngineering) & Slides: [NVFP4 Low Precision Numerics by Riccardo Mereu @ Verda](resources\u002FNVFP4_Low_Precision_Numerics_Verda.pdf)\n- **Jan 19, 2026** - [YouTube](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=o-etY6VLHZo) & Slides: [Optimizing_Data_Transfer_With_NVIDIA_Nsight_Systems_Profiler_by_Chaim_Rand](resources\u002FOptimizing_Data_Transfer_With_NVIDIA_Nsight_Systems_Profiler_by_Chaim_Rand.pdf)\n- **November 17, 2025** - [YouTube](https:\u002F\u002Fyoutu.be\u002F2EWDG_Dxjs8) & Slides: [SpeedOfLight_Inference_Modular_Nov_17_2025_Abdul_Dakkak](resources\u002FSpeedOfLight_Inference_Modular_Nov_17_2025_Abdul_Dakkak.pdf): Speed of Light Inference with NVIDIA and AMD GPUs and Modular Platform by Abdul Dakkak\n- **October 20, 2025** - [YouTube](https:\u002F\u002Fyoutu.be\u002Fd3ZLodGTlAo): AI-Powered GPU Kernel Optimization + Distributed PyTorch with nbdistributed\n- **September 15, 2025** – [YouTube](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=eLnHXL1xXfM): Dynamic Adaptive RL inference kernel tuning deep dive.\n- **August 18, 2025** – [YouTube](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=SBPlOUww57I): Multi-GPU orchestration strategies and Nsight profiling case studies.\n- **July 21, 2025** – [YouTube](https:\u002F\u002Fyoutu.be\u002FjaiMotxv8ck): FlashMLA, ThunderMLA, and FlexDecoding kernel walkthroughs with live Nsight Compute demos.\n- **June 16, 2025** – Slides: [High Performance Agentic AI Inference Systems](resources\u002FHigh_Performance_Agentic_AI_Inference_Systems.pdf) covering disaggregated inference routing.\n- **May 19, 2025** – [YouTube](https:\u002F\u002Fyoutu.be\u002FF8jJwI9xHTE) & [PyTorch Data Loader Optimization](resources\u002FPyTorch_Model_Optimization_Data_Loader.pdf): Torch.compile pipelines, data loader throughput tuning, and cross-architecture CUDA\u002FROCm kernels.\n- **April 21, 2025** – [YouTube](https:\u002F\u002Fyoutu.be\u002FXoZcY_fDUKA) & [AI Performance Engineering Meetup Slides](resources\u002FAI_Performance_Engineering_Meetup_Apr_21_2025.pdf): End-to-end GPU performance playbook plus the [PyTorch Model Optimization](resources\u002FPyTorch_Model_Optimization.pdf) workshop.\n\n## Contributing\n\nContributions are welcome! See `CONTRIBUTING.md` for guidelines on code, documentation, and performance improvements.\n\n## License\n\nApache 2.0 License – see `LICENSE` for details.\n","# AI 性能工程\n\n_**更新：** 您对本课程的实践操作感兴趣吗？_\n\n_如果是，请填写此[**表格**](https:\u002F\u002Fdocs.google.com\u002Fforms\u002Fd\u002Fe\u002F1FAIpQLSf4TMDLsPcfuoLhaDktXu-hhKIGntQm550BY-ov6bRT_VMJhQ\u002Fviewform?usp=sharing&ouid=111382272947765737941)，以表达您的兴趣并接收通知。_\n\n## 关于本仓库\n\nO'Reilly 出版的《AI 系统性能工程》一书的代码、工具和资源，涵盖 GPU 优化、分布式训练、推理扩展以及现代 AI 工作负载的全栈性能调优。\n\n直接与本书进行[**聊天**](https:\u002F\u002Fchatgpt.com\u002Fg\u002Fg-691a6b188d808191b16cdd2b7732cf11-ai-systems-performance-engineering)！\n\n直接前往[**代码**](code\u002F)。\n\n[![O'Reilly 图书](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcfregly_ai-performance-engineering_readme_92ad9c22ee23.png)](https:\u002F\u002Fwww.amazon.com\u002FSystems-Performance-Engineering-Optimizing-Algorithms\u002Fdp\u002FB0F47689K8\u002F)\n\n> **O'Reilly 图书 – 2025 年 11 月**  \n> [在亚马逊上购买](https:\u002F\u002Fwww.amazon.com\u002FSystems-Performance-Engineering-Optimizing-Algorithms\u002Fdp\u002FB0F47689K8\u002F)\n\n### AI 系统性能工程书籍\n现代 AI 系统需要的不仅仅是原始的 FLOPs——它们还需要以吞吐量为导向、以性能剖析为先的硬件、软件和算法全方位工程设计。这本实践指南展示了如何将 GPU、互连网络和运行时栈转化为高效、可靠的训练和推理流水线。\n\n您将学会使用 Nsight 和 PyTorch 性能分析器诊断真实的瓶颈，最大化带宽和内存利用率，并利用编译器堆栈（PyTorch + OpenAI Triton）编写高效的内核。在推理服务端，您将掌握使用 vLLM\u002FSGLang、TensorRT‑LLM 和 NVIDIA Dynamo 进行高吞吐量推理的技术，包括分离式预填充\u002F解码和分页 KV 缓存策略，从而在不超出预算的情况下跨机架扩展系统规模。\n\n本书采用基于案例研究和性能剖析数据的实证方法，适合从事大规模训练\u002F推理构建或运维的 AI\u002FML 工程师、系统工程师、研究人员以及平台团队。书中包含数千行针对现代 NVIDIA GPU 的 PyTorch 和 CUDA C++ 代码示例。\n\n* 以实际吞吐量为目标进行性能剖析，而不仅仅是 GPU 利用率——使用 Nsight Systems\u002FCompute 和 PyTorch 性能分析器找出真正的性能瓶颈点。\n\n* 充分利用内存和带宽——优化数据布局、缓存策略和数据传输，确保 GPU 能够持续获得数据供给。\n\n* 使用编译器进行调优——借助 PyTorch 编译器堆栈和 Triton 编写高效内核，无需繁琐的 C++ 代码。\n\n* 合理扩展训练规模——应用并行化策略（DP、FSDP、TP、PP、CP 和 MoE），并通过计算与通信的重叠来最小化空闲时间。\n\n* 高效服务万亿参数模型——使用 vLLM、SGLang、TensorRT‑LLM 和 NVIDIA Dynamo 实现分离式预填充\u002F解码及 KV 缓存管理。\n\n* 降低每 token 成本——追求性能功耗比和单位成本下的吞吐量，而非单纯追求峰值速度。\n\n* 采用 AI 辅助优化——当系统规模超出人工调优能力时，让 AI 帮助合成和调优内核。\n\n* 放心交付成果——遵循书中的 200 多项[检查清单](docs\u002Fappendix.md)，确保各团队能够复现优化成果并防止回归问题。\n\n### 作者简介\n\nChris Fregly 是一位性能工程师兼 AI 产品负责人，曾在 Netflix、Databricks 和亚马逊云科技 (AWS) 推动多项创新。他曾领导专注于性能的工程团队，打造 AI\u002FML 产品，规模化推进市场落地，并为大规模生成式 AI 和分析工作负载降低成本。\n\nChris 还是另外两本 O'Reilly 图书的作者：《AWS 上的数据科学》和《AWS 上的生成式 AI》。此外，他还创建了 O'Reilly 课程“使用 NVIDIA GPU 的生产级高性能 AI”以及 DeepLearning.ai 与吴恩达合作的课程“大型语言模型生成式 AI”。\n\n他的工作涉及内核级调优、编译器驱动加速、分布式训练和高吞吐量推理等多个领域。Chris 定期举办名为[AI 性能工程](https:\u002F\u002Fwww.meetup.com\u002Fai-performance-engineering)的每月聚会。\n\n### 200+ 项性能[检查清单](docs\u002Fappendix.md)\n\n本书附带一份包含 200 多项性能优化措施的[检查清单](docs\u002Fappendix.md)，这些措施均经过实战验证，覆盖整个生命周期。您可以立即应用：\n\n- ✅ 性能调优思维与成本优化\n- ✅ 可复现性和文档编写最佳实践\n- ✅ 系统架构与硬件规划\n- ✅ 操作系统和驱动程序优化\n- ✅ GPU 编程与 CUDA 调优\n- ✅ 分布式训练与网络优化\n- ✅ 高效推理与服务\n- ✅ 功耗与散热管理\n- ✅ 最新性能剖析工具与技术\n- ✅ 针对特定架构的优化\n\n### 相关链接\n\n- **图书**：[AI 系统性能工程 在亚马逊](https:\u002F\u002Fwww.amazon.com\u002FSystems-Performance-Engineering-Optimizing-Algorithms\u002Fdp\u002FB0F47689K8\u002F)\n- **聚会**：[AI 性能工程](https:\u002F\u002Fwww.meetup.com\u002Fai-performance-engineering)\n- **YouTube**：[AI 性能工程频道](https:\u002F\u002Fwww.youtube.com\u002F@AIPerformanceEngineering)\n\n> *专为 AI 性能工程社区在旧金山打造*\n\n### 核心关注点\n\n- GPU 架构、PyTorch、CUDA 和 OpenAI Triton 编程\n- 分布式训练与推理\n- 内存优化与性能剖析\n- PyTorch 性能调优\n- 多节点扩展策略\n\n## 书籍章节\n\n### 第 1 章：引言与 AI 系统概述\n\n- AI 系统性能工程师的角色\n- 基准测试与性能剖析\n- 扩展分布式训练与推理\n- 资源的高效管理\n- 跨团队协作\n- 透明度与可复现性\n\n### 第 2 章：AI 系统硬件概述\n\n- CPU 和 GPU 的“超级芯片”\n- NVIDIA Grace CPU 和 Blackwell GPU\n- NVIDIA GPU Tensor Cores 和 Transformer Engine\n- 流处理器、线程和 Warp\n- 超大规模网络\n- NVLink 和 NVSwitch\n- 多 GPU 编程\n\n### 第 3 章：操作系统、Docker 和 Kubernetes 调优\n\n- 操作系统的配置\n- GPU 驱动程序和软件栈\n- NUMA 感知与 CPU 绑定\n- 容器运行时优化\n- Kubernetes 的拓扑感知编排\n- 内存隔离和资源管理\n\n### 第 4 章：分布式网络通信调优\n\n- 通信与计算的重叠\n- NCCL 用于多 GPU 分布式通信\n- NCCL 中的拓扑感知\n- 分布式数据并行策略\n- NVIDIA 推理传输库 (NIXL)\n- 网络内 SHARP 聚合\n\n### 第 5 章：基于 GPU 的存储 I\u002FO 优化\n\n- 高速存储与数据局部性\n- NVIDIA GPUDirect Storage\n- 分布式并行文件系统\n- 使用 NVIDIA DALI 进行多模态数据处理\n- 构建高质量 LLM 数据集\n\n### 第 6 章：GPU 架构、CUDA 编程与最大化占用率\n\n- 理解 GPU 架构\n- 线程、Warp、块和网格\n- CUDA 编程回顾\n- 理解 GPU 内存层次结构\n- 保持高占用率和 GPU 利用率\n- Roofline 模型分析\n\n### 第7章：GPU内存访问模式的剖析与调优\n\n- 合并式与非合并式全局内存访问\n- 向量化内存访问\n- 使用共享内存进行分块与数据重用\n- Warp Shuffle内建函数\n- 异步内存预取\n\n### 第8章：占用率调优、Warp效率与指令级并行性\n\n- GPU瓶颈的剖析与诊断\n- Nsight Systems与计算分析\n- 调整占用率\n- 提高Warp执行效率\n- 发掘指令级并行性\n\n### 第9章：提升CUDA核函数效率与算术强度\n\n- 多级微分块\n- 核函数融合\n- 混合精度与Tensor Core\n- 使用CUTLASS实现最佳性能\n- 内联PTX与SASS调优\n\n### 第10章：核内流水线与协作线程块集群\n\n- 核内流水线技术\n- Warp专用的生产者-消费者模型\n- 持续运行的核函数与巨核函数\n- 线程块集群与分布式共享内存\n- 协作组\n\n### 第11章：核间流水线与CUDA流\n\n- 利用流重叠计算与数据传输\n- 流顺序内存分配器\n- 基于事件的细粒度同步\n- 使用CUDA图实现零开销启动\n\n### 第12章：动态与设备端核函数编排\n\n- 基于原子工作队列的动态调度\n- 使用CUDA图批量重复启动核函数\n- 动态并行性\n- 通过NVSHMEM在多GPU间进行编排\n\n### 第13章：PyTorch的剖析、调优与扩展\n\n- NVTX标记与剖析工具\n- PyTorch编译器（torch.compile）\n- PyTorch中内存的剖析与调优\n- 使用PyTorch Distributed进行扩展\n- 使用HTA进行多GPU剖析\n\n### 第14章：PyTorch编译器、XLA与OpenAI Triton后端\n\n- PyTorch编译器深度解析\n- 使用OpenAI Triton编写自定义核函数\n- PyTorch XLA后端\n- 高级Triton核函数实现\n\n### 第15章：多节点推理并行化与路由\n\n- 分离式预填充与解码架构\n- MoE模型的并行化策略\n- 推测性与并行解码技术\n- 动态路由策略\n\n### 第16章：大规模推理的剖析、调试与调优\n\n- 性能剖析与调优的工作流程\n- 动态请求批处理与调度\n- 系统级优化\n- 用于实时推理的量化方法\n- 应用层优化\n\n### 第17章：扩展分离式预填充与解码\n\n- 预填充-解码分离的优势\n- 预填充工作者设计\n- 解码工作者设计\n- 分离式的路由与调度策略\n- 可扩展性考量\n\n### 第18章：高级预填充-解码及KV缓存调优\n\n- 优化的解码核函数（FlashMLA、ThunderMLA、FlexDecoding）\n- KV缓存的利用与管理调优\n- 异构硬件与并行化策略\n- 基于SLO的请求管理\n\n### 第19章：动态与自适应推理引擎优化\n\n- 自适应并行化策略\n- 动态精度调整\n- 核函数自动调优\n- 使用强化学习代理进行运行时调优\n- 自适应批处理与调度\n\n### 第20章：AI辅助的性能优化\n\n- AlphaTensor AI发现的算法\n- 自动化的GPU核函数优化\n- 自我改进的AI代理\n- 向数百万GPU集群扩展\n\n## 社区资源\n\n每月在20多个城市举办面向10万+成员的聚会：\n\n- [YouTube频道](https:\u002F\u002Fwww.youtube.com\u002F@AIPerformanceEngineering)\n- [Meetup小组](https:\u002F\u002Fwww.meetup.com\u002Fai-performance-engineering)\n\n近期会议：\n\n- [动态自适应RL推理CUDA核函数调优](resources\u002FDynamic_Adaptive_RL_Inference_CUDA_Kernel_Tuning.pdf)\n- [高性能智能体式AI推理系统](resources\u002FHigh_Performance_Agentic_AI_Inference_Systems.pdf)\n- [PyTorch模型优化](resources\u002FPyTorch_Model_Optimization.pdf)\n\n### 每月聚会摘要\n- **2026年2月16日** - [YouTube即将上线](https:\u002F\u002Fwww.youtube.com\u002F@AIPerformanceEngineering) & 幻灯片：[Verda公司Riccardo Mereu的NVFP4低精度数值计算](resources\u002FNVFP4_Low_Precision_Numerics_Verda.pdf)\n- **2026年1月19日** - [YouTube](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=o-etY6VLHZo) & 幻灯片：[Chaim Rand关于使用NVIDIA Nsight Systems剖析器优化数据传输](resources\u002FOptimizing_Data_Transfer_With_NVIDIA_Nsight_Systems_Profiler_by_Chaim_Rand.pdf)\n- **2025年11月17日** - [YouTube](https:\u002F\u002Fyoutu.be\u002F2EWDG_Dxjs8) & 幻灯片：[Abdul Dakkak的光速推理模块化系统，2025年11月17日](resources\u002FSpeedOfLight_Inference_Modular_Nov_17_2025_Abdul_Dakkak.pdf)：Abdul Dakkak利用NVIDIA和AMD GPU及模块化平台实现的光速推理\n- **2025年10月20日** - [YouTube](https:\u002F\u002Fyoutu.be\u002Fd3ZLodGTlAo)：AI驱动的GPU核函数优化 + nbdistributed支持下的分布式PyTorch\n- **2025年9月15日** – [YouTube](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=eLnHXL1xXfM)：深入探讨动态自适应RL推理核函数调优。\n- **2025年8月18日** – [YouTube](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=SBPlOUww57I)：多GPU编排策略与Nsight剖析案例研究。\n- **2025年7月21日** – [YouTube](https:\u002F\u002Fyoutu.be\u002FjaiMotxv8ck)：FlashMLA、ThunderMLA和FlexDecoding核函数演示，并现场展示Nsight Compute效果。\n- **2025年6月16日** – 幻灯片：[高性能智能体式AI推理系统](resources\u002FHigh_Performance_Agentic_AI_Inference_Systems.pdf)，内容涵盖分离式推理路由。\n- **2025年5月19日** – [YouTube](https:\u002F\u002Fyoutu.be\u002FF8jJwI9xHTE) & [PyTorch数据加载器优化](resources\u002FPyTorch_Model_Optimization_Data_Loader.pdf)：Torch.compile流水线、数据加载器吞吐量调优以及跨架构的CUDA\u002FROCm核函数。\n- **2025年4月21日** – [YouTube](https:\u002F\u002Fyoutu.be\u002FXoZcY_fDUKA) & [AI性能工程聚会幻灯片](resources\u002FAI_Performance_Engineering_Meetup_Apr_21_2025.pdf)：端到端GPU性能指南，以及[PyTorch模型优化](resources\u002FPyTorch_Model_Optimization.pdf)研讨会。\n\n## 贡献说明\n\n欢迎贡献！请参阅`CONTRIBUTING.md`以获取代码、文档及性能改进的相关指南。\n\n## 许可证\n\nApache 2.0许可证——详情请参阅`LICENSE`文件。","# AI Performance Engineering 快速上手指南\n\n本指南基于 Chris Fregly 编写的《AI Systems Performance Engineering》配套开源资源，旨在帮助开发者快速掌握现代 AI 工作负载（训练与推理）的全栈性能优化技术，涵盖 GPU 架构、CUDA 编程、PyTorch 调优及分布式扩展策略。\n\n## 环境准备\n\n在开始之前，请确保您的开发环境满足以下硬件和软件要求，以运行书中的代码示例和性能分析工具。\n\n### 系统要求\n- **操作系统**: Linux (推荐 Ubuntu 20.04\u002F22.04 LTS)，部分优化涉及内核参数调整，Windows\u002FmacOS 仅适合阅读理论。\n- **GPU**: NVIDIA GPU (推荐 Ampere 架构及以上，如 A100, H100, Blackwell 系列)，需支持 CUDA Compute Capability 8.0+。\n- **内存**: 建议 64GB+ RAM，多节点实验需高速互联网络 (InfiniBand\u002FRoCE)。\n\n### 前置依赖\n- **NVIDIA Driver**: 最新生产版驱动 (Production Branch)。\n- **CUDA Toolkit**: 版本 12.x 或更高。\n- **Python**: 3.9 - 3.11。\n- **核心库**:\n  - PyTorch (带 CUDA 支持)\n  - NVIDIA Nsight Systems \u002F Nsight Compute (性能剖析必备)\n  - OpenAI Triton\n  - Docker & Kubernetes (用于容器化部署测试)\n\n> **国内加速建议**：\n> - 安装 PyTorch 时，推荐使用清华或中科大镜像源。\n> - 下载 NVIDIA 驱动和 CUDA Toolkit 可访问 [NVIDIA 中国开发者官网](https:\u002F\u002Fdeveloper.nvidia.cn\u002F)。\n\n## 安装步骤\n\n本项目主要包含书籍配套的代码示例、检查清单及性能调优脚本。请按照以下步骤克隆仓库并配置环境。\n\n### 1. 克隆代码仓库\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fai-performance-engineering\u002Fai-performance-engineering.git\ncd ai-performance-engineering\u002Fcode\n```\n\n### 2. 创建虚拟环境\n建议使用 `conda` 或 `venv` 隔离环境，避免依赖冲突。\n\n```bash\n# 使用 conda (推荐)\nconda create -n ai-perf python=3.10 -y\nconda activate ai-perf\n\n# 或使用 venv\npython3 -m venv ai-perf-env\nsource ai-perf-env\u002Fbin\u002Factivate\n```\n\n### 3. 安装核心依赖\n根据项目中的 `requirements.txt` 安装基础库。为确保下载速度，指定国内镜像源。\n\n```bash\n# 使用清华镜像源安装 PyTorch 及相关依赖\npip install torch torchvision torchaudio --index-url https:\u002F\u002Fdownload.pytorch.org\u002Fwhl\u002Fcu121\npip install -r requirements.txt -i https:\u002F\u002Fpypi.tuna.tsinghua.edu.cn\u002Fsimple\n```\n\n### 4. 安装性能分析工具 (可选但推荐)\n若要复现书中的 Profiling 章节，需安装 NVIDIA Nsight 工具链。\n\n```bash\n# Ubuntu 下通过 apt 安装 (需添加 NVIDIA repo)\nsudo apt-get update\nsudo apt-get install nsight-systems-cli nsight-compute-cli\n```\n\n## 基本使用\n\n本项目的核心在于通过代码示例学习如何剖析和优化 AI 系统。以下是一个最简单的使用流程，演示如何运行一个基础的 PyTorch 性能剖析示例。\n\n### 1. 查看可用示例\n进入代码目录，浏览不同章节对应的优化案例：\n\n```bash\nls chapters\u002F\n# 输出示例：ch01_intro, ch06_cuda_basics, ch13_pytorch_profiling, ...\n```\n\n### 2. 运行 PyTorch 性能剖析示例\n以第 13 章为例，运行一个简单的矩阵乘法剖析脚本，识别计算瓶颈。\n\n```bash\ncd chapters\u002Fch13_pytorch_profiling\n\n# 运行基础测试脚本\npython profile_matmul.py\n```\n\n### 3. 使用 Nsight Systems 进行深入分析\n书中强调\"Profile for goodput\"，使用 Nsight 生成时间线视图以观察 GPU 利用率。\n\n```bash\n# 使用 nsys 包装运行命令，生成报告文件\nnsys profile --stats=true -t cuda,nvtx,osrt,cudnn,cublas -o output_report python profile_matmul.py\n\n# 查看生成的统计信息\ncat output_report.qdrep-stats.txt\n```\n\n### 4. 应用性能检查清单\n在项目根目录下查阅 `docs\u002Fappendix.md` 中的 **200+ 项性能检查清单**。在实际工程中，对照该清单逐项核对您的系统配置（如 NUMA 绑定、GC 设置、通信重叠等），以确保没有遗漏关键优化点。\n\n```bash\n# 在终端快速查看清单分类\ngrep \"##\" docs\u002Fappendix.md\n```\n\n通过以上步骤，您已建立起基础的 AI 性能工程实验环境。接下来可深入阅读各章节代码，尝试修改 Kernel 实现、调整并行策略或优化显存布局，以实践书中提到的“从利用率导向转向有效吞吐量（Goodput）导向”的工程理念。","某大型电商平台的算法团队正试图将自研的千亿参数推荐模型从实验环境迁移至生产集群，以支持实时个性化推荐。\n\n### 没有 ai-performance-engineering 时\n- **盲目优化导致收益甚微**：团队仅关注 GPU 利用率指标，却未使用 Nsight 或 PyTorch Profiler 深入分析，导致大量时间浪费在非瓶颈的代码段上，实际推理延迟依然居高不下。\n- **显存带宽成为隐形杀手**：由于缺乏对数据布局和缓存机制的系统性调优，数据搬运速度跟不上计算速度，GPU 经常处于“等数据”的空转状态，吞吐量远低于预期。\n- **分布式训练效率低下**：在尝试多机扩展时，未合理重叠计算与通信，导致并行策略（如 FSDP、TP）引入巨大的同步气泡，增加硬件成本却无法线性提升训练速度。\n- **服务部署成本失控**：直接部署大模型时未采用分页 KV Cache 或预填充\u002F解码分离架构，导致单卡并发能力极差，为了满足流量需求不得不堆砌昂贵显卡，预算严重超支。\n\n### 使用 ai-performance-engineering 后\n- **精准定位真实瓶颈**：借助书中提供的性能剖析方法论，团队快速识别出算子融合不足和内存访问模式问题，针对性优化后推理延迟降低了 40%。\n- **最大化硬件吞吐能力**：通过应用 Triton 编写高性能内核并优化数据布局，彻底消除了内存带宽瓶颈，确保 GPU 计算单元持续满负荷运转。\n- **实现高效线性扩展**：依据分布式训练的最佳实践调整并行策略并重叠通信，成功在百卡集群上实现了接近线性的加速比，大幅缩短模型迭代周期。\n- **显著降低单位 Token 成本**：引入 vLLM 和 TensorRT-LLM 等先进推理引擎及 disaggregated 架构，在同等硬件条件下将并发请求处理能力提升 3 倍，每美元产出效益翻倍。\n\nai-performance-engineering 帮助团队从单纯追求算力峰值转向以“有效吞吐”为核心的系统工程，用科学的方法论在控制成本的前提下实现了大模型的高效落地。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fcfregly_ai-performance-engineering_9096bb81.png","cfregly","Chris Fregly","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fcfregly_0c56970e.png","AI Systems Performance Engineer\r\n\r\n[3x O'Reilly Author]\r\n\r\n[Former AWS, Databricks, Netflix]","AI Systems Performance Engineer","San Francisco, CA","chris@fregly.com","https:\u002F\u002Fgithub.com\u002Fcfregly\u002Fai-performance-engineering","https:\u002F\u002Fgithub.com\u002Fcfregly",[82,86,90,94,98,102,106,109,113,116],{"name":83,"color":84,"percentage":85},"Python","#3572A5",82.7,{"name":87,"color":88,"percentage":89},"Cuda","#3A4E3A",10.3,{"name":91,"color":92,"percentage":93},"Shell","#89e051",4.9,{"name":95,"color":96,"percentage":97},"TypeScript","#3178c6",1.4,{"name":99,"color":100,"percentage":101},"Makefile","#427819",0.4,{"name":103,"color":104,"percentage":105},"HTML","#e34c26",0.1,{"name":107,"color":108,"percentage":105},"Rust","#dea584",{"name":110,"color":111,"percentage":112},"CSS","#663399",0,{"name":114,"color":115,"percentage":112},"Dockerfile","#384d54",{"name":117,"color":118,"percentage":112},"C","#555555",1314,187,"2026-04-20T08:39:05","Apache-2.0",4,"Linux","必需 NVIDIA GPU（提及 Blackwell 架构、Tensor Cores），需安装 NVIDIA 驱动及 CUDA 工具包，具体显存大小未说明（视模型规模而定）","未说明",{"notes":128,"python":126,"dependencies":129},"本项目主要配套 O'Reilly 书籍《AI Systems Performance Engineering》，侧重于底层系统优化而非单一开箱即用的脚本库。内容涵盖 GPU 架构、CUDA 编程、分布式训练策略及推理引擎调优。运行示例代码需要完整的 NVIDIA 软件栈（包括驱动、CUDA、Nsight 性能分析工具）。部分高级特性（如多节点扩展、GPUDirect Storage）需要特定的集群硬件和网络环境（如 NVLink, InfiniBand）。建议具备 C++ 和 Python 混合编程基础。",[130,131,132,133,134,135,136,137,138,139],"PyTorch","CUDA C++","OpenAI Triton","Nsight Systems\u002FCompute","vLLM","SGLang","TensorRT-LLM","NVIDIA Dynamo","NCCL","Kubernetes",[36,14],"2026-03-27T02:49:30.150509","2026-04-20T22:35:39.513303",[144,149,154,159,164,169],{"id":145,"question_zh":146,"answer_zh":147,"source_url":148},45836,"如何运行第一章（Chapter 01）的基准测试代码？","仓库已更新以明确代码与书籍章节的映射关系。您可以使用以下命令运行基准测试：\n1. 严格模式（默认，适用于标准硬件）：\n   python -m cli.aisp bench run --targets ch01 --profile minimal\n2. 兼容模式（适用于受限或较旧的硬件）：\n   python -m cli.aisp bench run --targets ch01 --profile minimal --validity-profile portable\n3. 兼容模式并允许更新预期结果：\n   python -m cli.aisp bench run --targets ch01 --profile minimal --validity-profile portable --allow-portable-expectations-update","https:\u002F\u002Fgithub.com\u002Fcfregly\u002Fai-performance-engineering\u002Fissues\u002F4",{"id":150,"question_zh":151,"answer_zh":152,"source_url":153},45837,"对于没有 CUDA 基础但想通过此仓库学习的人，有什么建议？","虽然该问题在原始讨论中未得到详细解答，但根据项目性质，建议的学习路径是：首先阅读书籍的第一章以建立理论基础，然后对照 `code\u002Fchap1` 文件夹中的代码。由于直接阅读代码可能令人困惑，建议结合 README 文档中关于“如何在您的环境中运行”的最新指南，从运行简单的基准测试命令开始，观察输出结果，再逐步深入代码细节。如果感到困难，可以优先关注书中解释的概念与代码文件中对应函数的映射关系。","https:\u002F\u002Fgithub.com\u002Fcfregly\u002Fai-performance-engineering\u002Fissues\u002F5",{"id":155,"question_zh":156,"answer_zh":157,"source_url":158},45838,"在哪里可以找到之前技术聚会（Meetup）的录像？","所有的聚会录像都发布在 YouTube 频道上，访问地址为：https:\u002F\u002Fwww.youtube.com\u002F@AIPerformanceEngineering","https:\u002F\u002Fgithub.com\u002Fcfregly\u002Fai-performance-engineering\u002Fissues\u002F3",{"id":160,"question_zh":161,"answer_zh":162,"source_url":163},45839,"运行 ch03 的 NUMA 拓扑脚本时出现 'nvidia-smi topo -m 不支持 -i 标志' 错误怎么办？","这是一个已知问题。`nvidia-smi topo -m` 命令不能单独与 `-i` 标志一起使用。错误信息提示 `-i` 必须与 `-n` 或 `-p` 结合使用。您需要修改 `code\u002Fch03\u002Fnuma_topology_script.sh` 脚本中的相关命令，移除错误的 `-i` 用法，或根据 `nvidia-smi` 的正确语法调整查询 GPU NUMA 节点的方式（例如直接使用 `nvidia-smi topo -m` 查看整体拓扑，或通过其他参数指定 GPU）。","https:\u002F\u002Fgithub.com\u002Fcfregly\u002Fai-performance-engineering\u002Fissues\u002F8",{"id":165,"question_zh":166,"answer_zh":167,"source_url":168},45840,"第十章（Chapter 10）中的某些文件名是否与实际内容不符？","是的，维护者已确认该问题。具体包括：\n1. `baseline_cooperative_persistent.cu` 和 `optimized_cooperative_persistent.cu` 文件中实际上并没有包含持久化（persistent）相关的代码。\n2. `optimized_warp_spec_pingpong.cu` 文件中并没有实现 Warp 角色乒乓（warp role pingpong）机制，仅包含了融合内核（fused kernel）。\n用户在参考这些文件时应注意文件名可能具有误导性，以实际代码逻辑为准。","https:\u002F\u002Fgithub.com\u002Fcfregly\u002Fai-performance-engineering\u002Fissues\u002F6",{"id":170,"question_zh":171,"answer_zh":172,"source_url":173},45841,"是否有用于自动优化 PyTorch\u002FCUDA 代码的入门代码（Starter Code）？","针对用户请求的基于 Claude 自动分析 PyTorch\u002FCUDA 代码的演示入门脚本，目前该 Issue 下尚未提供具体的代码资源。建议关注作者的演示视频链接（https:\u002F\u002Fyoutu.be\u002FSBPlOUww57I?t=4391）手动复现，或留意仓库后续更新是否会增加相关示例。","https:\u002F\u002Fgithub.com\u002Fcfregly\u002Fai-performance-engineering\u002Fissues\u002F2",[]]