[Migrated] Is support for 16bit Floating point planned/in scope?
まだ誰も着手していません。
- 主要言語
- Rust
- スター
- 3.4k
- フォーク
- 126
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
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?
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
この issue にはリポジトリのファイル、テスト、エントリーポイントが記載されていないため、まず rust-gpu における既存の型および SPIR-V のサポート箇所を特定し、リンクされている Vulkan 拡張と half crate を確認します。完了とするには、ネイティブ fp16 サポート、intrinsics、または 16 ビットストレージのいずれを対象とするかについて maintainer の承認を得たスコープと、それに対応する実装および検証作業が必要です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- rust
- 領域
- compilers, computer-graphics
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 25/100