Skip to content

Commit 17bda71

Browse files
committed
check for gpus per node arg
1 parent ccd64fd commit 17bda71

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/monarch/_src/job/slurm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def _submit_slurm_job(self, num_nodes: int) -> str:
137137
sbatch_directives.append(f"#SBATCH --partition={self._partition}")
138138

139139
# add proportional cpu and memory args when not taking the full node
140-
if not self._exclusive and self._partition:
140+
if not self._exclusive and self._partition and self._gpus_per_node:
141141
gpus_per_task = self._gpus_per_node // self._ntasks_per_node
142142
slurm_args = clusterscope.job_gen_task_slurm(
143143
partition=self._partition,

0 commit comments

Comments
 (0)