Semantic SPIR-V interpreter narrows binary64 negate and absolute value

Aperta
#4,181 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@lumenpearson ci sta già lavorando.

Dal 22/11/2026.

  • #4172 di @lumenpearson — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
18/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
compilers

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
Python
Stelle
14.9k
Fork
1.2k
Merge medio
1h 58m
PR unite (30g)
40

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ItsNotRexed/Leonida

Tutte le issue di ItsNotRexed/Leonida

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.