Skip to content

Commit ebaf53d

Browse files
committed
test: standardize platform CI runner layout
1 parent 1db5c07 commit ebaf53d

17 files changed

Lines changed: 391 additions & 33 deletions

.github/configs/enflame.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,24 +54,24 @@ nproc_per_node: 2
5454
unit_test_matrix:
5555
- name: pytorch_debug
5656
runner: script
57-
path: tests/plugin/backend/enflame/run_native.sh
57+
path: tests/plugin/backend/enflame/run_unit_tests.sh
5858
args: [debug]
5959

6060
- name: pytorch_unittest
6161
runner: script
62-
path: tests/plugin/backend/enflame/run_native.sh
62+
path: tests/plugin/backend/enflame/run_unit_tests.sh
6363
args: [unittest]
6464

6565
- name: pytorch_distributed_unittest
6666
runner: script
67-
path: tests/plugin/backend/enflame/run_native.sh
67+
path: tests/plugin/backend/enflame/run_unit_tests.sh
6868
args: [distributed]
6969

7070
- name: pytorch_onnx_unittest
7171
runner: script
72-
path: tests/plugin/backend/enflame/run_native.sh
72+
path: tests/plugin/backend/enflame/run_unit_tests.sh
7373
args: [onnx]
7474

7575
integration_test_matrix:
7676
- name: pytorch_mcore_integration
77-
path: tests/plugin/backend/enflame/run_integration.sh
77+
path: tests/plugin/backend/enflame/run_integration_tests.sh

.github/configs/hygon.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,35 +42,35 @@ coverage:
4242
unit_test_matrix:
4343
- name: pytorch_debug
4444
runner: script
45-
path: tests/plugin/backend/hygon/run_native.sh
45+
path: tests/plugin/backend/hygon/run_unit_tests.sh
4646
args: [debug]
4747
env:
4848
XML_LOG_DIR: logs/L0_pytorch_debug_unittest-hygon
4949

5050
- name: pytorch_unittest
5151
runner: script
52-
path: tests/plugin/backend/hygon/run_native.sh
52+
path: tests/plugin/backend/hygon/run_unit_tests.sh
5353
args: [unittest]
5454
env:
5555
XML_LOG_DIR: logs/L0_pytorch_unittest-hygon
5656

5757
- name: pytorch_distributed_unittest
5858
runner: script
59-
path: tests/plugin/backend/hygon/run_native.sh
59+
path: tests/plugin/backend/hygon/run_unit_tests.sh
6060
args: [distributed]
6161
env:
6262
XML_LOG_DIR: logs/L1_pytorch_distributed_unittest-hygon
6363

6464
- name: pytorch_onnx_unittest
6565
runner: script
66-
path: tests/plugin/backend/hygon/run_native.sh
66+
path: tests/plugin/backend/hygon/run_unit_tests.sh
6767
args: [onnx]
6868
env:
6969
XML_LOG_DIR: logs/L1_pytorch_onnx_unittest-hygon
7070

7171
integration_test_matrix:
7272
- name: pytorch_mcore_integration
73-
path: tests/plugin/backend/hygon/run_integration.sh
73+
path: tests/plugin/backend/hygon/run_integration_tests.sh
7474

7575
device_types:
7676
- bw1000

.github/configs/musa.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ coverage:
6060
unit_test_matrix:
6161
- name: pytorch_debug
6262
runner: script
63-
path: tests/plugin/backend/musa/run_native_tests.sh
63+
path: tests/plugin/backend/musa/run_unit_tests.sh
6464
- name: pytorch_unittest
6565
runner: script
66-
path: tests/plugin/backend/musa/run_native_tests.sh
66+
path: tests/plugin/backend/musa/run_unit_tests.sh
6767
- name: pytorch_distributed_utils
6868
runner: script
69-
path: tests/plugin/backend/musa/run_native_tests.sh
69+
path: tests/plugin/backend/musa/run_unit_tests.sh
7070
- name: pytorch_onnx_unittest
7171
runner: script
72-
path: tests/plugin/backend/musa/run_native_tests.sh
72+
path: tests/plugin/backend/musa/run_unit_tests.sh
7373

7474
integration_test_matrix:
7575
- name: pytorch_mcore_integration
76-
path: tests/integration/musa/run_mcore.sh
76+
path: tests/plugin/backend/musa/run_integration_tests.sh

.github/configs/template.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,28 @@ coverage:
4141
- '*/setup.py'
4242
- '*/transformer_engine/plugin/core/_build_config.py'
4343

44-
# A script group preserves an existing QA entry point. A pytest group may
45-
# instead declare pytest_args, env, log_dir, and a list of test steps.
44+
# Platform-owned launchers live under tests/plugin/backend/<platform>/.
45+
# A pytest group may instead declare pytest_args, env, log_dir, and steps.
4646
unit_test_matrix:
4747
- name: pytorch_debug
4848
runner: script
49-
path: qa/L0_pytorch_debug_unittest/test.sh
49+
path: tests/plugin/backend/example/run_unit_tests.sh
50+
args: [debug]
5051
- name: pytorch_unittest
5152
runner: script
52-
path: qa/L0_pytorch_unittest/test.sh
53+
path: tests/plugin/backend/example/run_unit_tests.sh
54+
args: [unittest]
5355
- name: pytorch_distributed_unittest
5456
runner: script
55-
path: qa/L1_pytorch_distributed_unittest/test.sh
57+
path: tests/plugin/backend/example/run_unit_tests.sh
58+
args: [distributed]
5659
- name: pytorch_onnx_unittest
5760
runner: script
58-
path: qa/L1_pytorch_onnx_unittest/test.sh
61+
path: tests/plugin/backend/example/run_unit_tests.sh
62+
args: [onnx]
5963

6064
# Integration groups use the same common workflow. Put test-specific
6165
# environment defaults in the test script, not in the workflow.
6266
integration_test_matrix:
6367
- name: pytorch_mcore_integration
64-
path: qa/L1_pytorch_mcore_integration/test.sh
68+
path: tests/plugin/backend/example/run_integration_tests.sh

qa/L1_pytorch_mcore_integration/test.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,12 @@ else
110110
exit 1
111111
fi
112112

113-
if [ "${DISTRIBUTED_BACKEND}" = "mccl" ]; then
114-
python3 "${TE_PATH}/tests/integration/musa/patch_megatron_mccl.py" "${MCORE_PATH}"
113+
if [ -n "${MCORE_PREPARE_SCRIPT:-}" ]; then
114+
if [ ! -f "${MCORE_PREPARE_SCRIPT}" ]; then
115+
echo "MCore preparation script does not exist: ${MCORE_PREPARE_SCRIPT}" >&2
116+
exit 1
117+
fi
118+
python3 "${MCORE_PREPARE_SCRIPT}" "${MCORE_PATH}"
115119
fi
116120

117121
# Megatron-LM-FL tokenizer imports happen at module import time, so direct

0 commit comments

Comments
 (0)