Skip to content

feat: add schedule perturbation campaign - #2

Closed
drbh wants to merge 3 commits into
mainfrom
ptx-schedule-campaign
Closed

drbh wants to merge 3 commits into
mainfrom
ptx-schedule-campaign

Conversation

@drbh

@drbh drbh commented Aug 20, 2026

Copy link
Copy Markdown
Owner

this pr adds a schedule perturbation campaign for existing cuda-oxide examples.

the campaign builds an example once, inserts deterministic nanosleep.u32 delays at structural synchronization sites in the generated PTX (atomics, mbarriers, fences, ordered loads/stores, warp collectives, loop back-edges), patches a copy of the executable's embedded artifact, and runs each variant behind a watchdog. the code and inputs never change; only warp timing does, and every mutation is a pure function of the seed so a finding replays exactly.

GEMM_SOL_PHASE=4b-correctness cargo oxide fuzz-schedule gemm_sol \
  --arch sm_100a --seeds 56..57 --focus mbarrier --confirm-runs 3 --timeout-secs 20

outputs

schedule-fuzz: baseline Pass
schedule-fuzz: FINDING seed=56 - SCHEDULE-SENSITIVE CORRECTNESS FAILURE
  confirmation: 3/3 reproductions (CONFIRMED)
RESULT: FOUND 1 CANDIDATE(S)

that finding is a real race: on 1x B200 (sm_100a), sweeping seeds 0..140 with --focus mbarrier surfaced a TILE_INFO mailbox race in the gemm_sol phase 4B kernel: the producer warp can republish tile coordinates before all five reader warps have copied them, leaving 264 of 1024 output tiles unwritten. seeds 56 and 135 each reproduce it 3/3 against a passing pristine baseline. the fix (and full failure output) is in the parallel pr.

findings are reported as schedule-sensitive outcomes rather than proof of a data race or deadlock: CORRECTNESS FAILURE, OUTPUT CHANGE (with --compare-output), TIMEOUT, CRASH, or GPU WEDGE candidates. a finding is rerun up to --confirm-runs times, and a timeout is rechecked with pristine PTX so a wedged device is not misreported. mutated PTX, decisions, logs, replay.sh, sites.json, and summary.json land under crates/fuzzer/artifacts/schedule/<example>/; the standalone ptx-schedule binary can also --list-sites or rewrite a PTX file directly. details are in crates/fuzzer/README.md.

cargo test -p ptx-schedule passes (7 tests) and cargo fmt --all -- --check is clean.

@drbh

drbh commented Aug 20, 2026

Copy link
Copy Markdown
Owner Author

closing as merged upstream

@drbh drbh closed this Aug 20, 2026
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.

2 participants