Skip to content

Commit 8057722

Browse files
committed
cuda
1 parent e4c97ac commit 8057722

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.lightning/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ run: |
9191
export PL_RUN_STANDALONE_TESTS=1
9292
if [ "${PACKAGE_NAME}" == "fabric" ]; then
9393
cd parity_fabric/
94-
bash run_standalone_tasks.sh
94+
bash run_standalone_tasks.sh cuda
9595
cd ..
9696
fi
9797
export PL_RUN_STANDALONE_TESTS=0

tests/parity_fabric/run_standalone_tasks.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export PYTHONPATH="${PYTHONPATH}:$(pwd)"
1818
export PYTHONPATH="${PYTHONPATH}:$(pwd)/.."
1919

2020
MAX_RETRIES=3
21+
# parsing argument from call like `bash run_standalone_tasks.sh cuda`
22+
ACCELERATOR=$1
23+
# optional tolerance argument, default to 0.01
24+
TOLERANCE=${2:-0.01}
2125

2226
retry_command() {
2327
local command="$@"
@@ -39,5 +43,4 @@ retry_command() {
3943
return $exit_code
4044
}
4145

42-
retry_command "python -m test_parity_ddp --accelerator="cpu" --devices=2 --tolerance=0.02"
43-
retry_command "python -m test_parity_ddp --accelerator="cuda" --devices=2 --tolerance=0.01"
46+
retry_command "python -m test_parity_ddp --accelerator="$ACCELERATOR" --devices=2 --tolerance=$TOLERANCE"

0 commit comments

Comments
 (0)