You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AD shards: the managed test/ad/runtests.jl does not split items by AD_SHARD #621
Problem. With ad_shards, every shard of a backend still runs all of that backend's hand-written AD items, so sharding cannot bring a long reverse-mode job under its limit.
Suspected cause. The reusable ad.yml says the runner "must run only the kth of n parts of the tagged items".
The managed test/ad/runtests.jl template does not read AD_SHARD.
Only run_selected and test_working_backend read it, and they split the registry scenarios inside an item.
Every other item runs on each shard.
Proposed fix. Have the managed test/ad/runtests.jl deal the matched items across shards, sorted by file and name, so the parts are disjoint and together complete.
Keep a single level of splitting.
Either stop test_working_backend splitting when the runner has already dealt items, or have the runner leave items that call it to the scenario split.
Detail
In ComposableRecurrences.jl the items outside the registry are more than half of a reverse-mode job.
In its package-owned AD versions workflow (run 46433453329, Julia 1.12, no coverage), enzyme_reverse took 56 min for the registry items and 65 min for the rest.
The main AD jobs for Enzyme reverse and Mooncake reverse have been cancelled at their 75 min limit on every run since 21 November.
With two shards as the kit splits today, each shard would still run the 65 min of other items plus half the registry, so it would still exceed the limit.
Numbers from ComposableRecurrences.jl, Enzyme reverse split in two (ad_shards), Julia 1.13 with coverage, run 47466446534.
Shard 1/2 took 98m47s of tests, and over half of that was items the split does not touch:
File
Time
Split?
adjoints.jl
42m27s
no
scenarios.jl (registry)
40m15s
yes
chunked.jl
8m20s
no
five smaller files
about 8m
no
Shard 2/2 was cancelled at the 120-minute cap after 114 minutes of tests.
The package now works around this in ComposableRecurrences.jl#1067. A small ad_shard() reader there lets its own items take_slice their part, and it moves to 3 shards.
A kit-level answer would be either of these:
a public ad_shard() helper for package items to use;
the managed test/ad/runtests.jl splitting whole items round-robin, balanced by recorded times.
This was opened by a bot. Please ping @seabbs for any questions.
Activity
seabbs-bot commentedon Dec 5, 2026
Numbers from ComposableRecurrences.jl, Enzyme reverse split in two (
ad_shards), Julia 1.13 with coverage, run 47466446534.Shard 1/2 took 98m47s of tests, and over half of that was items the split does not touch:
Shard 2/2 was cancelled at the 120-minute cap after 114 minutes of tests.
The package now works around this in ComposableRecurrences.jl#1067. A small
ad_shard()reader there lets its own itemstake_slicetheir part, and it moves to 3 shards.A kit-level answer would be either of these:
ad_shard()helper for package items to use;test/ad/runtests.jlsplitting whole items round-robin, balanced by recorded times.This was opened by a bot. Please ping @seabbs for any questions.