Skip to content

Commit

Permalink
Merge pull request #199 from ROCm/run-less-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
charleshofer authored Jan 14, 2025
2 parents c22bed5 + bcc2417 commit ea6903b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rocm-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ jobs:
- name: Run tests
run: |
cd $WORKSPACE_DIR
python3 build/rocm/ci_build test $TEST_IMAGE
python3 build/rocm/ci_build test $TEST_IMAGE --test-cmd "pytest tests/core_test.py"
7 changes: 4 additions & 3 deletions build/rocm/ci_build
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def dist_docker(
subprocess.check_call(cmd)


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

gpu_args = [
Expand Down Expand Up @@ -236,7 +236,7 @@ def test(image_name):
cmd.extend(mounts)
cmd.extend(gpu_args)

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

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

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

elif args.action == "test":
test(args.image_name)
test(args.image_name, args.test_cmd)

elif args.action == "dist_docker":
dist_wheels(
Expand Down

0 comments on commit ea6903b

Please sign in to comment.