Existing GPU spatial sharing systems face a three-way tradeoff: resource utilization, performance isolation, and semantic determinism. Hardware partitioning suffers from hardware under-utilization. Hardware multiplexing fails to avoid performance interference. Recently proposed software-based GPU kernel slicing reshapes floating-point reduction orders, destroying semantic determinism and inducing catastrophic token drift in generative models. We present CoGPU, a transparent spatial sharing system that resolves this trilemma. CoGPU introduces \emph{GPU coroutine}, a novel abstraction that enables logical-to-physical resource decoupling. By dynamically mapping immutable virtual contexts to mutable physical resource via lightweight cooperative migration, CoGPU enables extensible, workload-aware scheduling without altering kernel semantics. Evaluations demonstrate CoGPU simultaneously achieves high utilization, strong isolation, and absolute semantic determinism (guaranteeing zero token mismatch). In multi-tenant co-location, it improves training throughput by up to 79.2\% over temporal sharing and reduces P99 inference tail latency by 15.1\%. Its pluggable architecture supports custom policies; compared to the default policy, a \textsc{TPOT-FIRST} policy further reduces SLO violations by 21.2\% under dynamic traffic.
翻译:现有GPU空间共享系统面临三重权衡:资源利用率、性能隔离与语义确定性。硬件分区方案存在硬件利用率不足的问题,硬件复用方案无法避免性能干扰。近期提出的基于软件的GPU内核切片技术重塑浮点归约顺序,破坏了语义确定性,并导致生成模型中出现灾难性的token漂移现象。我们提出CoGPU——一种透明的空间共享系统,可解决这一三难困境。CoGPU引入了新的抽象概念"GPU协程",实现了逻辑资源与物理资源的解耦。通过轻量级协作迁移将不可变的虚拟上下文动态映射至可变的物理资源,CoGPU可在不改变内核语义的前提下实现可扩展的负载感知调度。评估表明,CoGPU能够同时实现高利用率、强隔离性及绝对语义确定性(保证零token偏差)。在多租户共置场景中,相较时间共享方案,CoGPU可将训练吞吐量提升最高79.2%,并将P99推理尾延迟降低15.1%。其可插拔架构支持自定义策略;与默认策略相比,TPOT-FIRST策略在动态流量下可将服务等级协议(SLO)违反率进一步降低21.2%。