GC and on-stack equivalents of f32.load_f16 and f32.store_f16
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- wasm
- Lĩnh vực
- compilers
Hướng nghiên cứu
Bắt đầu với các thao tác on-stack được đề xuất và kiểu lưu trữ f16 thay thế được mô tả trong issue; so sánh các hệ quả của chúng đối với WasmGC, bộ nhớ tuyến tính và các chỉ thị struct/array hiện có. Công việc được xem là hoàn tất khi proposal có thiết kế đã được thống nhất cho các chỉ thị hoặc kiểu lưu trữ cần thiết và hành vi tương ứng đã được đặc tả.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- WebAssembly
- Star
- 14
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của WebAssembly/fp16
-
FP16 Hardware Feature DetectionĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
WebAssembly/fp16#11 · 1 bình luận · 1 reaction ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
WebAssembly/fp16#8 · 1 bình luận ·
-
Hardware supportĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
WebAssembly/fp16#7 · 2 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
WebAssembly/fp16#6 · 1 bình luận · 1 reaction ·
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
WebAssembly/fp16#4 · 22 bình luận ·
Tất cả issue của WebAssembly/fp16
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 1 ngày
-
DAE2 crashes on call.without.effects with a non ref.func expressionCó thể đã có người làm @stevenfontanella đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
WebAssembly/binaryen#9404 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:compiler effort:S impact:med platform:windows type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:Analysis enhancement
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 69/100
facebookresearch/atlas-lean#5118 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
C-bugfix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Quantinuum/hugr#3354 ·
Maintainer thường phản hồi trong vòng 1 ngày