KOSMOS:用于通信-计算重叠的自调度持久内核
KOSMOS: Self-scheduling Persistent Kernels for Communication-Compute Overlap
AI总结:
KOSMOS是自调度持久内核库,融合Transformer层通信与计算,在AMD GPU上使Megatron-LM等模型的端到端训练提速1.10-1.83倍。
摘要:
张量并行(TP)与序列并行(SP)以及专家并行(EP)将集合通信置于Transformer层的关键路径上。现有最优的融合内核通过固定角色或调度来缓解该问题,但这种刚性会留下大量空闲窗口。预测通信-计算拆分也无法消除这些窗口;预定的拆分无法适配数据就绪状态。我们提出KOSMOS,一个用于自调度持久内核的库,其工作组使用按消费者需求排序的队列,在数据就绪时在通信与计算角色间切换,无需调度器、逐调用成本模型或调优拆分。KOSMOS将Transformer层的所有TP+SP集合通信与其GEMM融合,并在每个方向一次启动中运行整个专家层(从路由到折叠)。在AMD Instinct MI350X和AMD Instinct MI355X GPU上评估显示,KOSMOS使Megatron-LM的TP+SP端到端训练在BF16精度下提速1.10-1.28倍,在MXFP8精度下提速1.10-1.25倍;相比DeepEP,KOSMOS使DeepSeek-V3和Qwen3-235B代理模型的端到端训练提速1.29-1.83倍。
英文摘要:
Tensor and sequence parallelism (TP+SP) and expert parallelism (EP) put collectives on the critical path of transformer layers. State-of-the-art fused kernels mitigate this with fixed roles or schedules, but this rigidity leaves large idle windows. Predicting a communication-computation split does not remove them either; a predetermined split cannot follow data readiness. We present KOSMOS, a library for self-scheduling persistent kernels whose workgroups use queues ordered by consumer demand to switch between communication and computation roles as data become ready, with no scheduler, per-call cost model, or tuned split. KOSMOS fuses every TP+SP collective of a transformer layer with its GEMM, and runs an entire expert layer, from router to fold, in one launch per direction. Evaluated on AMD Instinct MI350X and AMD Instinct MI355X GPUs, KOSMOS speeds up TP+SP end-to-end training in Megatron-LM by 1.10-1.28x in BF16 and 1.10-1.25x in MXFP8. KOSMOS accelerates end-to-end training of DeepSeek-V3 and Qwen3-235B proxies by 1.29-1.83x over DeepEP.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。