FA-98761 / Tensor stride and reshape semantics / Open access
Tensor views: broadcasted singleton gets zero stride · case 01
broadcasted singleton gets zero stride.
ROOT CAUSE
An expanded singleton axis must reuse one storage location rather than advance.
THE FAILURE
An expanded singleton axis must reuse one storage location rather than advance.
Unsuccessful approach: A unit stride allows address advancement and makes expanded values incorrect.
Case contract
Broadcast an input axis to target size; unchanged dimensions keep stride and expanded singleton axes get stride zero.
Why this case matters
Dense tensor views rely on consistent logical coordinates and physical storage addresses.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(shape, strides, target):
return list(target),list(strides)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('expand row',solve([1,N],[1,1],[3,N]),([3,N],[0,1]))
check('expand column',solve([N,1],[1,1],[N,4]),([N,4],[1,0]))
check('unchanged',solve([2,3],[3,1],[2,3]),([2,3],[3,1]))
check('two expansions',solve([1,1],[1,1],[4,3]),([4,3],[0,0]))
check('already zero',solve([1,2],[0,1],[4,2]),([4,2],[0,1]))
check('singleton target',solve([1],[7],[1]),([1],[7]))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| expand row | [[3, 1], [1, 1]] | [[3, 1], [0, 1]] | Failed |
| expand column | [[1, 4], [1, 1]] | [[1, 4], [1, 0]] | Failed |
| unchanged | [[2, 3], [3, 1]] | [[2, 3], [3, 1]] | Passed |
| two expansions | [[4, 3], [1, 1]] | [[4, 3], [0, 0]] | Failed |
| already zero | [[4, 2], [0, 1]] | [[4, 2], [0, 1]] | Passed |
| singleton target | [[1], [7]] | [[1], [7]] | Passed |
SHA-256 / 545e11caa878f488687323381ef1ba1b1a8eaab3f407334cf5798d65b8489f7d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(shape, strides, target):
return list(target),[s if a==b else 1 for a,b,s in zip(shape,target,strides)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('expand row',solve([1,N],[1,1],[3,N]),([3,N],[0,1]))
check('expand column',solve([N,1],[1,1],[N,4]),([N,4],[1,0]))
check('unchanged',solve([2,3],[3,1],[2,3]),([2,3],[3,1]))
check('two expansions',solve([1,1],[1,1],[4,3]),([4,3],[0,0]))
check('already zero',solve([1,2],[0,1],[4,2]),([4,2],[0,1]))
check('singleton target',solve([1],[7],[1]),([1],[7]))
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| expand row | [[3, 1], [1, 1]] | [[3, 1], [0, 1]] | Failed |
| expand column | [[1, 4], [1, 1]] | [[1, 4], [1, 0]] | Failed |
| unchanged | [[2, 3], [3, 1]] | [[2, 3], [3, 1]] | Passed |
| two expansions | [[4, 3], [1, 1]] | [[4, 3], [0, 0]] | Failed |
| already zero | [[4, 2], [1, 1]] | [[4, 2], [0, 1]] | Failed |
| singleton target | [[1], [7]] | [[1], [7]] | Passed |
SHA-256 / 5e6c780e7e5116e81b895b2762039448e973f1f13d10c0479ee21b78a6688fe9
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
Self-contained integer metadata models only; no production framework compatibility or performance claim. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.
Observations recorded using Python 3.12.14 at 2026-09-30T16:48:16.724370+00:00.
Case digest / b8abf76713c7233f556868e5b789df791b435b166a48a9bdb10acc21ff03c20e