FAILURE MAP
← Case archive

FA-98746 / Tensor stride and reshape semantics / Open access

Tensor views: multidimensional storage address · case 01

multidimensional storage address.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

Coordinate components are added without scaling each one by its physical stride.

THE FAILURE

Coordinate components are added without scaling each one by its physical stride.

Unsuccessful approach: Scaling by strides but omitting the base offset fixes only zero-origin views.

Case contract

Address is offset + sum(index[i]*stride[i]); ranks match.

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, index):
    return offset+sum(index)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('pitched matrix',solve([2,3],[N,1],7,[1,2]),7+N+2)
check('nonzero origin',solve([4],[3],N,[2]),N+6)
check('zero stride',solve([2,3],[0,1],5,[1,2]),7)
check('empty coordinate',solve([],[],N,[]),N)
check('unit coordinate',solve([1],[N],4,[0]),4)
check('negative stride',solve([3],[-2],8,[2]),4)
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 fixtureActualExpectedOutcome
pitched matrix1010Passed
nonzero origin37Failed
zero stride87Failed
empty coordinate11Passed
unit coordinate44Passed
negative stride104Failed

SHA-256 / 958ec3b9b7b50328272b58a0fe277f50f3b731ccb1fd680b7134423cf81b08d5

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(shape, strides, offset, index):
    return sum(i*s for i,s in zip(index,strides))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('pitched matrix',solve([2,3],[N,1],7,[1,2]),7+N+2)
check('nonzero origin',solve([4],[3],N,[2]),N+6)
check('zero stride',solve([2,3],[0,1],5,[1,2]),7)
check('empty coordinate',solve([],[],N,[]),N)
check('unit coordinate',solve([1],[N],4,[0]),4)
check('negative stride',solve([3],[-2],8,[2]),4)
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 fixtureActualExpectedOutcome
pitched matrix310Failed
nonzero origin67Failed
zero stride27Failed
empty coordinate01Failed
unit coordinate04Failed
negative stride-44Failed

SHA-256 / 07e0351ce29426aa1e8b1b25f7a944f21ad872f75e92c0465e15724d218f95c0

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.279974+00:00.

Case digest / a8bba45bb89642a59d3ee78763a26c6da7c8242de315f31ec144fa917193dc05