Skip to content

Commit 5a4a61b

Browse files
author
Himani Anil Deshpande
committed
Add NVSwitch device ID for p6 instance type
1 parent 9b768ad commit 5a4a61b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cookbooks/aws-parallelcluster-platform/resources/fabric_manager/partial/_fabric_manager_common.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ def _nvidia_driver_version
5454

5555
# Get number of nv switches
5656
def get_nvswitches
57-
# A100 (P4) and H100(P5) systems have NVSwitches
57+
# A100 (P4), H100(P5) and B200(P6) systems have NVSwitches
5858
# NVSwitch device id is 10de:1af1 for P4 instance
5959
# NVSwitch device id is 10de:22a3 for P5 instance
60-
nvswitch_check_p4 = shell_out("lspci -d 10de:1af1 | wc -l")
61-
nvswitch_check_p5 = shell_out("lspci -d 10de:22a3 | wc -l")
62-
nvswitch_check_p4.stdout.strip.to_i + nvswitch_check_p5.stdout.strip.to_i
60+
# NVSwitch device id is 10de:2901 for P6 instance
61+
nvswitch_device_ids = ['10de:1af1', '10de:22a3', '10de:2901']
62+
nvswitch_device_ids.sum { |id| shell_out("lspci -d #{id} | wc -l").stdout.strip.to_i }
6363
end

0 commit comments

Comments
 (0)