Skip to content

Commit ea6903b

Browse files
authored
Merge pull request #199 from ROCm/run-less-tests
2 parents c22bed5 + bcc2417 commit ea6903b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/rocm-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,5 @@ jobs:
5959
- name: Run tests
6060
run: |
6161
cd $WORKSPACE_DIR
62-
python3 build/rocm/ci_build test $TEST_IMAGE
62+
python3 build/rocm/ci_build test $TEST_IMAGE --test-cmd "pytest tests/core_test.py"
6363

build/rocm/ci_build

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def dist_docker(
202202
subprocess.check_call(cmd)
203203

204204

205-
def test(image_name):
205+
def test(image_name, test_cmd):
206206
"""Run unit tests like CI would inside a JAX image."""
207207

208208
gpu_args = [
@@ -236,7 +236,7 @@ def test(image_name):
236236
cmd.extend(mounts)
237237
cmd.extend(gpu_args)
238238

239-
container_cmd = "cd /jax && ./build/rocm/build_rocm.sh && ./build/rocm/run_single_gpu.py -c && ./build/rocm/run_multi_gpu.sh"
239+
container_cmd = "cd /jax && " + test_cmd
240240
cmd.append(image_name)
241241
cmd.extend(
242242
[
@@ -299,6 +299,7 @@ def parse_args():
299299

300300
testp = subp.add_parser("test")
301301
testp.add_argument("image_name")
302+
testp.add_argument("--test-cmd", default="./build/rocm/build_rocm.sh && ./build/rocm/run_single_gpu.py -c && ./build/rocm/run_multi_gpu.sh")
302303

303304
ddp = subp.add_parser("dist_docker")
304305
ddp.add_argument("--dockerfile", default="build/rocm/Dockerfile.ms")
@@ -322,7 +323,7 @@ def main():
322323
)
323324

324325
elif args.action == "test":
325-
test(args.image_name)
326+
test(args.image_name, args.test_cmd)
326327

327328
elif args.action == "dist_docker":
328329
dist_wheels(

0 commit comments

Comments
 (0)