Skip to content

Commit

Permalink
Simplify the multi-gpu script
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Nov 15, 2023
1 parent f1706c4 commit 4fb0622
Showing 1 changed file with 22 additions and 23 deletions.
45 changes: 22 additions & 23 deletions scripts/multigpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,29 @@
: "${precision:=double}"
: "${nreps:=1}"

export CUDA_VISIBLE_DEVICES=0,1,2,3
for circuit in qft variational supremacy qv bv
do
for backend in qibojit qibotf
do
python compare.py --circuit $circuit --nqubits 32 --filename $filename \
--library-options backend=$backend,accelerators=1/GPU:0+1/GPU:1+1/GPU:2+1/GPU:3 \
--nreps $nreps --precision $precision
echo
done
# TODO: temporarily reduce expectations to a single GPU
# export CUDA_VISIBLE_DEVICES=0,1,2,3
export CUDA_VISIBLE_DEVICES=0

for backend in qibojit qibotf
do
python compare.py --circuit $circuit --nqubits 32 --filename $filename \
--library-options backend=$backend,accelerators=2/GPU:2+2/GPU:3 \
--nreps $nreps --precision $precision
echo
done
for circuit in qft; do # variational supremacy qv bv
# for backend in qibojit qibotf; do
# python compare.py --circuit $circuit --nqubits 10 --filename $filename \
# --library-options backend=$backend,accelerators=1/GPU:0+1/GPU:1+1/GPU:2+1/GPU:3 \
# --nreps $nreps --precision $precision
# echo
# done

# for backend in qibojit qibotf; do
# python compare.py --circuit $circuit --nqubits 10 --filename $filename \
# --library-options backend=$backend,accelerators=2/GPU:2+2/GPU:3 \
# --nreps $nreps --precision $precision
# echo
# done

for backend in qibojit qibotf
do
python compare.py --circuit $circuit --nqubits 32 --filename $filename \
--library-options backend=$backend,accelerators=4/GPU:3 \
--nreps $nreps --precision $precision
for backend in qibojit qibotf; do
python compare.py --circuit $circuit --nqubits 10 --filename $filename \
--library-options backend=$backend,accelerators=4/GPU:0 \
--nreps $nreps --precision $precision
echo
done
done
done

0 comments on commit 4fb0622

Please sign in to comment.