[Migrated] Is support for 16bit Floating point planned/in scope?
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.4k
- Fork
- 125
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/1003
Old labels: t: enhancement
Originally creatd by duplexsystem on 2023-03-15T16:50:07Z 👍: 2
16bit Floating point support has been a feature of GPUs since Nvidia's Pascal, AMD's RDNA2, and Adreno GPUs starting at some point (couldn't find out when). Copied from this WebGPU suggestion (because it's a good summary) fp16 provide the following, quite large benefits over fp32:
- It uses half the memory size (of course). This is particularly important on mobile devices where available memory is limited. Specifically, one of the most common / strongest request the Metal team gets from 3rd parties is for features which can help decrease their memory use.
- Because it uses half the size, memory bandwidth is more effectively used.
- Even without the bandwidth increase, devices often have increased ALU performance for half-precision operations.
- Power consumption is decreased on some devices, leading to better battery life.
In addition fp16 support has been a, optional, core feature since Vulkan 1.2, see VK_KHR_shader_float16_int8.
Sadly rust currently does not have an fp16 type, however there are crates such as half which emulate fp16 and optionally compile down to native types/intrinsics when possible. However possibly other than directly writing inline SPIR-V, and even that may cause unintended side effects as to my knowledge rust-gpu was not written with fp16 support in mind, rust-gpu does not support fp16. Given glam also does not support fp16 ecosystem integration would not be trivial. However the performance gain and flexibility of allowing fp16 are quite large and fp16 would expand the amount of shaders that could be ported to rust in a performant way (see FSR 1.0, FSR 2.0, and NIS among others).
All that to preface: Is support for 16bit Floating point planned/in scope for rust-gpu, be that directly support or just exposing intrinsics and supporting 16bit storage?
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
L’issue non indica file del repository, test o punti di ingresso; inizia individuando il supporto esistente per i tipi e SPIR-V in rust-gpu e esaminando l’estensione Vulkan e half crate collegati. Per considerarlo completato servirebbe un ambito approvato da un maintainer per il supporto nativo a fp16, gli intrinsics o l’archiviazione a 16 bit, insieme al corrispondente lavoro di implementazione e validazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- compilers, computer-graphics
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100