GC and on-stack equivalents of f32.load_f16 and f32.store_f16
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- wasm
- Área
- compilers
Línea de trabajo
Comience con las operaciones on-stack propuestas y el tipo de almacenamiento f16 alternativo descritos en el issue; compare sus implicaciones para WasmGC, la memoria lineal y las instrucciones struct/array existentes. Se considera terminado cuando la propuesta tiene un diseño definido para las instrucciones o el tipo de almacenamiento requeridos y se especifica el comportamiento correspondiente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- WebAssembly
- Estrellas
- 14
- Forks
- 0
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de WebAssembly/half-precision
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
WebAssembly/half-precision#8 · 1 comentario ·
-
Hardware supportAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
WebAssembly/half-precision#7 · 2 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
WebAssembly/half-precision#6 · 1 comentario · 1 reacción ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
WebAssembly/half-precision#4 · 22 comentarios ·
-
f16x8.demote_f64x2_zeroAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Todos los issues de WebAssembly/half-precision
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
publicodes/publicodes#868 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 89/100
Los mantenedores suelen responder en 1 día
-
bug I/O semantics
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
dotnet/roslyn#85793 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100