Skip to content

Commit a779e8c

Browse files
committed
Replaced TEST_WITH_ROCM environment variable with gpu_arch_type argument to run_tests.py.
1 parent 55c63c1 commit a779e8c

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

.github/workflows/integration_test_8gpu_features.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ jobs:
7373
sudo mkdir -p "$RUNNER_TEMP/artifacts-to-be-uploaded"
7474
sudo chown -R $(id -u):$(id -g) "$RUNNER_TEMP/artifacts-to-be-uploaded"
7575
76-
export TEST_WITH_ROCM=$([[ "${{ matrix.gpu-arch-type }}" == "rocm" ]] && echo 1 || echo 0)
77-
python -m tests.integration_tests.run_tests --test_suite features $RUNNER_TEMP/artifacts-to-be-uploaded --ngpu 8
76+
python -m tests.integration_tests.run_tests --gpu_arch_type ${{ matrix.gpu-arch-type }} --test_suite features $RUNNER_TEMP/artifacts-to-be-uploaded --ngpu 8
7877
7978
rm -rf $RUNNER_TEMP/artifacts-to-be-uploaded/*/checkpoint
8079
rm -rf artifacts-to-be-uploaded/*/checkpoint

tests/integration_tests/run_tests.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@
2525
}
2626

2727

28-
TEST_WITH_ROCM = os.getenv("TEST_WITH_ROCM", "0") == "1"
29-
30-
3128
def _run_cmd(cmd):
3229
return subprocess.run([cmd], text=True, shell=True)
3330

@@ -92,7 +89,7 @@ def run_tests(args, test_list: list[OverrideDefinitions]):
9289
continue
9390

9491
# Skip the test for ROCm
95-
if TEST_WITH_ROCM and test_flavor.skip_rocm_test:
92+
if args.gpu_arch_type == "rocm" and test_flavor.skip_rocm_test:
9693
continue
9794

9895
# Check if we have enough GPUs
@@ -110,6 +107,12 @@ def main():
110107
parser.add_argument(
111108
"output_dir", help="Directory to dump results generated by tests"
112109
)
110+
parser.add_argument(
111+
"--gpu_arch_type",
112+
default="cuda",
113+
choices=["cuda", "rocm"],
114+
help="GPU architecture type. Must be specified as either 'cuda' or 'rocm'.",
115+
)
113116
parser.add_argument(
114117
"--test_suite",
115118
default="features",

0 commit comments

Comments
 (0)