Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions build_tools/rocm/run_xla.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,18 @@ elif [[ $1 == "tsan" ]]; then
shift
fi

clean_up() {
# clean up nccl- files
rm -rf /dev/shm/nccl-*

# clean up bazel disk_cache
bazel shutdown \
--disk_cache=${BAZEL_DISK_CACHE_DIR} \
--experimental_disk_cache_gc_max_size=100G
}

trap clean_up EXIT

bazel --bazelrc=build_tools/rocm/rocm_xla.bazelrc test \
--config=rocm_ci \
--config=xla_sgpu \
Expand All @@ -147,8 +159,3 @@ bazel --bazelrc=build_tools/rocm/rocm_xla.bazelrc test \
--test_filter=-$(IFS=: ; echo "${EXCLUDED_TESTS[*]}") \
"${SANITIZER_ARGS[@]}" \
"$@"

# clean up bazel disk_cache
bazel shutdown \
--disk_cache=${BAZEL_DISK_CACHE_DIR} \
--experimental_disk_cache_gc_max_size=${BAZEL_DISK_CACHE_SIZE}
12 changes: 12 additions & 0 deletions build_tools/rocm/run_xla_ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,18 @@ for arg in "$@"; do
fi
done

clean_up() {
# clean up nccl- files
rm -rf /dev/shm/nccl-*

# clean up bazel disk_cache
bazel shutdown \
--disk_cache=${BAZEL_DISK_CACHE_DIR} \
--experimental_disk_cache_gc_max_size=100G
}

trap clean_up EXIT

bazel --bazelrc="$SCRIPT_DIR/rocm_xla.bazelrc" test \
--config=rocm_rbe \
--disk_cache=${BAZEL_DISK_CACHE_DIR} \
Expand Down
17 changes: 12 additions & 5 deletions build_tools/rocm/run_xla_multi_gpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@ elif [[ $1 == "tsan" ]]; then
shift
fi

clean_up() {
# clean up nccl- files
rm -rf /dev/shm/nccl-*

# clean up bazel disk_cache
bazel shutdown \
--disk_cache=${BAZEL_DISK_CACHE_DIR} \
--experimental_disk_cache_gc_max_size=100G
}

trap clean_up EXIT

bazel --bazelrc=build_tools/rocm/rocm_xla.bazelrc test \
--config=rocm_ci \
--config=xla_mgpu \
Expand All @@ -124,8 +136,3 @@ bazel --bazelrc=build_tools/rocm/rocm_xla.bazelrc test \
"${SANITIZER_ARGS[@]}" \
"$@" \
--strategy=TestRunner=local # execute multigpu tests locally as there is no gpu exclusive protection on rbe

# clean up bazel disk_cache
bazel shutdown \
--disk_cache=${BAZEL_DISK_CACHE_DIR} \
--experimental_disk_cache_gc_max_size=${BAZEL_DISK_CACHE_SIZE}