Skip to content

Commit 2793c7f

Browse files
runwangdlclaude
andcommitted
test(promote): add training promote e2e regression for MobileNetV1 + CCT
Adds a new CI job `siracusa-training-tiled-promote` that runs MobileNetV1 and CCT training with PromoteTensorsToL2 enabled. Each model is tested in two configurations: - "off" (baseline, no promotion) - "cycle-aware" with includeActivations=True (full promote) This catches regressions in the promote-for-training code path that was validated in this branch: MobileNetV1: 332M cycles (-19.9% vs 414M baseline), 0/4 PASS CCT: 450M cycles (-14.8% vs 528M baseline), 4/4 baseline pytest marker: `promote and training` (new combination). CI workflow: ci-platform-siracusa-tiled.yml. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2617205 commit 2793c7f

3 files changed

Lines changed: 61 additions & 0 deletions

File tree

.github/workflows/ci-platform-siracusa-tiled.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,12 @@ jobs:
5555
runner: ${{ needs.select-env.outputs.runner }}
5656
docker-image: ${{ needs.select-env.outputs.image }}
5757
pytest-marker: "promote and not training"
58+
59+
# Training L3 + PromoteTensorsToL2 regression (MobileNetV1 + CCT)
60+
siracusa-training-tiled-promote:
61+
needs: select-env
62+
uses: ./.github/workflows/_runner-siracusa-tiled.yml
63+
with:
64+
runner: ${{ needs.select-env.outputs.runner }}
65+
docker-image: ${{ needs.select-env.outputs.image }}
66+
pytest-marker: "promote and training"

DeeployTest/test_platforms.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
from test_siracusa_tiled_config import L3_DOUBLEBUFFER_MODELS, L3_SINGLEBUFFER_MODELS
4242
from test_siracusa_tiled_config import L3_SINGLEBUFFER_PROMOTE_MODELS as SIRACUSA_L3_SINGLEBUFFER_PROMOTE_MODELS
4343
from test_siracusa_tiled_config import L3_SINGLEBUFFER_TRAINING_MODELS as SIRACUSA_L3_SINGLEBUFFER_TRAINING_MODELS
44+
from test_siracusa_tiled_config import L3_SINGLEBUFFER_TRAINING_PROMOTE_MODELS as SIRACUSA_L3_SINGLEBUFFER_TRAINING_PROMOTE_MODELS
4445
from test_siracusa_tiled_config import TRAINING_MODEL_OVERRIDES as SIRACUSA_TRAINING_MODEL_OVERRIDES
4546
from test_snitch_config import DEFAULT_NUM_CORES as SNITCH_DEFAULT_NUM_CORES
4647
from test_snitch_config import KERNEL_TESTS as SNITCH_KERNEL_TESTS
@@ -415,6 +416,43 @@ def test_siracusa_tiled_training_l3_singlebuffer(test_params, deeploy_test_dir,
415416
run_and_assert_test(test_name, config, skipgen, skipsim)
416417

417418

419+
@pytest.mark.promote
420+
@pytest.mark.training
421+
@pytest.mark.siracusa_tiled
422+
@pytest.mark.l3
423+
@pytest.mark.singlebuffer
424+
@pytest.mark.parametrize(
425+
"test_params",
426+
_generate_promote_test_params(SIRACUSA_L3_SINGLEBUFFER_TRAINING_PROMOTE_MODELS),
427+
ids = _promote_param_id,
428+
)
429+
def test_siracusa_tiled_training_promote_l3_singlebuffer(test_params, deeploy_test_dir, toolchain, toolchain_dir,
430+
cmake_args, skipgen, skipsim) -> None:
431+
"""L3 training + PromoteTensorsToL2 regression (MobileNetV1 + CCT)."""
432+
test_name, l1, strategy, include_acts, promote = test_params
433+
overrides = SIRACUSA_TRAINING_MODEL_OVERRIDES.get(test_name, {})
434+
config = create_test_config(
435+
test_name = test_name,
436+
platform = "Siracusa",
437+
simulator = "gvsoc",
438+
deeploy_test_dir = deeploy_test_dir,
439+
toolchain = toolchain,
440+
toolchain_dir = toolchain_dir,
441+
cmake_args = cmake_args,
442+
tiling = True,
443+
cores = SIRACUSA_DEFAULT_CORES,
444+
l1 = l1,
445+
default_mem_level = "L3",
446+
double_buffer = False,
447+
training = True,
448+
training_num_data_inputs = overrides.get("num_data_inputs"),
449+
training_tolerance = overrides.get("tolerance"),
450+
promote_to_l2 = promote,
451+
promote_to_l2_strategy = strategy if promote else "cycle-aware",
452+
)
453+
run_and_assert_test(test_name, config, skipgen, skipsim)
454+
455+
418456
@pytest.mark.siracusa_tiled
419457
@pytest.mark.kernels
420458
@pytest.mark.singlebuffer

DeeployTest/test_siracusa_tiled_config.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,20 @@
198198
},
199199
}
200200

201+
# Training models tested with PromoteTensorsToL2.
202+
# Same shape as the inference promote dict: test path -> list of
203+
# (l1, strategy, includeActivations). "off" = baseline (no promotion).
204+
L3_SINGLEBUFFER_TRAINING_PROMOTE_MODELS = {
205+
"Models/Training/MobileNetV1/mobilenetv1_train": [
206+
(128000, "off", False),
207+
(128000, "cycle-aware", True),
208+
],
209+
"Models/Training/CCT/cct_train": [
210+
(128000, "off", False),
211+
(128000, "cycle-aware", True),
212+
],
213+
}
214+
201215
# Inference models tested with PromoteTensorsToL2.
202216
# Each entry maps test path -> list of (l1, strategy, includeActivations).
203217
# "off" strategy = no promotion (baseline for cycle comparison).

0 commit comments

Comments
 (0)