FA-98786 / Tensor stride and reshape semantics / Open access
Tensor views: axis permutation preserves stride pairing · case 01
axis permutation preserves stride pairing.
ROOT CAUSE
Shape dimensions are reordered without reordering their matching physical strides.
THE FAILURE
Shape dimensions are reordered without reordering their matching physical strides.
Unsuccessful approach: Selecting stride entries by output position works only for identity and prefix permutations.
Case contract
Apply a permutation to shape and stride tuples using the same axis order.
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, order):
return [shape[i] for i in order],list(strides)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('swap',solve([2,N,4],[N*4,4,1],[2,0,1]),([4,2,N],[1,N*4,4]))
check('identity',solve([2,3],[3,1],[0,1]),([2,3],[3,1]))
check('reverse',solve([2,3,4],[12,4,1],[2,1,0]),([4,3,2],[1,4,12]))
check('unit axis',solve([1,N,2],[2,2,1],[1,2,0]),([N,2,1],[2,1,2]))
check('nonstandard',solve([2,3,4],[1,8,2],[1,0,2]),([3,2,4],[8,1,2]))
check('two axis swap',solve([N,5],[5,1],[1,0]),([5,N],[1,5]))
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 |
|---|---|---|---|
| swap | [[4, 2, 1], [4, 4, 1]] | [[4, 2, 1], [1, 4, 4]] | Failed |
| identity | [[2, 3], [3, 1]] | [[2, 3], [3, 1]] | Passed |
| reverse | [[4, 3, 2], [12, 4, 1]] | [[4, 3, 2], [1, 4, 12]] | Failed |
| unit axis | [[1, 2, 1], [2, 2, 1]] | [[1, 2, 1], [2, 1, 2]] | Failed |
| nonstandard | [[3, 2, 4], [1, 8, 2]] | [[3, 2, 4], [8, 1, 2]] | Failed |
| two axis swap | [[5, 1], [5, 1]] | [[5, 1], [1, 5]] | Failed |
SHA-256 / 00f00d0b511efbfde7c2678025c2753cd0ade8fc9039d941c41910c9b3b936c2
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(shape, strides, order):
return [shape[i] for i in order],[strides[i] for i in range(len(order))]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('swap',solve([2,N,4],[N*4,4,1],[2,0,1]),([4,2,N],[1,N*4,4]))
check('identity',solve([2,3],[3,1],[0,1]),([2,3],[3,1]))
check('reverse',solve([2,3,4],[12,4,1],[2,1,0]),([4,3,2],[1,4,12]))
check('unit axis',solve([1,N,2],[2,2,1],[1,2,0]),([N,2,1],[2,1,2]))
check('nonstandard',solve([2,3,4],[1,8,2],[1,0,2]),([3,2,4],[8,1,2]))
check('two axis swap',solve([N,5],[5,1],[1,0]),([5,N],[1,5]))
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 |
|---|---|---|---|
| swap | [[4, 2, 1], [4, 4, 1]] | [[4, 2, 1], [1, 4, 4]] | Failed |
| identity | [[2, 3], [3, 1]] | [[2, 3], [3, 1]] | Passed |
| reverse | [[4, 3, 2], [12, 4, 1]] | [[4, 3, 2], [1, 4, 12]] | Failed |
| unit axis | [[1, 2, 1], [2, 2, 1]] | [[1, 2, 1], [2, 1, 2]] | Failed |
| nonstandard | [[3, 2, 4], [1, 8, 2]] | [[3, 2, 4], [8, 1, 2]] | Failed |
| two axis swap | [[5, 1], [5, 1]] | [[5, 1], [1, 5]] | Failed |
SHA-256 / ad62709e940f24283d6202f86c18579d0c69ad4a998cbeab37232a410ef8d9f1
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.724518+00:00.
Case digest / 58532a8d2d1b8b9623a6cc84cea3cce944acc8e65408534ab418c4e23f4868c8