Skip to content

Add CloudSC as the simplification-pipeline integration test - #2470

Open
ThrudPrimrose wants to merge 3 commits into
mainfrom
perf/constant-propagation-scheduling
Open

Add CloudSC as the simplification-pipeline integration test#2470
ThrudPrimrose wants to merge 3 commits into
mainfrom
perf/constant-propagation-scheduling

Conversation

@ThrudPrimrose

@ThrudPrimrose ThrudPrimrose commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

CloudSC comes in as the integration case for the simplification pipeline. The kernel and its data
generator live in tests/corpus/cloudsc; the parse costs minutes, so it is memoized per process and
handed out as a copy.

  • tests/passes/constant_propagation_on_cloudsc_test.py compiles and runs the propagated SDFG against
    the un-propagated one under IEEE flags, so a schedule change that altered a value cannot pass.
  • tests/corpus/cloudsc_regression_test.py holds a wall-clock budget: five copies, one simplify each,
    median under 140s.

These tests carry the long marker that the General Tests matrix excludes, so they get their own workflow.

Split from the ConstantPropagation scheduling change, which is now #2476 and should merge first — this
branch was rebuilt on current main and holds only the CloudSC corpus, its tests and the CI job.

@ThrudPrimrose
ThrudPrimrose force-pushed the perf/constant-propagation-scheduling branch from 75f3c8c to 0251b49 Compare July 30, 2026 11:10
@ThrudPrimrose
ThrudPrimrose marked this pull request as ready for review July 31, 2026 08:52
@ThrudPrimrose ThrudPrimrose changed the title Cache the block order and skip unchanged nested regions in ConstantPropagation Cache the block order and skip unchanged nested regions in ConstantPropagation + Add CloudSC Integration Test Jul 31, 2026
CloudSC is the scaling case for ConstantPropagation: thousands of blocks nested many levels deep,
where a pass whose cost is superlinear in nesting depth shows minutes instead of seconds. The parse
costs minutes, so it is memoized per process and handed out as a copy.

tests/corpus/cloudsc holds the kernel and its data generator. The ConstantPropagation tests sit with
the other pass tests and compile and run the propagated SDFG against the un-propagated one, so a
change that altered a value cannot pass. The simplify wall-clock guard is its own regression test.

The tests carry the `long` marker, which the General Tests matrix excludes, so they get their own
workflow.
The job never installed pytest-xdist, so `-n 1` aborted the run with an unrecognized argument. It was
not wanted anyway: the CloudSC parse is memoized per process, and a worker per test pays it again.

Test paths came from the working directory. Ask dace where it is installed instead.
@ThrudPrimrose
ThrudPrimrose force-pushed the perf/constant-propagation-scheduling branch from d994057 to 7037f91 Compare August 3, 2026 13:22
@ThrudPrimrose ThrudPrimrose changed the title Cache the block order and skip unchanged nested regions in ConstantPropagation + Add CloudSC Integration Test Add CloudSC as the simplification-pipeline integration test Aug 3, 2026
ThrudPrimrose added a commit to philip-paul-mueller/dace that referenced this pull request Aug 6, 2026
…opagation (spcl#2476)

Constant collection is a fixpoint over each control flow region, and it
recursed into nested regions
from inside the fixpoint loop. So every sweep of every region re-ran
`blockorder_topological_sort`,
which computes immediate dominators and branch merges over the region,
and a region nested `d` levels
deep was re-analysed on every sweep at every enclosing level.

Neither is needed. The CFG does not change while constants are being
collected, so the block order is
the same on every sweep and can be cached; and a nested region is a
function of its incoming
constants, so an unchanged input reaches the same fixpoint and does not
need re-collecting. The
transfer and meet rules are untouched — this only changes the schedule.

Measured on the CloudSC kernel, parsed once with
`to_sdfg(simplify=False)` and deepcopied fresh for
every timed run, arms interleaved rep by rep. Median (min–max), 5 reps:

    unsimplified, 6342 blocks / 5890 states
apply_pass old 4.93s (4.77-5.11) new 1.66s (1.61-1.72) 2.97x

    after ScalarToSymbolPromotion + ControlFlowRaising, 6612 blocks
apply_pass old 24.16s (23.21-24.74) new 8.72s (8.16-8.86) 2.77x

    SimplifyPass, 4 reps
old 84.8s (82.7-92.3) new 76.1s (74.8-78.9) 1.11x

The box was not idle, so treat the absolute times as loaded; within-arm
spread is under 5% and every
rep interleaves the arms, so the ratios hold.

Old and new produce identical output: the same propagated-symbol set,
and equal SDFGs across symbols,
data descriptors, compile-time constants, blocks, interstate conditions
and assignments, dataflow
nodes, tasklet code, memlets, loop headers and conditional branches.

Split out of spcl#2470 so the scheduling change can be reviewed and merged
on its own; the CloudSC corpus,
its integration tests and the timing budget stay there and rebase onto
this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant