FA-98811 / Tensor stride and reshape semantics / Open access
Tensor views: storage span includes stride gaps · case 01
storage span includes stride gaps.
ROOT CAUSE
A product-based extent assumes compact storage and ignores stride gaps and negative directions.
THE FAILURE
A product-based extent assumes compact storage and ignores stride gaps and negative directions.
Unsuccessful approach: Adding only positive stride contributions mishandles reverse views.
Case contract
For nonempty shape, return inclusive min/max storage addresses reachable from offset and signed strides; empty returns None.
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, offset):
size=1
for d in shape: size*=d
return (offset,offset+size-1) if size else None
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('row major',solve([2,N],[N,1],4),(4,4+2*N-1))
check('pitched gap',solve([2,3],[5,1],N),(N,N+7))
check('negative stride',solve([3],[-2],8),(4,8))
check('zero stride',solve([N],[0],7),(7,7))
check('empty axis',solve([2,0],[0,1],3),None)
check('scalar',solve([],[],N),(N,N))
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 |
|---|---|---|---|
| row major | [4, 5] | [4, 5] | Passed |
| pitched gap | [1, 6] | [1, 8] | Failed |
| negative stride | [8, 10] | [4, 8] | Failed |
| zero stride | [7, 7] | [7, 7] | Passed |
| empty axis | None | None | Passed |
| scalar | [1, 1] | [1, 1] | Passed |
SHA-256 / 880a02ba364919618df0b35850ce0c002cb1370ed7e46d846f3901d5f7a1b6d3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(shape, strides, offset):
lo=hi=offset
for d,s in zip(shape,strides): hi+=(d-1)*s
return (lo,hi)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('row major',solve([2,N],[N,1],4),(4,4+2*N-1))
check('pitched gap',solve([2,3],[5,1],N),(N,N+7))
check('negative stride',solve([3],[-2],8),(4,8))
check('zero stride',solve([N],[0],7),(7,7))
check('empty axis',solve([2,0],[0,1],3),None)
check('scalar',solve([],[],N),(N,N))
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 |
|---|---|---|---|
| row major | [4, 5] | [4, 5] | Passed |
| pitched gap | [1, 8] | [1, 8] | Passed |
| negative stride | [8, 4] | [4, 8] | Failed |
| zero stride | [7, 7] | [7, 7] | Passed |
| empty axis | [3, 2] | None | Failed |
| scalar | [1, 1] | [1, 1] | Passed |
SHA-256 / aa2511e3e27bcbc22a33628b8dce5c227d7cdfe79db5e5b15691f3d124a4390b
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:17.164497+00:00.
Case digest / 8344923de19e361d454ce4c66de4b67118d3b0ff9c9ef8d2318f5297749e31ec