Skip to content

Commit 55c63c1

Browse files
Revert PR-2016 & Redo "Run Torchtitan ROCm workflow on cron schedule & push to Main branch only" (#2017)
Reverts PR: #2016 Addressing following issues in this PR- - Running Torchtitan ROCm workflow on cron schedule & only when push to Main branch. CUDA workflow will run as is. - Refactor Torchtitan test run to address older PR comment #1786 (comment) Co-authored-by: tianyu-l <150487191+tianyu-l@users.noreply.github.com>
1 parent 2f9b44d commit 55c63c1

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

.github/workflows/integration_test_8gpu_features.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ permissions:
2626

2727
jobs:
2828
build-test:
29-
if: |
30-
matrix.gpu-arch-type == 'cuda' ||
31-
(matrix.gpu-arch-type == 'rocm' &&
32-
(github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'schedule'))
3329
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
3430
strategy:
3531
fail-fast: false
@@ -77,7 +73,8 @@ jobs:
7773
sudo mkdir -p "$RUNNER_TEMP/artifacts-to-be-uploaded"
7874
sudo chown -R $(id -u):$(id -g) "$RUNNER_TEMP/artifacts-to-be-uploaded"
7975
80-
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
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
8178
8279
rm -rf $RUNNER_TEMP/artifacts-to-be-uploaded/*/checkpoint
8380
rm -rf artifacts-to-be-uploaded/*/checkpoint

tests/integration_tests/run_tests.py

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

2727

28+
TEST_WITH_ROCM = os.getenv("TEST_WITH_ROCM", "0") == "1"
29+
30+
2831
def _run_cmd(cmd):
2932
return subprocess.run([cmd], text=True, shell=True)
3033

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

9194
# Skip the test for ROCm
92-
if args.gpu_arch_type == "rocm" and test_flavor.skip_rocm_test:
95+
if TEST_WITH_ROCM and test_flavor.skip_rocm_test:
9396
continue
9497

9598
# Check if we have enough GPUs
@@ -107,12 +110,6 @@ def main():
107110
parser.add_argument(
108111
"output_dir", help="Directory to dump results generated by tests"
109112
)
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-
)
116113
parser.add_argument(
117114
"--test_suite",
118115
default="features",

0 commit comments

Comments
 (0)