From b1d8007ce588bcec035689ac6fefe560676bb00e Mon Sep 17 00:00:00 2001 From: Alexandros Theodoridis Date: Mon, 3 Nov 2025 09:20:00 +0000 Subject: [PATCH] Introduce script which will run all the tests in one command --- build_tools/rocm/run_xla_ci_build.sh | 39 ++++++++++++++++++++++++++++ xla/backends/profiler/gpu/BUILD | 1 + 2 files changed, 40 insertions(+) create mode 100755 build_tools/rocm/run_xla_ci_build.sh diff --git a/build_tools/rocm/run_xla_ci_build.sh b/build_tools/rocm/run_xla_ci_build.sh new file mode 100755 index 0000000000000..12f96c0c42fd3 --- /dev/null +++ b/build_tools/rocm/run_xla_ci_build.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Copyright 2025 The TensorFlow Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============================================================================== + +set -e +set -x + +SCRIPT_DIR=$(realpath $(dirname $0)) +TAG_FILTERS=$($SCRIPT_DIR/rocm_tag_filters.sh),gpu,requires-gpu-amd,-skip_rocprofiler_sdk,-no_oss,-oss_excluded,-oss_serial + +if [ ! -d /tf/pkg ]; then + mkdir -p /tf/pkg +fi + +SCRIPT_DIR=$(dirname $0) +bazel --bazelrc="$SCRIPT_DIR/rocm_xla.bazelrc" test \ + "$@" \ + --build_tag_filters=$TAG_FILTERS \ + --test_tag_filters=$TAG_FILTERS \ + --profile=/tf/pkg/profile.json.gz \ + --keep_going \ + --test_env=TF_TESTS_PER_GPU=1 \ + --action_env=XLA_FLAGS="--xla_gpu_enable_llvm_module_compilation_parallelism=true --xla_gpu_force_compilation_parallelism=16" \ + --test_output=errors \ + --run_under=//build_tools/rocm:exclusive_local_wrapper \ + //xla/... diff --git a/xla/backends/profiler/gpu/BUILD b/xla/backends/profiler/gpu/BUILD index 4a07d8f93af06..a000095700725 100644 --- a/xla/backends/profiler/gpu/BUILD +++ b/xla/backends/profiler/gpu/BUILD @@ -166,6 +166,7 @@ cuda_library( srcs = ["cuda_test.cu.cc"], hdrs = ["cuda_test.h"], visibility = ["//visibility:public"], + tags = ["cuda-only"], deps = [ "@com_google_googletest//:gtest_for_library", "@local_config_cuda//cuda:cuda_headers",