GC and on-stack equivalents of f32.load_f16 and f32.store_f16
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 38/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- wasm
- Ambito
- compilers
Direzione di ricerca
Iniziare con le operazioni on-stack proposte e il tipo di storage f16 alternativo descritti nell’issue; confrontarne le implicazioni per WasmGC, la memoria lineare e le istruzioni struct/array esistenti. Il lavoro è completo quando la proposta ha un design definito per le istruzioni o il tipo di storage richiesti e il comportamento corrispondente è specificato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Outside of the SIMD operations, the proposal includes two opcodes to read and write f32s to the linear memory as f16s. Languages that compile to WasmGC typically don't even allocate a memory at all. It would be quite inconvenient to allocate a 2-byte memory and read-write through it in order to manipulate f16 bits.
I propose to add at least an on-stack equivalent to these instructions, which is similar to the pairs f32.reinterpret_i32 f64.promote_f32 and f32.demote_f64 i32.reinterpret_f32:
-
f32.promote_f16_reinterpret_i32: [i32] -> [f32]
extracts the 16 low-order bits of the input, reinterpret them as anf16, and promote thatf16value anf32. -
i32.reinterpret_f16_demote_f32: [f32] -> [i32]
demotes the inputf32into anf16, reinterpret it as ani16, and zero-extend it to ani32
One could argue that the above are the fundamental operations, and that the memory operations could be expressed in terms of them + i16 memory operations.
If not, then I propose we also bring WasmGC on par with the linear memory with appropriate struct. and array. operations:
struct.get_promote x y: [(ref null x)] -> [f32]: loads ani16field, reinterpret asf16and promote tof32struct.set_demote x y: [(ref null x) f32] -> []: demotes to anf16, reinterpret asi16and stores- Similarly for
array.get_promoteandarray.set_demote.
Edit: alternative for WasmGC: just introduce f16 as a storagetype, but not as a full valtype (like i16). Then we can use the existing struct.get, struct.set, etc. instructions. This is probably a lot simpler.
- Lingua principale
- WebAssembly
- Stelle
- 14
- Fork
- 0
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi 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.
Altre issue di WebAssembly/half-precision
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
WebAssembly/half-precision#8 · 1 commento ·
-
Hardware supportAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
WebAssembly/half-precision#7 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
WebAssembly/half-precision#6 · 1 commento · 1 reazione ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
WebAssembly/half-precision#4 · 22 commenti ·
-
f16x8.demote_f64x2_zeroAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tutte le issue di WebAssembly/half-precision
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
A `--symbolic` entry binding `𝑛3` and `!n3` passes the load check, since `once` compares spellings, and fails mid-run with a `user error`Forse già presa @sherenkov l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
objectionary/phino#1929 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
FuRongJun-1999/dsh-memory#402 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100