You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG]: TensorView::view drops the slice offset from its alignment spec, causing error 716 #1540
TensorView::view rebuilds the specialization from the allocation's base pointer and leaves out the view's offset_bytes, while the kernel receives base + offset_bytes. When a slice starts off a 16-byte boundary and is then reshaped with .view(...), the spec claims 16-byte alignment (base_ptr_div = 16), the JIT emits vectorized loads, and the launch fails. Tensor::slice and TensorView::slice already add the offset; only view misses it.
Error / actual behavior
DriverError(716, "misaligned address")
Expected behavior
The view keeps the slice's real alignment (base_ptr_div = 4 for a one-element f32 offset) and the copy succeeds.
Minimal reproduction example
// entry: fn copy_32x32(output: &mut Tensor<f32, {[32, 32]}>, input: &Tensor<f32, {[-1, -1]}>)// { let t: Tile<f32, {[32, 32]}> = load_tile_like(input, output); output.store(t); }let n = 128*128;let tensor = api::arange::<f32>(n + 16).sync()?;let viewed = tensor.slice(&[1..1 + n])?.view(&[128,128])?;assert_eq!(viewed.spec().base_ptr_div.divisor,16);// should be 4let out = api::zeros::<f32>(&[128,128]).sync()?;copy_32x32(out.partition([32,32]),&viewed).sync()?;// error 716
Operating System
Arch-based Linux (Omarchy)
GPU and GPU Architecture
RTX 4070 Ti SUPER (sm_89)
CUDA driver version
615.78.08 (tileiras 13.4, V13.4.92)
Additional context
Root cause is at cutile-rs/cutile/src/tensor.rs:1482. The spec is also part of the kernel cache key, so a misaligned view shares a compiled kernel with the aligned case. This is distinct from #1479, where identical bytecode fails only with tileiras 13.4.
Activity
fix(cutile): keep the slice offset in TensorView::view specialization (…