|
3 | 3 | # SPDX-License-Identifier: Apache-2.0 |
4 | 4 |
|
5 | 5 | import pytest |
6 | | -from pathlib import Path |
7 | | -from test_siracusa_train_config import DEFAULT_CORES as SIRACUSA_TRAIN_DEFAULT_CORES |
8 | | -from test_siracusa_train_config import TRAINING_TESTS as SIRACUSA_TRAINING_TESTS |
9 | | -from testUtils.pytestRunner import create_training_test_config |
10 | 6 | # Import platform-specific test configurations |
11 | 7 | from test_chimera_config import KERNEL_TESTS as CHIMERA_KERNEL_TESTS |
12 | 8 | from test_chimera_config import MODEL_TESTS as CHIMERA_MODEL_TESTS |
|
46 | 42 | from test_softhier_config import DEFAULT_NUM_CLUSTERS as SOFTHIER_DEFAULT_NUM_CLUSTERS |
47 | 43 | from test_softhier_config import KERNEL_TESTS as SOFTHIER_KERNEL_TESTS |
48 | 44 | from test_softhier_config import MODEL_TESTS as SOFTHIER_MODEL_TESTS |
49 | | -from testUtils.pytestRunner import create_test_config, get_worker_id, run_and_assert_test |
| 45 | +from testUtils.pytestRunner import create_test_config, run_and_assert_test |
50 | 46 |
|
51 | 47 |
|
52 | 48 | def generate_test_params(test_dict, config_name): |
@@ -751,58 +747,6 @@ def test_siracusa_neureka_tiled_models_l3_doublebuffer_wmem(test_params, deeploy |
751 | 747 | run_and_assert_test(test_name, config, skipgen, skipsim) |
752 | 748 |
|
753 | 749 |
|
754 | | -@pytest.mark.siracusa_train |
755 | | -@pytest.mark.models |
756 | | -@pytest.mark.parametrize("test_name", list(SIRACUSA_TRAINING_TESTS.keys()), |
757 | | - ids = list(SIRACUSA_TRAINING_TESTS.keys())) |
758 | | -def test_siracusa_train_models(test_name, deeploy_test_dir, toolchain, toolchain_dir, cmake_args, skipgen, |
759 | | - skipsim) -> None: |
760 | | - n_steps, n_accum, num_data = SIRACUSA_TRAINING_TESTS[test_name] |
761 | | - |
762 | | - # simplemlp_train uses external path (not under DeeployTest/Tests/) |
763 | | - if test_name == "Models/SimpleMLP_Train": |
764 | | - ext_test_dir = "/app/Onnx4Deeploy/onnx/model/simplemlp_train" |
765 | | - platform = "Siracusa" |
766 | | - gen_dir = str(Path(deeploy_test_dir) / f"TEST_{platform.upper()}" / "simplemlp_train") |
767 | | - worker_id = get_worker_id() |
768 | | - if worker_id == "master": |
769 | | - build_dir = str(Path(deeploy_test_dir) / f"TEST_{platform.upper()}" / "build_master") |
770 | | - else: |
771 | | - build_dir = str(Path(deeploy_test_dir) / f"TEST_{platform.upper()}" / f"build_{worker_id}") |
772 | | - |
773 | | - from testUtils.core.config import DeeployTestConfig |
774 | | - config = DeeployTestConfig( |
775 | | - test_name = "simplemlp_train", |
776 | | - test_dir = ext_test_dir, |
777 | | - platform = platform, |
778 | | - simulator = "gvsoc", |
779 | | - tiling = False, |
780 | | - gen_dir = gen_dir, |
781 | | - build_dir = build_dir, |
782 | | - toolchain = toolchain, |
783 | | - toolchain_install_dir = toolchain_dir, |
784 | | - cmake_args = list(cmake_args) + [f"NUM_CORES={SIRACUSA_TRAIN_DEFAULT_CORES}"], |
785 | | - gen_args = [f"--cores={SIRACUSA_TRAIN_DEFAULT_CORES}"], |
786 | | - training = True, |
787 | | - n_train_steps = n_steps, |
788 | | - n_accum_steps = n_accum, |
789 | | - training_num_data_inputs = num_data, |
790 | | - ) |
791 | | - else: |
792 | | - config = create_training_test_config( |
793 | | - test_name = test_name, |
794 | | - platform = "Siracusa", |
795 | | - simulator = "gvsoc", |
796 | | - deeploy_test_dir = deeploy_test_dir, |
797 | | - toolchain = toolchain, |
798 | | - toolchain_dir = toolchain_dir, |
799 | | - cmake_args = cmake_args, |
800 | | - cores = SIRACUSA_TRAIN_DEFAULT_CORES, |
801 | | - n_train_steps = n_steps, |
802 | | - n_accum_steps = n_accum, |
803 | | - training_num_data_inputs = num_data, |
804 | | - ) |
805 | | - |
806 | 750 | @pytest.mark.gap9 |
807 | 751 | @pytest.mark.kernels |
808 | 752 | @pytest.mark.parametrize("test_name", GAP9_KERNEL_TESTS, ids = GAP9_KERNEL_TESTS) |
|
0 commit comments