Skip to content

Commit fee5567

Browse files
committed
add support for MIG-enabled devices
1 parent 2bf477e commit fee5567

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

gpu_cmode.lua

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,13 @@ function slurm_spank_task_init_privileged(spank)
118118
return SPANK.FAILURE
119119
end
120120

121+
-- Setting compute mode is not supported on MIG-enabled devices
122+
if device_ids:find("MIG-") then
123+
SPANK.log_user(myname .. ": ignoring compute mode setting on " ..
124+
"MIG-enabled device")
125+
return SPANK.SUCCESS
126+
end
127+
121128
-- check for nvidia-smi
122129
nvs_path = exec("which nvidia-smi")
123130
if nvs_path:match("nvidia%-smi$") == nil then
@@ -167,6 +174,13 @@ function slurm_spank_task_exit(spank)
167174
return SPANK.FAILURE
168175
end
169176

177+
-- Setting compute mode is not supported on MIG-enabled devices
178+
if device_ids:find("MIG-") then
179+
SPANK.log_user(myname .. ": ignoring compute mode setting on " ..
180+
"MIG-enabled device")
181+
return SPANK.SUCCESS
182+
end
183+
170184
-- check for nvidia-smi
171185
nvs_path = exec("which nvidia-smi")
172186
if nvs_path:match("nvidia%-smi$") == nil then

0 commit comments

Comments
 (0)