arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2401.09290cs.DC
收藏

Guardian:多租户环境中的安全GPU共享

Guardian: Safe GPU Sharing in Multi-Tenant Environments

Manos Pavlidakis, Giorgos Vasiliadis, Stelios Mavridis, Anargyros Argyros, Antony Chazapis, Angelos Bilas

AI总结:

针对多租户GPU共享中的内存安全隐患,本文提出PTX级边界检查方法Guardian,通过地址空间分区、底层调用拦截和PTX级内核插桩实现动态空间共享与内存隔离,在Caffe和PyTorch等框架上平均开销仅9%。

摘要:

现代GPU应用(如机器学习,ML)只能部分利用GPU,导致云环境中的GPU利用率不足。在不同租户的多个应用之间共享GPU可以提高资源利用率,进而提升成本、能耗和电源效率。然而,GPU共享带来了内存安全隐患,因为内核必须共享单一的GPU地址空间。现有的空间共享机制要么缺乏对内存访问的故障隔离,要么需要静态分区,从而导致部署受限或利用率低下。在本文中,我们提出了Guardian,这是一种PTX级别的边界检查方法,可提供内存隔离并支持动态GPU空间共享。Guardian依赖于三种机制:(1) 将公共GPU地址空间划分为不同应用的独立分区。(2) 在最低层级拦截并检查所有GPU相关调用,拦截错误操作。(3) 在PTX级别(在封闭的GPU库中可用)插桩所有GPU内核,拦截所有超出应用内存边界的内核内存访问。Guardian的方法对应用是透明的,并支持发出数十亿GPU内核的真实框架,如Caffe和PyTorch。我们的评估表明,与原生执行相比,Guardian在此类框架上的开销在4% - 12%之间,平均为9%。

英文摘要:

Modern GPU applications, such as machine learning (ML), can only partially utilize GPUs, leading to GPU underutilization in cloud environments. Sharing GPUs across multiple applications from different tenants can improve resource utilization and consequently cost, energy, and power efficiency. However, GPU sharing creates memory safety concerns because kernels must share a single GPU address space. Existing spatial-sharing mechanisms either lack fault isolation for memory accesses or require static partitioning, which leads to limited deployability or low utilization. In this paper, we present Guardian, a PTX-level bounds checking approach that provides memory isolation and supports dynamic GPU spatial-sharing. Guardian relies on three mechanisms: (1) It divides the common GPU address space into separate partitions for different applications. (2) It intercepts and checks all GPU related calls at the lowest level, fencing erroneous operations. (3) It instruments all GPU kernels at the PTX level -- available in closed GPU libraries -- fencing all kernel memory accesses outside application memory bounds. Guardian's approach is transparent to applications and supports real-life frameworks, such as Caffe and PyTorch, that issue billions of GPU kernels. Our evaluation shows that Guardian's overhead compared to native for such frameworks is between 4% - 12% and on average 9%.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑