Semantic SPIR-V interpreter narrows binary64 negate and absolute value

Đang mở
#4,181 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@lumenpearson đang làm issue này rồi.

Từ ngày 22/11/2026.

  • #4172 của @lumenpearson — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
18/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
compilers

Hướng nghiên cứu

Start with the semantic SPIR-V interpreter and its test at tests/semantic/test_interp.py, run with the command in the issue. Find where OpFNegate and GLSL FAbs produce their results and check how the result width is chosen for binary64. Done means the synthetic f64 case returns the expected words, including exact negation and a finite absolute value. Pull request #4172 already covers this fix, so review or extend it rather than starting a parallel change.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
What happens

OpFNegate and GLSL FAbs round through binary32 even for a binary64 result. These instructions occur in the translator output for f64 source modifiers. An exactly representable negative value loses low bits, and absolute value of a finite large binary64 turns into infinity. The fix is in #4172. AI-assisted (Codex).

Commit

aa2988cc555bad7ecd508b48a702adbb32fe7c95

System

Windows, Python 3.12.13, SPIRV-Tools v2026.4. CPU only.

Where

Finding the game (--find)

Command and steps

Run python -m unittest discover -s tests/semantic -p test_interp.py with the new synthetic case from #4172 and the interpreter from main. The fixture passes Vulkan 1.2 validation.

Output
Actual words: 00000000 bff00000 00000000 7ff00000. Expected: 00400000 bff00000 00000000 48100000.
Ngôn ngữ chính
Python
Star
14.9k
Fork
1.2k
Merge trung bình
1 giờ 58 phút
Pull request đã merge (30 ngày)
40

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ItsNotRexed/Leonida

Tất cả issue của ItsNotRexed/Leonida

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.