FA-98776 / Tensor stride and reshape semantics / Open access
Tensor views: reshape view requires coalescible strides · case 01
reshape view requires coalescible strides.
ROOT CAUSE
Equal element counts alone do not make a noncontiguous layout flattenable as a view.
THE FAILURE
Equal element counts alone do not make a noncontiguous layout flattenable as a view.
Unsuccessful approach: Checking unit-axis strides too rejects valid views because those strides do not affect addresses.
Case contract
For row-major contiguous source only, reshape to same element count is a view; report false for noncontiguous source.
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 __import__('math').prod(shape)==__import__('math').prod(target)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contiguous flatten',solve([N,3],[3,1],[3*N]),True)
check('transpose cannot flatten',solve([2,3],[1,2],[6]),False)
check('contiguous split',solve([2,3],[3,1],[2,1,3]),True)
check('pitched axis',solve([2,3],[4,1],[6]),False)
check('singleton arbitrary stride',solve([1,3],[99,1],[3]),True)
check('wrong count',solve([2,3],[3,1],[5]),False)
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 |
|---|---|---|---|
| contiguous flatten | True | True | Passed |
| transpose cannot flatten | True | False | Failed |
| contiguous split | True | True | Passed |
| pitched axis | True | False | Failed |
| singleton arbitrary stride | True | True | Passed |
| wrong count | False | False | Passed |
SHA-256 / f53c70732389db4a3ce611b1c18353c782e5430eab036d29cfe85d332b778271
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(shape, strides, target):
expected=1
for d,s in zip(reversed(shape),reversed(strides)):
if s!=expected: return False
expected*=d
return __import__("math").prod(shape)==__import__("math").prod(target)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contiguous flatten',solve([N,3],[3,1],[3*N]),True)
check('transpose cannot flatten',solve([2,3],[1,2],[6]),False)
check('contiguous split',solve([2,3],[3,1],[2,1,3]),True)
check('pitched axis',solve([2,3],[4,1],[6]),False)
check('singleton arbitrary stride',solve([1,3],[99,1],[3]),True)
check('wrong count',solve([2,3],[3,1],[5]),False)
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 |
|---|---|---|---|
| contiguous flatten | True | True | Passed |
| transpose cannot flatten | False | False | Passed |
| contiguous split | True | True | Passed |
| pitched axis | False | False | Passed |
| singleton arbitrary stride | False | True | Failed |
| wrong count | False | False | Passed |
SHA-256 / d89ece8a9c8353ab5775a4cb18fe7795aa0a5ec508605e55f9873e9ec9958104
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.724598+00:00.
Case digest / 0cacac2fc16c8fd37f35b473d7a0416c44fef4b5d7e620eff4123c7b5db9a1b5