AutoMegaKernel (AMK) compiles a HuggingFace Llama-family model into a single persistent cooperative CUDA kernel that runs the whole forward pass in one launch, with no per-model hand-written CUDA. The contribution is the system, not raw speed. A frozen schedule-IR validator statically certifies deadlock-freedom and race-freedom via static graph checks (not a mechanized proof), so an unsafe agent-proposed schedule is rejected before launch: across 7,160 adversarial schedules (6,091 unsafe) it had zero false-accepts and accepted all 360 real lowerings. The same source retargets sm_80/sm_90/sm_120 from one codebase, auto-generates correct megakernels for 10 of 10 supported models, and on a real SmolLM2-135M checkpoint reproduces HuggingFace greedy decode token-for-token (perplexity match 2.5e-7). An unattended, agent-drivable autoresearch loop self-improves the megakernel over its own baseline (1.25-1.72x). A search-found int8 (W8A16) megakernel beats CUDA-graphed cuBLAS bf16 at batch-1 decode across NVIDIA's datacenter inference fleet: L4 up to 1.33x, the current-gen L40S 1.25-1.27x, A10G up to 1.08x at scale, and the consumer RTX 5090 1.19-1.23x. The ordering is not a clean function of bandwidth (the 864 GB/s L40S beats the 600 GB/s A10G); the divide is inference-class vs training-class. AMK trails cuBLAS on the high-bandwidth training-class A100/H100, where the harness localizes the cross-SM-sync bottleneck; we report the gap plainly. This is a precision-asymmetric (W8A16 vs bf16) comparison at decode position 0; the largest real checkpoint is TinyLlama-1.1B. Code and the harness: https://github.com/RightNow-AI/AutoMegaKernel


翻译:暂无翻译

0
下载
关闭预览

相关内容

《利用自适应交互增强有人无人编队协同》217页
专知会员服务
96+阅读 · 2024年11月23日
KG-Agent:面向KG复杂推理的高效自治代理框架
专知会员服务
35+阅读 · 2024年6月1日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Self-Attention GAN 中的 self-attention 机制
PaperWeekly
12+阅读 · 2019年3月6日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
告别调参,AutoML新书221页免费下载
新智元
11+阅读 · 2018年10月16日
告别调参,AutoML新书发布
专知
14+阅读 · 2018年10月16日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
乌克兰纵深打击如何重塑俄罗斯的战略选择
专知会员服务
0+阅读 · 今天12:25
俄乌战争中关于中程打击无人机部署的经验启示
专知会员服务
0+阅读 · 今天12:08
《基于强化学习的自动化红队测试》
专知会员服务
4+阅读 · 7月23日
伊朗不对称防空战略的演进
专知会员服务
4+阅读 · 7月23日
对抗环境下超视距目标打击的情报支援
专知会员服务
10+阅读 · 7月22日
相关VIP内容
《利用自适应交互增强有人无人编队协同》217页
专知会员服务
96+阅读 · 2024年11月23日
KG-Agent:面向KG复杂推理的高效自治代理框架
专知会员服务
35+阅读 · 2024年6月1日
相关基金
Top
微信扫码咨询专知VIP会员