Skip to content

Commit 3cef33c

Browse files
authored
Merge pull request #67322 from StephenJamesSmith/TELCODOCS-1092
TELCODOCS-1092: GPU sharing methods
2 parents 3cf9bce + 93be3bb commit 3cef33c

8 files changed

+112
-17
lines changed

architecture/nvidia-gpu-architecture-overview.adoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,33 @@ include::modules/nvidia-gpu-red-hat-device-edge.adoc[leveloffset=+2]
5151
.Additional resources
5252
* link:https://cloud.redhat.com/blog/how-to-accelerate-workloads-with-nvidia-gpus-on-red-hat-device-edge[How to accelerate workloads with NVIDIA GPUs on Red Hat Device Edge]
5353
54+
// TELCODOCS-1092 GPU sharing methods
55+
include::modules/nvidia-gpu-sharing-methods.adoc[leveloffset=+1]
56+
.Additional resources
57+
* link:https://developer.nvidia.com/blog/improving-gpu-utilization-in-kubernetes/[Improving GPU Utilization]
58+
59+
include::modules/nvidia-gpu-cuda-streams.adoc[leveloffset=+2]
60+
.Additional resources
61+
* link:https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html#asynchronous-concurrent-execution[Asynchronous Concurrent Execution]
62+
63+
include::modules/nvidia-gpu-time-slicing.adoc[leveloffset=+2]
64+
65+
include::modules/nvidia-gpu-cuda-mps.adoc[leveloffset=+2]
66+
.Additional resources
67+
* link:https://docs.nvidia.com/deploy/mps/index.html[CUDA MPS]
68+
69+
include::modules/nvidia-gpu-mig-gpu.adoc[leveloffset=+2]
70+
.Additional resources
71+
* link:https://docs.nvidia.com/datacenter/tesla/mig-user-guide/[NVIDIA Multi-Instance GPU User Guide]
72+
73+
include::modules/nvidia-gpu-virtualization-with-gpu.adoc[leveloffset=+2]
74+
.Additional resources
75+
* link:https://www.nvidia.com/en-us/data-center/virtual-solutions/[Virtual GPUs]
5476
5577
include::modules/nvidia-gpu-features.adoc[leveloffset=+1]
5678
[role="_additional-resources"]
5779
.Additional resources
80+
5881
* link:https://docs.nvidia.com/ngc/ngc-deploy-on-premises/nvidia-certified-systems/index.html[NVIDIA-Certified Systems]
5982
* link:https://docs.nvidia.com/ai-enterprise/index.html#deployment-guides[NVIDIA AI Enterprise]
6083
* link:https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/overview.html#[NVIDIA Container Toolkit]

modules/nvidia-gpu-cuda-mps.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * architecture/nvidia-gpu-architecture-overview.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="nvidia-gpu-cuda-mps_{context}"]
7+
= CUDA Multi-Process Service
8+
9+
CUDA Multi-Process Service (MPS) allows a single GPU to use multiple CUDA processes. The processes run in parallel on the GPU, eliminating saturation of the GPU compute resources. MPS also enables concurrent execution, or overlapping, of kernel operations and memory copying from different processes to
10+
enhance utilization.

modules/nvidia-gpu-cuda-streams.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * architecture/nvidia-gpu-architecture-overview.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="nvidia-gpu-cuda-streams_{context}"]
7+
= CUDA streams
8+
9+
Compute Unified Device Architecture (CUDA) is a parallel computing platform and programming model developed by NVIDIA for general computing on GPUs.
10+
11+
A stream is a sequence of operations that executes in issue-order on the GPU. CUDA commands are typically executed sequentially in a default stream and a task does not start until a preceding task has completed.
12+
13+
Asynchronous processing of operations across different streams allows for parallel execution of tasks. A task issued in one stream runs before, during, or after another task is issued into another stream. This allows the GPU to run multiple tasks simultaneously in no prescribed order, leading to improved performance.

modules/nvidia-gpu-features.adoc

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,6 @@ NVIDIA AI Enterprise includes support for Red Hat {product-title}. The following
2424

2525
* {product-title} on VMware vSphere with NVIDIA vGPU.
2626
27-
28-
Multi-Instance GPU (MIG) Support in {product-title}::
29-
MIG is useful whenever you have an application that does not require the full power of an entire GPU. The MIG feature of the new NVIDIA Ampere architecture enables you to split your hardware resources into multiple GPU instances, each of which is available to the operating system as an independent CUDA-enabled GPU. The NVIDIA GPU Operator version 1.7.0 and higher provides MIG support for the A100 and A30 Ampere cards. These GPU instances are designed to support multiple independent CUDA applications (up to 7) so that they operate completely isolated from each other with dedicated hardware resources.
30-
+
31-
The GPU's compute units, in addition to their memory, can be split into multiple MIG instances. Each of these instances represents a standalone GPU device from a system perspective and can be connected to any application, container or virtual machine running on the node.
32-
+
33-
From the perspective of the software that uses the GPU, each of these MIG instances looks like its own individual GPU.
34-
35-
Time-slicing NVIDIA GPUs in OpenShift::
36-
GPU time-slicing enables workloads scheduled on overloaded GPUs to be interleaved.
37-
+
38-
This mechanism for enabling time-slicing of GPUs in Kubernetes enables a system administrator to define a set of replicas for a GPU, each of which can be independently distributed to a pod to run workloads on. Unlike multi-instance GPU (MIG), there is no memory or fault isolation between replicas, but for some workloads this is better than not sharing at all. Internally, GPU time-slicing is used to multiplex workloads from replicas of the same underlying GPU.
39-
+
40-
You can apply a cluster-wide default configuration for time slicing. You can also apply node-specific configurations. For example, you can apply a time-slicing configuration only to nodes with Tesla T4 GPUs and not modify nodes with other GPU models.
41-
+
42-
You can combine these two approaches by applying a cluster-wide default configuration and then label nodes to give those nodes receive a node-specific configuration.
43-
4427
GPU Feature Discovery::
4528
NVIDIA GPU Feature Discovery for Kubernetes is a software component that enables you to automatically generate labels for the GPUs available on a node. GPU Feature Discovery uses node feature discovery (NFD) to perform this labeling.
4629
+

modules/nvidia-gpu-mig-gpu.adoc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * architecture/nvidia-gpu-architecture-overview.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="nvidia-gpu-mig-gpu_{context}"]
7+
= Multi-instance GPU
8+
9+
Using Multi-instance GPU (MIG), you can split GPU compute units and memory into multiple MIG instances. Each of these instances represents a standalone GPU device from a system perspective and can be connected to any application, container, or virtual machine running on the node. The software that uses the GPU treats each of these MIG instances as an individual GPU.
10+
11+
MIG is useful when you have an application that does not require the full power of an entire GPU. The MIG feature of the new NVIDIA Ampere architecture enables you to split your hardware resources into multiple GPU instances, each of which is available to the operating system as an independent CUDA-enabled GPU.
12+
13+
NVIDIA GPU Operator version 1.7.0 and higher provides MIG support for the A100 and A30 Ampere cards. These GPU instances are designed to support up to seven multiple independent CUDA applications so that they operate completely isolated with dedicated hardware resources.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * architecture/nvidia-gpu-architecture-overview.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="nvidia-gpu-sharing-methods_{context}"]
7+
= GPU sharing methods
8+
9+
Red{nbsp}Hat and NVIDIA have developed GPU concurrency and sharing mechanisms to simplify GPU-accelerated computing on an enterprise-level {product-title} cluster.
10+
11+
Applications typically have different compute requirements that can leave GPUs underutilized. Providing the right amount of compute resources for each workload is critical to reduce deployment cost and maximize GPU utilization.
12+
13+
Concurrency mechanisms for improving GPU utilization exist that range from programming model APIs to system software and hardware partitioning, including virtualization. The following list shows the GPU concurrency mechanisms:
14+
15+
* Compute Unified Device Architecture (CUDA) streams
16+
* Time-slicing
17+
* CUDA Multi-Process Service (MPS)
18+
* Multi-instance GPU (MIG)
19+
* Virtualization with vGPU
20+
21+
Consider the following GPU sharing suggestions when using the GPU concurrency mechanisms for different {product-title} scenarios:
22+
23+
Bare metal:: vGPU is not available. Consider using MIG-enabled cards.
24+
VMs:: vGPU is the best choice.
25+
Older NVIDIA cards with no MIG on bare metal:: Consider using time-slicing.
26+
VMs with multiple GPUs and you want passthrough and vGPU:: Consider using separate VMs.
27+
Bare metal with {VirtProductName} and multiple GPUs:: Consider using pass-through for hosted VMs and time-slicing for containers.

modules/nvidia-gpu-time-slicing.adoc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * architecture/nvidia-gpu-architecture-overview.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="nvidia-gpu-time-slicing_{context}"]
7+
= Time-slicing
8+
9+
GPU time-slicing interleaves workloads scheduled on overloaded GPUs when you are running multiple CUDA applications.
10+
11+
You can enable time-slicing of GPUs on Kubernetes by defining a set of replicas for a GPU, each of which can be independently distributed to a pod to run workloads on. Unlike multi-instance GPU (MIG), there is no memory or fault isolation between replicas, but for some workloads this is better than not sharing at all. Internally, GPU time-slicing is used to multiplex workloads from replicas of the same underlying GPU.
12+
13+
You can apply a cluster-wide default configuration for time-slicing. You can also apply node-specific configurations. For example, you can apply a time-slicing configuration only to nodes with Tesla T4 GPUs and not modify nodes with other GPU models.
14+
15+
You can combine these two approaches by applying a cluster-wide default configuration and then labeling nodes to give those nodes a node-specific configuration.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * architecture/nvidia-gpu-architecture-overview.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="nvidia-gpu-virtualization-with-gpu_{context}"]
7+
= Virtualization with vGPU
8+
9+
Virtual machines (VMs) can directly access a single physical GPU using NVIDIA vGPU. You can create virtual GPUs that can be shared by VMs across the enterprise and accessed by other devices.
10+
11+
This capability combines the power of GPU performance with the management and security benefits provided by vGPU. Additional benefits provided by vGPU includes proactive management and monitoring for your VM environment, workload balancing for mixed VDI and compute workloads, and resource sharing across multiple VMs.

0 commit comments

Comments
 (0)