Skip to content

Commit

Permalink
add GPU
Browse files Browse the repository at this point in the history
  • Loading branch information
laszewsk committed Oct 5, 2023
1 parent 8c12f97 commit 5fe3eca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ submission:

experiment:
# card_name: v100
card_name: v100
card_name: a100
gpu_count: 1
cpu_num: 1
mem: "64GB"
Expand Down
4 changes: 4 additions & 0 deletions benchmarks/cloudmask/target/greene_v0.5/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
--config=<config> Specify the path to the config file [default: config-simple.yaml].
--clean Clean up generated files.
--out=<output> Specify the output filename. If not provided, output will be written to stdout.
--gpu=<gpu> the gpu
"""

import os
Expand All @@ -26,6 +27,8 @@
CONFIG = arguments['--config'] or "config-simple.yaml"
CLEAN = arguments['--clean']
OUTPUT = arguments['--out']
GPU = arguments['--gpu'] or "a100"


pprint(arguments)

Expand Down Expand Up @@ -134,6 +137,7 @@ def _print(content):
replace_in_yaml(CONFIG_YAML, 'experiemnet.gpu_count', 1)

# Modify the slurm script
replace_sbatch_in_slurm(SLURM_SCRIPT, 'gres', f"gpu:{GPU}:1")
replace_sbatch_in_slurm(SLURM_SCRIPT, 'job-name', f"cloudmask-gpu-greene-epoch-{EXPERIMENT_ID}")
replace_sbatch_in_slurm(SLURM_SCRIPT, 'time', timesArray[j])

Expand Down

0 comments on commit 5fe3eca

Please sign in to comment.