Confirm integer arithmetic edge case behaviour (e.g. division by 0)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 15/100
- Tipo di issue
- Documentazione
- Chiarezza
- Da chiarire
- Stato di attività
- Attiva
- Stack tecnologico
- c
- Ambito
- compilers, documentation
Direzione di ricerca
The issue asks maintainers to decide whether OpenCL C keeps its non-fatal integer division behaviour (section 6.5.1, Arithmetic Operators) instead of C's undefined behaviour. The payload names no file in the repo, so start from the OpenCL C spec text it quotes and the linked LLVM Discourse RFC. Done means a maintainer records a decision and its rationale, and any wording change follows from it. Expect this to need spec-level discussion, not a quick edit.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
OpenCL C v3.1 s6.5.1 "Arithmetic Operators" states that:
Division on integer types which results in a value that lies outside of the range bounded by the maximum and minimum representable values of the integer type will not cause an exception but will result in an unspecified value.
and
A divide by zero with integer types does not cause an exception but will result in an unspecified value.
That is, OpenCL C expressions such as INT_MIN / -1 and x / 0 are supposed to produce an unspecified value without triggering any undefined behaviour. This has some implications for an OpenCL C compiler (and potentially the speed of the code it generates) as it needs to ensure the generated code does not trigger an exception for example.
Quoting @AaronBallman on llvm discourse:
I [...] question why OpenCL is intentionally breaking from the underlying C standard in this one specific case. This is undefined behavior in both C and C++, and OpenCL turning it into well-defined-but-unreliable behavior doesn’t seem particularly useful. It continues to seem like a bug with the OpenCL specification that an implementation would have to go to these lengths to implement this;
The OpenCL C specification has mentioned this behaviour since OpenCL 1.0, though I could not find the original motivation. I'm raising this issue to clarify whether we want to preserve this behaviour (and keep the deviation from C99); if we do, it would be great to provide a rationale.
- Lingua principale
- Python
- Stelle
- 427
- Fork
- 137
- Merge medio
- 3g 21h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di KhronosGroup/OpenCL-Docs
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
KhronosGroup/OpenCL-Docs#1651 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
KhronosGroup/OpenCL-Docs#1608 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
KhronosGroup/OpenCL-Docs#1585 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
KhronosGroup/OpenCL-Docs#1583 ·
I maintainer di solito rispondono entro 1 giorno
-
clSetUserEventStatus doumentation gotchaForse già presa @1sgtpepper l’ha presa 30 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
KhronosGroup/OpenCL-Docs#1564 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di KhronosGroup/OpenCL-Docs
Issue simili
-
[BUG] SMTP listener now binds to EMAIL_PORT instead of 2525 since the gunicorn switch 5.0.3-ls373Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
linuxserver/docker-healthchecks#137 · 1 commento ·
-
RequirementAgent treats list -> add -> list as a tool call cycle and drops the second list call (Python)Forse già presa @chaitanya0305 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
i-am-bee/beeai-framework#2049 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
fedora-infra/anitya#2272 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
unitaryfoundation/mitiq#3205 ·
I maintainer di solito rispondono entro 6 giorni
-
[Bug]: Index worker test drops empty Git config values on WindowsForse già presa @xiaoyesoso l’ha presa oggi. Apertatriage/confirmed
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
agentscope-ai/agentscope#4377 · 2 commenti ·
I maintainer di solito rispondono entro 2 giorni