安培架构GPU的细粒度划分

本文详细介绍了NVIDIA安培架构的Multi-Instance GPU (MIG) 技术,包括如何通过nvidia-smi命令进行GPU实例和运算实例的创建、删除以及资源配置。通过MIG,可以实现GPU资源的细粒度划分,优化深度学习和计算机视觉应用的性能。
摘要由CSDN通过智能技术生成

Multi-Instance GPU技术

NVIDIA从安培架构开始支持更细粒度的GPU资源划分

以A100 40GB显存为例,A100一张卡的SM单元(streaming multiprocessor)数量(类似CPU的核心数)为108,一个GPU运算实例的最小粒度是14个SM单元,也就是说在分配GPU的SM单元数量时必须是14的整数倍。如果申请规模为28 SM单元数,10GB显存的运算实例,设在单张A100上这样的实例个数最多为X个,那么必须满足28 * X <= 108(SM单元总数限制) 且 10 *X <= 40(GPU显存限制)

所以X最大为3。

每14个SM单元称作一个Slice,每张A100卡有7个Slice。

基础命令nvidia-smi mig

启用MIG
nvidia-smi -mig 1

启用某个GPU的MIG,为GPU编号

nvidia-smi -i -mig 1

后面所有MIG命令中都可用-i 来指定作用于哪张卡(8张A100卡的ID依次为0~7)

创建GPU实例

启用MIG后才能创建GPU实例

nvidia-smi mig -lgip 罗列所有卡的GPU实例配置规格,表格中的ID表示使用哪种规格,比如19表示使用1g.5gb规格实例(1 slice and 5 GB 显存),参考此表来创建GPU实例

nvidia-smi mig -lgi 罗列所有卡的已创建GPU实例

创建GPU实例时,可用-i 来指定作用于哪张卡(8张A100卡的ID依次为0~7),例如

nvidia-smi mig -i 0 -cgi 1

NVIDIA A100 Tensor Core GPU Architecture UNPRECEDENTED ACCELERATION AT EVERY SCALE Introduction The diversity of compute-intensive applications running in modern cloud data centers has driven the explosion of NVIDIA GPU-accelerated cloud computing. Such intensive applications include AI deep learning training and inference, data analytics, scientific computing, genomics, edge video analytics and 5G services, graphics rendering, cloud gaming, and many more. From scaling-up AI training and scientific computing, to scaling-out inference applications, to enabling real-time conversational AI, NVIDIA GPUs provide the necessary horsepower to accelerate numerous complex and unpredictable workloads running in today’s cloud data centers. NVIDIA® GPUs are the leading computational engines powering the AI revolution, providing tremendous speedups for AI training and inference workloads. In addition, NVIDIA GPUs accelerate many types of HPC and data analytics applications and systems, allowing customers to effectively analyze, visualize, and turn data into insights. NVIDIA’s accelerated computing platforms are central to many of the world’s most important and fastest-growing industries. HPC has grown beyond supercomputers running computationally-intensive applications such as weather forecasting, oil & gas exploration, and financial modeling. Today, millions of NVIDIA GPUs are accelerating many types of HPC applications running in cloud data centers, servers, systems at the edge, and even deskside workstations, servicing hundreds of industries and scientific domains. AI networks continue to grow in size, complexity, and diversity, and the usage of AI-based applications and services is rapidly expanding. NVIDIA GPUs accelerate numerous AI systems and applications including: deep learning recommendation systems, autonomous machines (self-driving cars, factory robots, etc.), natural language processing (conversational AI, real-time language translation, etc.), smart city video analytics, software-defined 5G networks (that can deliver AI-based services at the Edge), molecular simulations, drone control, medical image analysis, and more.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值