Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update old test rocm scripts to use new bazelrc files if available #2760

Open
wants to merge 1 commit into
base: develop-upstream
Choose a base branch
from
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
6 changes: 3 additions & 3 deletions tensorflow/tools/ci_build/linux/rocm/run_cpu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,18 @@ if [ -f /usertools/cpu.bazelrc ]; then
--config=pycpp \
--action_env=TF_PYTHON_VERSION=$PYTHON_VERSION \
--local_test_jobs=${N_BUILD_JOBS} \
--test_timeout 920,2400,7200,9600 \
--test_timeout 920,2400,7200,9600 \
--jobs=${N_BUILD_JOBS}
else
yes "" | $PYTHON_BIN_PATH configure.py


# Run bazel test command. Double test timeouts to avoid flakes.
# xla/mlir_hlo/tests/Dialect/gml_st tests disabled in 09/08/22 sync
bazel test \
-k \
--test_tag_filters=-no_oss,-oss_excluded,-oss_serial,-gpu,-multi_gpu,-tpu,-cuda-only,-benchmark-test,-v1only \
--test_lang_filters=cc,py \
--jobs=30 \
--jobs=30 \
--local_ram_resources=60000 \
--local_cpu_resources=15 \
--local_test_jobs=${N_BUILD_JOBS} \
Expand All @@ -67,6 +66,7 @@ else
--test_env=TF_PYTHON_VERSION=$PYTHON_VERSION \
-- \
//tensorflow/... \
-//tensorflow/python/integration_testing/... \
-//tensorflow/compiler/tf2tensorrt/... \
-//tensorflow/core/tpu/... \
-//tensorflow/lite/... \
Expand Down
2 changes: 1 addition & 1 deletion tensorflow/tools/ci_build/linux/rocm/run_gpu_multi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ else
bazel test \
--config=rocm \
-k \
--test_tag_filters=-no_gpu,-cuda-only \
--test_tag_filters=-no_gpu,-cuda-only,-no_rocm \

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is no_rocm added here?

--jobs=30 \
--local_ram_resources=60000 \
--local_cpu_resources=15 \
Expand Down
77 changes: 55 additions & 22 deletions tensorflow/tools/ci_build/linux/rocm/run_gpu_single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,59 @@ export TF_PYTHON_VERSION=$PYTHON_VERSION
export TF_NEED_ROCM=1
export ROCM_PATH=$ROCM_INSTALL_DIR

yes "" | $PYTHON_BIN_PATH configure.py
if [ -f /usertools/rocm.bazelrc ]; then
# Use the bazelrc files in /usertools if available
if [ ! -d /tf ];then
# The bazelrc files in /usertools expect /tf to exist
mkdir /tf
fi
bazel \
--bazelrc=/usertools/rocm.bazelrc \
test \
--jobs=30 \
--local_ram_resources=60000 \
--local_cpu_resources=15 \
--local_test_jobs=${N_TEST_JOBS} \
--config=sigbuild_local_cache \
--config=rocm \
--config=pycpp \
--action_env=OPENBLAS_CORETYPE=Haswell \
--action_env=TF_PYTHON_VERSION=$PYTHON_VERSION \
--action_env=TF_ENABLE_ONEDNN_OPTS=0 \
--test_env=TF_TESTS_PER_GPU=$TF_TESTS_PER_GPU \
--test_env=TF_GPU_COUNT=$TF_GPU_COUNT \
--test_env=MIOPEN_DEBUG_CONV_WINOGRAD=0
else
# Legacy style: run configure then build
yes "" | $PYTHON_BIN_PATH configure.py

# Run bazel test command. Double test timeouts to avoid flakes.
bazel test \
--config=rocm \
-k \
--test_tag_filters=gpu,-no_oss,-oss_excluded,-oss_serial,-no_gpu,-cuda-only,-benchmark-test,-rocm_multi_gpu,-tpu,-v1only \
--jobs=${N_BUILD_JOBS} \
--local_test_jobs=${N_TEST_JOBS} \
--test_env=TF_GPU_COUNT=$TF_GPU_COUNT \
--test_env=TF_TESTS_PER_GPU=$TF_TESTS_PER_GPU \
--test_env=MIOPEN_DEBUG_CONV_WINOGRAD=0 \
--test_timeout 600,900,2400,7200 \
--build_tests_only \
--test_output=errors \
--test_sharding_strategy=disabled \
--test_size_filters=small,medium,large \
--run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute \
-- \
//tensorflow/... \
-//tensorflow/core/tpu/... \
-//tensorflow/lite/... \
-//tensorflow/compiler/tf2tensorrt/... \
# Run bazel test command. Double test timeouts to avoid flakes.
bazel test \
--config=rocm \
-k \
--test_tag_filters=gpu,-no_oss,-oss_excluded,-oss_serial,-no_gpu,-no_rocm,-benchmark-test,-rocm_multi_gpu,-tpu,-v1only \
--jobs=30 \
--local_ram_resources=60000 \
--local_cpu_resources=15 \
--local_test_jobs=${N_TEST_JOBS} \
--test_env=TF_GPU_COUNT=$TF_GPU_COUNT \
--test_env=TF_TESTS_PER_GPU=$TF_TESTS_PER_GPU \
--test_env=HSA_TOOLS_LIB=libroctracer64.so \
--test_env=TF_PYTHON_VERSION=$PYTHON_VERSION \
--test_env=MIOPEN_DEBUG_CONV_WINOGRAD=0 \
--action_env=OPENBLAS_CORETYPE=Haswell \
--action_env=TF_ENABLE_ONEDNN_OPTS=0 \
--test_timeout 920,2400,7200,9600 \
--build_tests_only \
--test_output=errors \
--test_sharding_strategy=disabled \
--test_size_filters=small,medium,large \
--run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute \
-- \
//tensorflow/... \
-//tensorflow/python/integration_testing/... \
-//tensorflow/core/tpu/... \
-//tensorflow/lite/... \
-//tensorflow/compiler/tf2tensorrt/... \
-//tensorflow/dtensor/python/tests:multi_client_test_nccl_2gpus
fi