FP16 simulation execution context + FP32-accumulating LayerNorm lowering rule (variance overflow repro)
Maintainer thường phản hồi trong vòng 1 ngày
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
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- kotlin
- Lĩnh vực
- compilers, machine-learning
Hướng nghiên cứu
Start by locating Fp16SimulationExecutionContext or the DirectCpuExecutionContext option and the Fp16Codec, then identify the reduction tests and the layerNorm lowering rule in skainet-compile-hlo. Reproduce the overflow on the JVM with a synthetic [1500,1280] input, and check that the FP16 lowering emits an F32 variance reduction with a TraceEvent naming the rule. Done also includes the documentation page and, when an FP16 target exists, passing the IREE parity harness (#1148).
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Context
An FP16 LayerNorm computes variance as a mean over 1280 squared, centred activations. For real Whisper encoder activations the sum exceeds the FP16 maximum before the division, variance becomes +Inf, rsqrt becomes 0, and the block silently emits zeros for those frames — 6 of 1500 frames in the measured case, enough to drop encoder cosine from 0.9999 to 0.968. The fix on the LiteRT side was a graph rewrite ((0.25·δ)² · 16) because the runtime offered no lever.
SKaiNET will meet the same bug the moment an FP16 GPU or NPU lowering exists. It should be reproducible on a desktop CPU before that, so the lowering rule (accumulate variance in FP32, or apply the rescale) can be written and regression-tested against a known-failing input.
Scope
-
Fp16SimulationExecutionContext(or aDirectCpuExecutionContextoption): after every op, round the output throughFp16Codec(round-to-nearest-even, overflow to ±Inf, gradual underflow) — storage-only simulation. A second mode also rounds accumulators inside reductions (sum/mean/variance/matmul) to model true half-precision arithmetic. - A regression test with a synthetic
[1500,1280]input scaled so that naive FP16 variance overflows, asserting+Infunder accumulate-in-half and a finite, correct value under the FP32-accumulate lowering. -
layerNormlowering rule for FP16 targets inskainet-compile-hlo: variance reduction in F32 (or the documented rescale), with aTraceEventnaming which rule fired. - Docs: an explanation page on narrow-float numerics pitfalls with this as the worked example.
Acceptance
- The overflow reproduces in a unit test on a JVM with no GPU.
- The StableHLO emitted for an FP16 LayerNorm shows the F32 reduction, and the test passes through the IREE parity harness (#1148) when an FP16 target exists.
Related
- #884, #885 — narrow-float layer and FP16 kernels
- #1148 — parity acceptance
- Ngôn ngữ chính
- Kotlin
- Star
- 52
- Fork
- 15
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 36
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 SKaiNET-developers/SKaiNET
-
coding good first issue size:xs skill:kotlin-core sub-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
SKaiNET-developers/SKaiNET#1323 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
coding good first issue platform size:xs skill:js sub-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SKaiNET-developers/SKaiNET#1232 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
skeep tracking
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
SKaiNET-developers/SKaiNET#1331 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
assessment size:s skill:review sub-issue
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 18/100
SKaiNET-developers/SKaiNET#1330 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation good first issue size:s skill:docs sub-issue
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
SKaiNET-developers/SKaiNET#1329 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của SKaiNET-developers/SKaiNET
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
lugassawan/swe-workbench#799 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Default book icon displayed while loadingCó thể đã có người làm @Bhaskar-Guthula-137 đã nhận hôm nay. Đang mởbug good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
kiwix/kiwix-android#5194 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
jellyfin/jellyfin-androidtv#5885 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 73/100
tortuvshin/open-apps#377 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
contributor: external needs review
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày