FA-98751 / Tensor stride and reshape semantics / Open access
Tensor views: transpose swaps matching shape and stride axes · case 01
transpose swaps matching shape and stride axes.
ROOT CAUSE
Shape axes are swapped while stride metadata stays in its original axis order.
THE FAILURE
Shape axes are swapped while stride metadata stays in its original axis order.
Unsuccessful approach: Swapping the axes but resetting the origin loses sliced-view addressing.
Case contract
For rank-two metadata, transpose returns swapped shape and stride, preserving offset.
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):
return [shape[1],shape[0]],strides,offset
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('rectangular',solve([N,3],[3,1],9),([3,N],[1,3],9))
check('pitched',solve([2,4],[7,1],N),([4,2],[1,7],N))
check('singleton',solve([1,3],[3,1],0),([3,1],[1,3],0))
check('negative pitch',solve([2,3],[-3,1],5),([3,2],[1,-3],5))
check('zero stride',solve([2,3],[0,1],2),([3,2],[1,0],2))
check('same square',solve([2,2],[2,1],4),([2,2],[1,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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| rectangular | [[3, 1], [3, 1], 9] | [[3, 1], [1, 3], 9] | Failed |
| pitched | [[4, 2], [7, 1], 1] | [[4, 2], [1, 7], 1] | Failed |
| singleton | [[3, 1], [3, 1], 0] | [[3, 1], [1, 3], 0] | Failed |
| negative pitch | [[3, 2], [-3, 1], 5] | [[3, 2], [1, -3], 5] | Failed |
| zero stride | [[3, 2], [0, 1], 2] | [[3, 2], [1, 0], 2] | Failed |
| same square | [[2, 2], [2, 1], 4] | [[2, 2], [1, 2], 4] | Failed |
SHA-256 / 280623dcc98dd9d6355530a2f72e9247e56449d5d1a821273c95a2d4f83c58a3
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(shape, strides, offset):
return [shape[1],shape[0]],[strides[1],strides[0]],0
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('rectangular',solve([N,3],[3,1],9),([3,N],[1,3],9))
check('pitched',solve([2,4],[7,1],N),([4,2],[1,7],N))
check('singleton',solve([1,3],[3,1],0),([3,1],[1,3],0))
check('negative pitch',solve([2,3],[-3,1],5),([3,2],[1,-3],5))
check('zero stride',solve([2,3],[0,1],2),([3,2],[1,0],2))
check('same square',solve([2,2],[2,1],4),([2,2],[1,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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| rectangular | [[3, 1], [1, 3], 0] | [[3, 1], [1, 3], 9] | Failed |
| pitched | [[4, 2], [1, 7], 0] | [[4, 2], [1, 7], 1] | Failed |
| singleton | [[3, 1], [1, 3], 0] | [[3, 1], [1, 3], 0] | Passed |
| negative pitch | [[3, 2], [1, -3], 0] | [[3, 2], [1, -3], 5] | Failed |
| zero stride | [[3, 2], [1, 0], 0] | [[3, 2], [1, 0], 2] | Failed |
| same square | [[2, 2], [1, 2], 0] | [[2, 2], [1, 2], 4] | Failed |
SHA-256 / 1c768a64c078584261c672a6cc16f76015a076c0cd47b7e1296b705b0126ec94
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 / bc3d296e2e2391de2c8e7ae9b8ba3439350858f4d6abeccbca7de3fd829c0fdd