Choose Int64 TileArray indices for long arrays #361
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.35) × (1 − Review Confidence (0.64)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.35 · 171 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 70%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.308
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #361"
general
weight: 0.35
maleadt
TileArray(arr)choseInt32indices whenever every size and stride fit inInt32. An array with more thantypemax(Int32)elements, such as a 65536×65536 matrix, passes that check while its element offsets don't fit. The address arithmetic cuTile does itself in the index type then overflows: the linear index in 2Dgather/scatterand the base offset of@view. On an RTX 5080 with a 65536×65536Int8array:| Access | before | after |
|---|---|---|
|
ct.loadof the last tile | correct | correct ||
@view a[:, N:N], then load |ERROR_ILLEGAL_ADDRESS| correct ||
ct.gather(a, (N, N))|ERROR_ILLEGAL_ADDRESS| correct |Tile loads and stores are unaffected because tileiras widens its own address computation.
The default now also requires the offset of the last element to fit, so every
Int32-indexed array satisfies the invariant that all element offsets fit in its index type. cuTile Python instead keepsint32shapes and widens gather/scatter offsets to 64 bits unconditionally. Enforcing the invariant at conversion fixes everyI-typed offset computation at once, and arrays below 2³¹ elements keep the narrow path.An explicit
index=Int32is still honored when sizes and strides fit, so it remains usable for kernels that only use tile loads and stores. The docs now spell out the caveat forgather,scatterand@view.