cuTile: Tile::shape() fails during compilation to Tile IR

Aperta Adatta ai principianti
#1,843 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@dzheltkov ci sta già lavorando.

Dal 20/11/2026.

  • #1844 di @dzheltkov — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
backend

Direzione di ricerca

In cutile-rs/, inizia individuando il metodo pubblico Tile::shape() e leggendo come sono rappresentate le sue dimensioni in D; l’issue segnala un unreachable!() incondizionato in quel punto. Esegui cargo test -p cutile --test tensor_and_matrix_ops compile_tile_shape -- --exact per riprodurre l’errore. Il lavoro è concluso quando il test di regressione passa e una chiamata valida a shape() viene compilata in Tile IR.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

On 8046b9e9, calling Tile::shape() from a kernel fails while compiling to Tile IR:

error: unrecognized macro `unreachable`

For example, this kernel sums each row of a matrix, clips negative sums to zero, and averages their squares. A 2×4 input gives a two-element intermediate tile and a scalar result. The zero tile should have the same shape as the row sums.

let sums: Tile<f32, { [M] }> = reduce_sum(matrix, 1);
let zero: Tile<f32, { [M] }> = constant(0.0f32, sums.shape());
let positive = max_tile(sums, zero);
let energy: Tile<f32, { [] }> = reduce_sum(positive * positive, 0);
let count: f32 = convert_scalar(sums.shape()[0]);
output.store((energy / scalar_to_tile(count)).reshape(shape![1]));

The public method contains an unconditional unreachable!(), and the JIT reaches it on a valid call. An intentionally unfinished method would be clearer with unimplemented!(...) in the source and a diagnostic naming the method. Here the dimensions are already available in D.

Reproduced on Linux with Rust 1.98.0 and no visible CUDA device. To reproduce on the base revision, apply only the regression test and run this command from cutile-rs/:

cargo test -p cutile --test tensor_and_matrix_ops compile_tile_shape -- --exact
Lingua principale
Rust
Stelle
4.1k
Fork
377
Merge medio
3g 2h
PR unite (30g)
103

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NVIDIA/cuda-rust

Tutte le issue di NVIDIA/cuda-rust

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.