ci: calibrate the bfp stack-watermark bucket over all arms (native 53 KB vs fq/g1/s1 102 KB)

Open
#504 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
c

Research direction

Start with check_stack_watermark.py and the c-stack-watermark CI job, then inspect the stage-1 grid configuration to identify the math, gradient, and state arms. Measure stack_peak_b across those arms, set the threshold from the maximum plus the usual margin, and make the bucket a failing gate. Done when CI probes the worst case or documents why the native probe suffices, and the roughly doubled stack use is explained.

Written by the indexing model from the issue text.

Description

Found during the #410 PR7 (#444) campaign. The PR recorded it but did not resolve it.

Observation

PR7 added a bfp bucket to check_stack_watermark.py. It is report-only and uncalibrated by design. The measured stack_peak_b depends on the BFP arm. On the PR7 host:

Arm stack_peak_b
native (xnat, g0, s0) 52 832 B
fq / g1 / s1 101 984 B

The CI c-stack-watermark job probes only one config (EPOCHS=1 SEED=1 BFP_WEIGHT_BLOCK=32 BFP_WIRE_BLOCK=16 BFP_MANTISSA_BITS=6 BFP_EXPONENT_BITS=8, i.e. the native arm).

To do

  • Measure stack_peak_b across the arms in the stage-1 grid (math native/fq × grads g0/g1 × state s0/s1 at least).
  • Calibrate the bfp threshold to the maximum over arms plus the usual margin, and make it a failing gate like the other buckets.
  • Either probe the worst-case arm in CI, or document why the native probe is enough.
  • Note why fq/g1/s1 roughly doubles the stack (staging VLAs?). This feeds into the SYM/BFP memory investigation.

Parent: #410

Dominant language
C
Stars
2
Forks
3
Avg merge
13h 6m
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from es-ude/OnDeviceTraining

All issues in es-ude/OnDeviceTraining

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.