Skip to content

Commit

Permalink
gpu-setup: Add policy a100_split_3
Browse files Browse the repository at this point in the history
Add policy to create thee 2g.10gb instances on a A100.
donald committed Mar 6, 2022
1 parent cdecd02 commit ebaeac6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions helper/gpu-setup
Original file line number Diff line number Diff line change
@@ -99,6 +99,26 @@ policy_a100_split_7() {
common_setup_a100_complete $gpu_uuid
}

policy_a100_split_3() {

# This policy splits a single A100 with 40 GB into 3 2g.10gb gpu instances each with a
# single default compute instance.
#
# The ID of the 2g.10gb profile is 14 (see `nvidia-smi mig -lgip`).
# The placements for profile 14 are 0,2,4 (see `nvidia-smi mig -lgipp`).

gpu_uuid=$(nvidia-smi --query-gpu=uuid --format=csv,noheader,nounits)
test "$gpu_uuid" || die "GPU not found!"

common_setup_a100 $gpu_uuid

for i in $(seq 0 2 4);do
nvidia-smi mig --id $gpu_uuid --create-gpu-instance 2g.10gb:$i --default-compute-instance
done

common_setup_a100_complete $gpu_uuid
}

policy_phys_gpus() {

# This policy just enumrate the physical GPUs and reserved them
@@ -149,6 +169,9 @@ init() {
a100-split-7)
policy_a100_split_7
;;
a100-split-3)
policy_a100_split_3
;;
phys-gpus)
policy_phys_gpus
;;

0 comments on commit ebaeac6

Please sign in to comment.