From 34da50b0665bd521ee98d8315515509ea70fbea0 Mon Sep 17 00:00:00 2001 From: Aswin Zayasankaran <156493059+Aswinmcw@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:07:24 +0530 Subject: [PATCH] #14095: Move ccl unit tests to separate directory (#14096) --- tests/nightly/t3000/ccl/test_all_gather_nightly.py | 2 +- tests/nightly/t3000/ccl/test_reduce_scatter_nightly.py | 2 +- tests/scripts/run_profiler_regressions.sh | 2 +- tests/scripts/t3000/run_t3000_frequent_tests.sh | 8 ++++---- tests/scripts/tg/run_tg_frequent_tests.sh | 2 +- tests/scripts/tg/run_tg_nightly_tests.sh | 2 +- tests/sweep_framework/sweeps/ccl/all_gather_n300.py | 2 +- tests/sweep_framework/sweeps/ccl/line_all_gather.py | 2 +- .../unit_tests/operations/{ => ccl}/test_all_gather.py | 0 .../{ => ccl}/test_all_gather_N300_post_commit.py | 2 +- .../operations/{ => ccl}/test_all_gather_TG_nightly.py | 2 +- .../{ => ccl}/test_all_gather_TG_post_commit.py | 0 .../{ => ccl}/test_all_gather_llama_perf_sweep.py | 2 +- .../operations/{ => ccl}/test_all_gather_matmul.py | 2 +- .../operations/{ => ccl}/test_all_gather_nightly.py | 2 +- .../{ => ccl}/test_all_reduce_t3000_frequent.py | 0 .../{ => ccl}/test_reduce_scatter_N300_post_commit.py | 2 +- .../{ => ccl}/test_reduce_scatter_llama_perf_sweep.py | 2 +- .../operations/{ => ccl}/test_reduce_scatter_nightly.py | 2 +- .../{ => ccl}/test_reduce_scatter_post_commit.py | 0 20 files changed, 19 insertions(+), 19 deletions(-) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_all_gather.py (100%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_all_gather_N300_post_commit.py (98%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_all_gather_TG_nightly.py (99%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_all_gather_TG_post_commit.py (100%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_all_gather_llama_perf_sweep.py (96%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_all_gather_matmul.py (99%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_all_gather_nightly.py (99%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_all_reduce_t3000_frequent.py (100%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_reduce_scatter_N300_post_commit.py (97%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_reduce_scatter_llama_perf_sweep.py (96%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_reduce_scatter_nightly.py (98%) rename tests/ttnn/unit_tests/operations/{ => ccl}/test_reduce_scatter_post_commit.py (100%) diff --git a/tests/nightly/t3000/ccl/test_all_gather_nightly.py b/tests/nightly/t3000/ccl/test_all_gather_nightly.py index aac1d03976f..cd4db90fe33 120000 --- a/tests/nightly/t3000/ccl/test_all_gather_nightly.py +++ b/tests/nightly/t3000/ccl/test_all_gather_nightly.py @@ -1 +1 @@ -../../../ttnn/unit_tests/operations/test_all_gather_nightly.py \ No newline at end of file +../../../ttnn/unit_tests/operations/ccl/test_all_gather_nightly.py \ No newline at end of file diff --git a/tests/nightly/t3000/ccl/test_reduce_scatter_nightly.py b/tests/nightly/t3000/ccl/test_reduce_scatter_nightly.py index c81311d44f0..9c987b80293 120000 --- a/tests/nightly/t3000/ccl/test_reduce_scatter_nightly.py +++ b/tests/nightly/t3000/ccl/test_reduce_scatter_nightly.py @@ -1 +1 @@ -../../../ttnn/unit_tests/operations/test_reduce_scatter_nightly.py \ No newline at end of file +../../../ttnn/unit_tests/operations/ccl/test_reduce_scatter_nightly.py \ No newline at end of file diff --git a/tests/scripts/run_profiler_regressions.sh b/tests/scripts/run_profiler_regressions.sh index c11c9ea95f0..5977e761a78 100755 --- a/tests/scripts/run_profiler_regressions.sh +++ b/tests/scripts/run_profiler_regressions.sh @@ -8,7 +8,7 @@ run_additional_T3000_test(){ remove_default_log_locations mkdir -p $PROFILER_ARTIFACTS_DIR - ./tt_metal/tools/profiler/profile_this.py -c "'pytest tests/ttnn/unit_tests/operations/test_all_gather.py::test_all_gather_on_t3000_post_commit_for_profiler_regression'" | tee $PROFILER_ARTIFACTS_DIR/test_out.log + ./tt_metal/tools/profiler/profile_this.py -c "'pytest tests/ttnn/unit_tests/operations/ccl/test_all_gather.py::test_all_gather_on_t3000_post_commit_for_profiler_regression'" | tee $PROFILER_ARTIFACTS_DIR/test_out.log if cat $PROFILER_ARTIFACTS_DIR/test_out.log | grep "SKIPPED" then diff --git a/tests/scripts/t3000/run_t3000_frequent_tests.sh b/tests/scripts/t3000/run_t3000_frequent_tests.sh index 3669e5be390..468e6757845 100755 --- a/tests/scripts/t3000/run_t3000_frequent_tests.sh +++ b/tests/scripts/t3000/run_t3000_frequent_tests.sh @@ -102,10 +102,10 @@ run_t3000_tteager_tests() { echo "LOG_METAL: Running run_t3000_tteager_tests" - pytest -n auto tests/ttnn/unit_tests/operations/test_all_gather.py -k post_commit ; fail+=$? - pytest -n auto tests/ttnn/unit_tests/operations/test_all_gather_matmul.py -k post_commit ; fail+=$? - pytest -n auto tests/ttnn/unit_tests/operations/test_reduce_scatter_post_commit.py ; fail+=$? - pytest -n auto tests/ttnn/unit_tests/operations/test_all_reduce_t3000_frequent.py ; fail+=$? + pytest -n auto tests/ttnn/unit_tests/operations/ccl/test_all_gather.py -k post_commit ; fail+=$? + pytest -n auto tests/ttnn/unit_tests/operations/ccl/test_all_gather_matmul.py -k post_commit ; fail+=$? + pytest -n auto tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_post_commit.py ; fail+=$? + pytest -n auto tests/ttnn/unit_tests/operations/ccl/test_all_reduce_t3000_frequent.py ; fail+=$? # distributed layernorm WH_ARCH_YAML=wormhole_b0_80_arch_eth_dispatch.yaml pytest tests/ttnn/unit_tests/operations/test_distributed_layernorm.py ; fail+=$? diff --git a/tests/scripts/tg/run_tg_frequent_tests.sh b/tests/scripts/tg/run_tg_frequent_tests.sh index 77525f70631..fa6ec24f82c 100755 --- a/tests/scripts/tg/run_tg_frequent_tests.sh +++ b/tests/scripts/tg/run_tg_frequent_tests.sh @@ -12,7 +12,7 @@ run_tg_tests() { pytest -n auto models/demos/tg/llama3_70b/tests/test_llama_decoder_galaxy.py --timeout=600 ; fail+=$? pytest -n auto models/demos/tg/llama3_70b/tests/test_llama_model_galaxy_ci.py --timeout=800 ; fail+=$? pytest -n auto models/demos/tg/resnet50/tests/test_resnet50_performant.py ; fail+=$? - pytest -n auto tests/ttnn/unit_tests/operations/test_all_gather_TG_post_commit.py --timeout=300 ; fail+=$? + pytest -n auto tests/ttnn/unit_tests/operations/ccl/test_all_gather_TG_post_commit.py --timeout=300 ; fail+=$? if [[ $fail -ne 0 ]]; then echo "LOG_METAL: run_tg_frequent_tests failed" diff --git a/tests/scripts/tg/run_tg_nightly_tests.sh b/tests/scripts/tg/run_tg_nightly_tests.sh index 6810e5b58d4..1bcf876a66e 100755 --- a/tests/scripts/tg/run_tg_nightly_tests.sh +++ b/tests/scripts/tg/run_tg_nightly_tests.sh @@ -7,7 +7,7 @@ run_tg_llama3_70b_tests() { echo "LOG_METAL: Running run_tg_llama3_70b_tests" - pytest tests/ttnn/unit_tests/operations/test_all_gather_TG_nightly.py ; fail+=$? + pytest tests/ttnn/unit_tests/operations/ccl/test_all_gather_TG_nightly.py ; fail+=$? # Falcon40B prefill 60 layer end to end with 10 loops; we need 8x8 grid size pytest tests/nightly/tg/models/demos/tg/llama3_70b ; fail+=$? diff --git a/tests/sweep_framework/sweeps/ccl/all_gather_n300.py b/tests/sweep_framework/sweeps/ccl/all_gather_n300.py index 61de4ba164c..7d899eb5edb 100644 --- a/tests/sweep_framework/sweeps/ccl/all_gather_n300.py +++ b/tests/sweep_framework/sweeps/ccl/all_gather_n300.py @@ -11,7 +11,7 @@ from tests.ttnn.utils_for_testing import start_measuring_time, stop_measuring_time from loguru import logger from tests.tt_eager.python_api_testing.sweep_tests.comparison_funcs import comp_equal, comp_pcc -from tests.ttnn.unit_tests.operations.test_all_gather import is_unsupported_case_n300 +from tests.ttnn.unit_tests.operations.ccl.test_all_gather import is_unsupported_case_n300 # Override the default timeout in seconds for hang detection. TIMEOUT = 30 diff --git a/tests/sweep_framework/sweeps/ccl/line_all_gather.py b/tests/sweep_framework/sweeps/ccl/line_all_gather.py index c99da0c0f35..f6a621a338f 100644 --- a/tests/sweep_framework/sweeps/ccl/line_all_gather.py +++ b/tests/sweep_framework/sweeps/ccl/line_all_gather.py @@ -11,7 +11,7 @@ from tests.ttnn.utils_for_testing import start_measuring_time, stop_measuring_time from loguru import logger from tests.tt_eager.python_api_testing.sweep_tests.comparison_funcs import comp_equal, comp_pcc -from tests.ttnn.unit_tests.operations.test_all_gather import is_unsupported_case +from tests.ttnn.unit_tests.operations.ccl.test_all_gather import is_unsupported_case from ttnn import ShardTensorToMesh # Override the default timeout in seconds for hang detection. diff --git a/tests/ttnn/unit_tests/operations/test_all_gather.py b/tests/ttnn/unit_tests/operations/ccl/test_all_gather.py similarity index 100% rename from tests/ttnn/unit_tests/operations/test_all_gather.py rename to tests/ttnn/unit_tests/operations/ccl/test_all_gather.py diff --git a/tests/ttnn/unit_tests/operations/test_all_gather_N300_post_commit.py b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_N300_post_commit.py similarity index 98% rename from tests/ttnn/unit_tests/operations/test_all_gather_N300_post_commit.py rename to tests/ttnn/unit_tests/operations/ccl/test_all_gather_N300_post_commit.py index 9ec6de69203..2b4c81d6171 100644 --- a/tests/ttnn/unit_tests/operations/test_all_gather_N300_post_commit.py +++ b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_N300_post_commit.py @@ -5,7 +5,7 @@ import pytest import ttnn from models.utility_functions import skip_for_grayskull -from tests.ttnn.unit_tests.operations.test_all_gather import ( +from tests.ttnn.unit_tests.operations.ccl.test_all_gather import ( run_all_gather_on_n300_impl, run_all_gather_sharded_n300, ) diff --git a/tests/ttnn/unit_tests/operations/test_all_gather_TG_nightly.py b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_TG_nightly.py similarity index 99% rename from tests/ttnn/unit_tests/operations/test_all_gather_TG_nightly.py rename to tests/ttnn/unit_tests/operations/ccl/test_all_gather_TG_nightly.py index c982be2bd9b..4af6dbaf9ca 100644 --- a/tests/ttnn/unit_tests/operations/test_all_gather_TG_nightly.py +++ b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_TG_nightly.py @@ -7,7 +7,7 @@ from loguru import logger import ttnn from tests.tt_eager.python_api_testing.sweep_tests.comparison_funcs import comp_equal, comp_pcc -from tests.ttnn.unit_tests.operations.test_all_gather_TG_post_commit import ( +from tests.ttnn.unit_tests.operations.ccl.test_all_gather_TG_post_commit import ( run_line_all_gather_on_TG_with_mesh_tensor_along_rows, ) from models.utility_functions import skip_for_grayskull diff --git a/tests/ttnn/unit_tests/operations/test_all_gather_TG_post_commit.py b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_TG_post_commit.py similarity index 100% rename from tests/ttnn/unit_tests/operations/test_all_gather_TG_post_commit.py rename to tests/ttnn/unit_tests/operations/ccl/test_all_gather_TG_post_commit.py diff --git a/tests/ttnn/unit_tests/operations/test_all_gather_llama_perf_sweep.py b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_llama_perf_sweep.py similarity index 96% rename from tests/ttnn/unit_tests/operations/test_all_gather_llama_perf_sweep.py rename to tests/ttnn/unit_tests/operations/ccl/test_all_gather_llama_perf_sweep.py index 4fd50b39716..4357e6996d9 100644 --- a/tests/ttnn/unit_tests/operations/test_all_gather_llama_perf_sweep.py +++ b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_llama_perf_sweep.py @@ -10,7 +10,7 @@ from models.utility_functions import skip_for_grayskull, get_devices_for_t3000 import itertools from ttnn import ShardTensorToMesh -from tests.ttnn.unit_tests.operations.test_all_gather import run_all_gather_sharded +from tests.ttnn.unit_tests.operations.ccl.test_all_gather import run_all_gather_sharded @pytest.mark.timeout(120) diff --git a/tests/ttnn/unit_tests/operations/test_all_gather_matmul.py b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_matmul.py similarity index 99% rename from tests/ttnn/unit_tests/operations/test_all_gather_matmul.py rename to tests/ttnn/unit_tests/operations/ccl/test_all_gather_matmul.py index 40ddcfec659..67348a92671 100644 --- a/tests/ttnn/unit_tests/operations/test_all_gather_matmul.py +++ b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_matmul.py @@ -9,7 +9,7 @@ from ttnn import ShardTensorToMesh, ConcatMeshToTensor from tests.tt_eager.python_api_testing.sweep_tests.comparison_funcs import comp_equal, comp_pcc from models.utility_functions import skip_for_grayskull, skip_for_wormhole_b0 -from tests.ttnn.unit_tests.operations.test_all_gather import is_unsupported_case +from tests.ttnn.unit_tests.operations.ccl.test_all_gather import is_unsupported_case USE_NON_FUSED = False diff --git a/tests/ttnn/unit_tests/operations/test_all_gather_nightly.py b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_nightly.py similarity index 99% rename from tests/ttnn/unit_tests/operations/test_all_gather_nightly.py rename to tests/ttnn/unit_tests/operations/ccl/test_all_gather_nightly.py index cfdf32d6a76..5a95841eb34 100644 --- a/tests/ttnn/unit_tests/operations/test_all_gather_nightly.py +++ b/tests/ttnn/unit_tests/operations/ccl/test_all_gather_nightly.py @@ -8,7 +8,7 @@ import ttnn from tests.tt_eager.python_api_testing.sweep_tests.comparison_funcs import comp_equal, comp_pcc from models.utility_functions import skip_for_grayskull -from tests.ttnn.unit_tests.operations.test_all_gather import ( +from tests.ttnn.unit_tests.operations.ccl.test_all_gather import ( is_unsupported_case, run_all_gather_on_t3000_impl, ) diff --git a/tests/ttnn/unit_tests/operations/test_all_reduce_t3000_frequent.py b/tests/ttnn/unit_tests/operations/ccl/test_all_reduce_t3000_frequent.py similarity index 100% rename from tests/ttnn/unit_tests/operations/test_all_reduce_t3000_frequent.py rename to tests/ttnn/unit_tests/operations/ccl/test_all_reduce_t3000_frequent.py diff --git a/tests/ttnn/unit_tests/operations/test_reduce_scatter_N300_post_commit.py b/tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_N300_post_commit.py similarity index 97% rename from tests/ttnn/unit_tests/operations/test_reduce_scatter_N300_post_commit.py rename to tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_N300_post_commit.py index 44604c19d25..c34c4fd6191 100644 --- a/tests/ttnn/unit_tests/operations/test_reduce_scatter_N300_post_commit.py +++ b/tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_N300_post_commit.py @@ -5,7 +5,7 @@ import pytest import ttnn from models.utility_functions import skip_for_grayskull -from tests.ttnn.unit_tests.operations.test_reduce_scatter_post_commit import ( +from tests.ttnn.unit_tests.operations.ccl.test_reduce_scatter_post_commit import ( run_reduce_scatter_test, run_reduce_scatter_sharded_test, ) diff --git a/tests/ttnn/unit_tests/operations/test_reduce_scatter_llama_perf_sweep.py b/tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_llama_perf_sweep.py similarity index 96% rename from tests/ttnn/unit_tests/operations/test_reduce_scatter_llama_perf_sweep.py rename to tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_llama_perf_sweep.py index bfee281eb3b..4d50577a004 100644 --- a/tests/ttnn/unit_tests/operations/test_reduce_scatter_llama_perf_sweep.py +++ b/tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_llama_perf_sweep.py @@ -8,7 +8,7 @@ import ttnn from tests.tt_eager.python_api_testing.sweep_tests.comparison_funcs import comp_equal, comp_pcc from models.utility_functions import skip_for_grayskull, get_devices_for_t3000 -from tests.ttnn.unit_tests.operations.test_reduce_scatter_post_commit import run_reduce_scatter_sharded_test +from tests.ttnn.unit_tests.operations.ccl.test_reduce_scatter_post_commit import run_reduce_scatter_sharded_test @pytest.mark.timeout(120) diff --git a/tests/ttnn/unit_tests/operations/test_reduce_scatter_nightly.py b/tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_nightly.py similarity index 98% rename from tests/ttnn/unit_tests/operations/test_reduce_scatter_nightly.py rename to tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_nightly.py index 26764654088..17eee107972 100644 --- a/tests/ttnn/unit_tests/operations/test_reduce_scatter_nightly.py +++ b/tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_nightly.py @@ -4,7 +4,7 @@ import pytest import ttnn -from tests.ttnn.unit_tests.operations.test_reduce_scatter_post_commit import ( +from tests.ttnn.unit_tests.operations.ccl.test_reduce_scatter_post_commit import ( run_reduce_scatter_test, ) from models.utility_functions import skip_for_grayskull diff --git a/tests/ttnn/unit_tests/operations/test_reduce_scatter_post_commit.py b/tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_post_commit.py similarity index 100% rename from tests/ttnn/unit_tests/operations/test_reduce_scatter_post_commit.py rename to tests/ttnn/unit_tests/operations/ccl/test_reduce_scatter_post_commit.py