Rust-GPU / Rust-GPU/rust-gpu

`NonUniform` decoration support

Aperta
#148 1 commento 3 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement
Lingua principale
Rust
Stelle
3.4k
Fork
126
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Add support for the NonUniform decoration, allowing invocations within a workgroup (or subgroup) to access an array of descriptors using different indices.

I'd suggest that any indexing of descriptors should by default be NonUniform, and that the guarantee of uniformity should be an unsafe opt-in, to guarantee the code at the very least always works. Contrary to the current situation on glsl, where the guarantee of uniformity is the default and you have to opt-out of it using nonUniformExt().

One could also make a pass to automatically figure out which accesses are guaranteed to be uniform and remove the NonUniform Decoration. However, looking at how the IHV implement it, I question if making such a pass would actually bring any improvement (afaik):

  • Nvidia: NonUniform doesn't make a difference on their cards, I assume every access is always NonUniform.
  • Intel: I've heard that it also shouldn't make any difference, like Nvidia.
  • AMD: NonUniform is implemented with a uniform loop where each unique index within the subgroup is accessed one after the other. This is most likely quite slow, however, AMD is also really good in figuring out which instructions are uniform across the workgroup, due to them having dedicated scalar registers and a dedicated scalar unit for scalar operations. So the driver should eliminate unnecessary NonUniform accesses anyway, as it wants to optimize them from vector into scalar / uniform loads.

These statements are all afaik and I've done no actual testing.

Guida per i contributori

Apri la guida per i contributori

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.

Direzione di ricerca

L'issue non indica file, test o punti di ingresso. Inizia individuando la gestione esistente di decoration e descriptor-indexing nel compilatore Rust-GPU, quindi chiarisci la semantica di uniformità prevista e come debba essere convalidato il supporto tra le invocazioni di workgroup e subgroup.

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

Valutazione

Stack tecnologico
rust
Ambito
compilers
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.