multi_process_launch.sh 575 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# See LICENSE for license information.

#!/bin/bash

SCRIPT_NAME="${SCRIPT_NAME:-test.py}"


XLA_BASE_FLAGS="--xla_gpu_enable_latency_hiding_scheduler=true
                --xla_gpu_enable_command_buffer=''"

export XLA_FLAGS="${XLA_BASE_FLAGS}"

15
NUM_RUNS=$(nvidia-smi -L | wc -l)
16
17
for ((i=1; i<NUM_RUNS; i++))
do
18
    CUDA_VISIBLE_DEVICES=$i python $SCRIPT_NAME 127.0.0.1:12345 $i $NUM_RUNS > /dev/null 2>&1 &
19
20
done

21
CUDA_VISIBLE_DEVICES=0 python $SCRIPT_NAME 127.0.0.1:12345 0 $NUM_RUNS
22
23

wait