es-ude / es-ude/OnDeviceTraining
Grouped-quant x conv-groups>1: numeric coverage for scatter/gather adjoint paths + wd>0 momentum fixture
- Dominant language
- C
- Stars
- 1
- Forks
- 3
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 8
Description
Follow-up from the group-quant PR3 final review (disclosed scope limits, code shipped and reachable but numerically unexercised):
1. **Grouped quant-groups × conv-`groups`>1** has gold coverage only for the forward gather (Conv1d forward, PR3 Task 3). Missing numeric fixtures:
- grouped ConvT1d **forward** with conv-groups>1 (scatter core's conv-group loops),
- grouped Conv1d **dx** with conv-groups>1 (scatter, adjoint role),
- grouped ConvT1d **dx** with conv-groups>1 (gather, adjoint role).
The kernels pass `cfg->groups` through and mirror the tested scalar siblings, but this is new kernel code — extend `conv1d_grouped_ref`/`convT1d_grouped_ref`'s dx wrappers and add one gold per path.
2. **SGD momentum grouped gold uses wd=0**: the `wd·param` term through the pos-3 per-group dequant is only structurally exercised (the same prologue cell is numerically pinned elsewhere). Extend the momentum fixture to wd>0 next time `generate_expected_sgd_grouped.py` is touched.
3. Optional regression insurance: one end-to-end smoke (factory → `requantizeTensorInPlace` grouped → forward+backward+`sgdStepM` step) — the per-stage golds compose through per-tensor wires, so this adds insurance, not coverage.
Context: `docs/conventions/arithmetic-sym.md` §"Grouped backward & update", epic #300 axis.
Contributor guide
Research direction
Read docs/conventions/arithmetic-sym.md at “Grouped backward & update”, then locate the conv1d_grouped_ref and convT1d_grouped_ref dx wrappers and their existing gold fixtures. Add numeric gold coverage for the three grouped conv-group paths, and extend generate_expected_sgd_grouped.py's momentum fixture to use wd>0. Done means those paths and the weight-decay term are numerically exercised; the end-to-end smoke is optional.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- machine-learning, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 54/100