Remat conformance: zero-filled reference buffers to catch read-before-write after the Legacy oracle is removed
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 43/100
Research direction
Start by reading the remat conformance tests and the HEAP scheduler implementation; the issue names test/unit/support/LegacyCalculateGrads.c as the removed reference and describes the current reference scheduler setup. Trace how test builds initialize fresh buffers for schedulers, then identify how the reference can receive zero-filled buffers while other schedulers keep their poison pattern. Done means a read-before-write bug causes conformance tests to differ between the reference and poisoned schedulers.
Written by the indexing model from the issue text.
Description
Context
The remat conformance tests compare every scheduler against a reference. Until #4's keyed-randomness PR the reference was a frozen copy of the old gradient driver (test/unit/support/LegacyCalculateGrads.c), whose buffers start as zeros. That PR deletes it (register entry remat D57); the reference becomes the current driver on a plain HEAP + STORE_ALL scheduler.
In test builds every scheduler fills fresh buffers with a poison pattern, and so does the new reference. A layer that reads its output buffer before writing it therefore gives the same wrong result on every side, and the conformance tests stay green. Today the layer unit tests still catch such a bug (rehearsed: removing a zeroing line in MaxPool1d's backward fails UnitTestMaxPool1d and UnitTestMicroBatchStacking, while the conformance binary stays green on the debug build).
Proposal
Give the reference scheduler zero-filled fresh buffers in test builds (a small switch in the HEAP scheduler, used only by the reference). A read-before-write bug then shows up again as a difference between the reference and the poisoned schedulers, for every layer at once, including future layers without a dedicated unit test.
Accepted as a known limit for #4 PR5b; tracked here as a follow-up.
- Dominant language
- C
- Stars
- 2
- Forks
- 3
- Avg merge
- 13h 6m
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from es-ude/OnDeviceTraining
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
es-ude/OnDeviceTraining#549 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
es-ude/OnDeviceTraining#547 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
es-ude/OnDeviceTraining#536 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
es-ude/OnDeviceTraining#478 ·
Maintainers usually reply within 1 day
-
bug documentation
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
es-ude/OnDeviceTraining#459 ·
Maintainers usually reply within 1 day
All issues in es-ude/OnDeviceTraining
Similar issues
-
issue: bug report
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 2 days
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
BasedHardware/omi#26486 ·
Maintainers usually reply within 1 day
-
The LLVM object can build before collection_config.h is generatedPossibly taken @Vonng claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
aws/pgcollection#51 ·
-
area/docdb kind/failing-test priority/medium status/awaiting-triage
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
yugabyte/yugabyte-db#39462 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
libreswan/libreswan#3185 · 1 comment ·
Maintainers usually reply within 1 day