FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Lightweight_CLIP_model/multi_node.sh at main · ntat/Lightweight_CLIP_model · GitHub
ntat
/
Lightweight_CLIP_model
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
Lightweight_CLIP_model
/
multi_node.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (29 loc) · 1006 Bytes
Breadcrumbs
Lightweight_CLIP_model
/
multi_node.sh
Copy path
File metadata and controls
33 lines (29 loc) · 1006 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!
/bin/bash
#
SBATCH --job-name=multi-node-accelerate
#
SBATCH --account=account_billing_group
#
SBATCH --nodes=2
#
SBATCH --gres=gpu:A40:4
#
SBATCH --ntasks-per-node=1
#
SBATCH --cpus-per-task=64
#
SBATCH --time=01:00:00
#
Activate your environment
module load torchvision
source
/dsk/nikos/flashattention/bin/activate
#
Specify the number of GPUs per node
GPUS_PER_NODE=4
MASTER_ADDR=
$(
hostname -i
)
#
Get the IP address of the master node
MASTER_PORT=42069
#
Specify a port for communication
#
Set up the launch command for accelerate
export
LAUNCH_CMD=
"
accelerate launch
\
--multi_gpu --mixed_precision no
\
--num_machines=
${SLURM_NNODES}
\
--num_processes=
$(
expr
${SLURM_NNODES}
\*
${GPUS_PER_NODE}
)
\
--machine_rank=
\$
{SLURM_NODEID}
\
--main_process_ip=
${MASTER_ADDR}
\
--main_process_port=
${MASTER_PORT}
\
main.py
\
"
#
Run the launch command on all nodes using srun
echo
${LAUNCH_CMD}
srun bash -c
"
${LAUNCH_CMD}
"
Back
|
FazBrowse Home
|
New Git URL