NVLink SDN Partitioning
NVLink SDN (Software Defined Networking) partitioning allows administrators to split a rack’s NVLink domain into smaller GPU partitions. This is useful for multi-tenancy, workload isolation, or maintenance scenarios where not all GPUs in a rack should belong to a single NVLink fabric domain.
NVLink SDN definitions are managed via the nvlinksdn mode in cmsh, and applied to racks using the applynvsdnpartitions command in rack mode:
Section 9.1 provides an overview of NVLink SDN definitions and the pre-defined partition templates.
Section 9.2 describes how to view NVLink SDN definitions and their properties.
Section 9.3 covers the partitions submode for viewing and managing individual partitions.
Section 9.4 describes the partition properties in detail.
Section 9.5 explains how to create custom NVLink SDN definitions.
Section 9.6 covers applying NVLink SDN partition configurations to racks.
Section 9.7 describes the use of SDN partition configurations to specify Slurm topology blocks.
9.1 NVLink SDN Overview
BCM ships with a set of pre-defined NVLink SDN partition templates. These templates cover common partitioning schemes for an NVL72 rack with 18 compute trays (72 GPUs). The Default Partition assigns all GPUs to a single partition, while the other templates split the 18 nodes into various groupings such as 2x9 Nodes (two partitions of 9 nodes each) or 3x6 Nodes (three partitions of 6 nodes each).
The available NVLink SDN definitions can be listed using the list command in nvlinksdn mode:
Example
The Partitions column shows the partition indexes defined within each NVLink SDN definition. The Default Partition uses index 32766, which is the reserved index for a partition of kind All that includes all GPUs.
9.2 Viewing NVLink SDN Definitions
The properties of an NVLink SDN definition can be viewed with the show command after selecting it with use:
Example
Or, without dropping into the object, tab-completion with show from nvlinksdn mode also works:
Example
A multi-partition definition shows the partition indices as a comma-separated list:
Example
9.3 Partitions Submode
Each NVLink SDN definition contains one or more partitions. The partitions are managed through the partitions submode, which is entered using the partitions command on a selected NVLink SDN definition:
Example
The Default Partition has a single partition with kind All, which means that all GPUs in the rack are included. The Info column shows a summary based on the partition kind.
A multi-partition definition such as 2x9 Nodes has two partitions, each covering 9 nodes:
Example
A more complex definition such as 1x2+1x4+2x6 Nodes has four partitions, with multicast limits allocated in proportion to the number of nodes:
Example
The full details of a partition can be viewed by selecting it with use and running show:
Example
or more directly, without dropping into the object, by running show with tab-completion from partitions mode:
Example
9.4 Partition Properties
Each partition has the following properties:
-
Kind: Determines how GPUs are assigned to the partition. The available kinds are:-
All: Includes all GPUs in the partition. Only one partition with this kind may exist in an NVLink SDN definition, and it cannot coexist with other partitions. -
Node count: Specifies the partition by number of compute nodes. -
GPU count: Specifies the partition by number of GPUs. -
Locations: Specifies the partition by explicit GPU locations in the format.<slot-id>.<host-id>.<gpu-id>. -
GUID: Specifies the partition by GPU GUIDs. The GUIDs can be retrieved using thenvplatforminfocommand indevicemode (section 7.3.4).
-
-
Index: The partition index, ranging from 1 to 32766. Index 32766 is reserved value, and is for partitions with kindAll. -
Count: The number of nodes or GPUs in the partition. This property is only displayed when the kind isNode countorGPU count. -
Locations: A list of GPU locations. This property is only displayed when the kind isLocations. -
GUIDs: A list of GPU GUIDs. This property is only displayed when the kind isGUID. -
Mcast limit: The multicast limit allocated to the partition. The sum of multicast limits across all partitions in an NVLink SDN definition must not exceed 1024. -
Resiliency mode: Determines how the partition handles NVLink trunk link failures. The available modes are:-
Full bandwidth: On trunk link failure, attempts automatic recovery. If no spare trunk links are available, excludes GPUs from the fabric to ensure remaining GPUs maintain full, non-degraded bandwidth. -
Adaptive bandwidth: If a trunk link fails and no spares are available, keeps all GPUs active but allows them to operate at a lower, degraded bandwidth. -
User action required: On a link failure without spares, enters an unhealthy state and halts automatic rerouting, requiring manual intervention to recover.
-
The help set command in the partitions submode displays a useful help text with a summary of the preceding information.
Example
9.5 Creating Custom NVLink SDN Definitions
Custom NVLink SDN definitions can be created using the add command in nvlinksdn mode. The following example creates a definition with two partitions of 9 nodes each, named part-a and part-b:
Example
The add command in the partitions submode supports these syntax formats:
-
add <partition name>: Creates a partition with an automatically assigned index. The value of the parameterKindis inherited from existing partitions, or it defaults to the valueNode count. -
add <partition name> <index>: Creates a partition with the specified value of<index>. -
add <partition name> <index> <node-count>: Creates a partition with the specified value of<index>. The specified value of sets the value of the parameterCount, which is the number of nodes in the partition. -
add <partition name> <index> gpus <gpu-count>: Creates a partition with the specified value of<index>. The use of thegpuflag means that-
the value of the parameter
Kindis set toGPU count -
the specified value of sets the value of the parameter
Count, which is the number of gpus in the partition.
-
9.5.1 Changing Partition Kind
A newly added partition defaults to a value of Node count for the parameter Kind. The value for Kind can be changed with the set command, and the displayed properties adapt accordingly. For example, switching to the GUID kind causes the Count property to be replaced by GUIDs, and the value displayed for the Info parameter changes accordingly:
Example
The nvplatforminfo command (section 7.3.4) in device mode retrieves the IB GUID for each GPU. These are the GUID values that can be set for the GUIDs parameter when the Kind parameter is set to GUID.
9.5.2 Validation Rules
When committing an NVLink SDN definition, the following validation rules are enforced:
-
Partition names must be unique within the definition.
-
Partition index values must be unique within the definition.
-
A partition with kind set to
Allcannot coexist with other partitions. -
All partitions must have the same kind. Mixed kinds of partitions in an SDN succeed, but produce a warning.
-
For
Node countpartitions: the sum of node counts must equal 18. -
For
GPU countpartitions: the sum of GPU counts must equal 36, 72, or 144. -
For
Locationspartitions: a location must not appear in multiple partitions. -
The sum of multicast limits across all partitions must not exceed 1024.
9.6 Applying NVLink SDN Partitions
Once an NVLink SDN definition has been configured, it can be applied to racks using the applynvsdnpartitions command in rack mode. This command sends the partition configuration to the NVLink switches in the specified racks.
Example
The arguments and options to applynvsdnpartitions have these features and behaviors:
-
Arguments:
-
The last argument is always the name of the NVLink SDN definition.
-
Any preceding arguments are rack names.
-
If no racks are specified and a rack is currently selected (with
use), then the partition is applied to that rack. -
If no rack is selected either, then the partition is applied to all racks.
-
-
Options: Racks can be filtered by physical location attributes using the
--location,--building,--room, and--rowoptions.
Each GPU operation takes about 1 second. With 72 GPUs per rack requiring both removal and re-addition, the command typically takes about 1 to 3 minutes per rack to complete.
The command output shows the result for each rack. The operation first removes all GPUs from their current partitions, then creates the new partitions, and then adds GPUs to them.
Example
The current partition state of the cluster can be verified after applying using the nvsdnpartitioninfo command in device mode (section 7.3.6). The following example shows the result after applying 3x6 Nodes to rack a01 and 2x4+1x10 Nodes to rack a02:
Example
The output shows that each rack can have a different NVLink SDN definition applied. Rack a01 has three equal partitions of 6 nodes each, while rack a02 has two partitions of 4 nodes and one partition of 10 nodes.
9.7 Slurm Topology Integration
Topology blocks (here) in the Slurm workload manager can use NVLink SDN partitions. This can improve performance by ensuring that Slurm schedules jobs on nodes that belong to the same NVLink partition, so that GPU-to-GPU communication is kept within the high-bandwidth NVLink fabric.
To enable using NVLink SDN partitions as topology blocks, the Block entity is set to SDN in the Slurm topology block settings:
Example
Setting Block entity to SDN, means that Slurm topology blocks are then derived from the NVLink SDN partitions that are currently applied on each rack. The generated topology can be viewed with the topology print command.
The following example shows the topology after applying 3x6 Nodes to rack a01, while rack a02 still has the Default Partition (all 18 nodes in a single block):
Example
The output shows that rack a01 is split into three blocks of 6 nodes matching the applied NVLink SDN partitions, while rack a02 has a single block covering all 18 nodes.