returning CL_INVALID_OPERATION from clSetProgramSpecializationConstant

Aperta
#1,601 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
35/100
Tipo di issue
Documentazione
Chiarezza
Da chiarire
Stato di attività
Attiva

Direzione di ricerca

Inizia confrontando le condizioni di errore di clSetProgramSpecializationConstant e clCreateProgramWithIL nelle sezioni collegate della specifica OpenCL. Poi esamina test_conformance/api/test_api_consistency.cpp intorno alla riga 955. Il lavoro è completo quando la formulazione dell’errore ha una risoluzione concordata e il test di coerenza è stato aggiornato di conseguenza.

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

Descrizione

When we made IL programs optional in OpenCL 3.0, we added the error condition for clSetProgramSpecializationConstant:

CL_INVALID_OPERATION if no devices associated with program support intermediate language programs.

Note that clSetProgramSpecializationConstant also has the error condition:

CL_INVALID_PROGRAM if program is not a valid program object created from an intermediate language (e.g. SPIR-V), or if the intermediate language does not support specialization constants.

In the description of clCreateProgramWithIL, though, we also have the error condition:

CL_INVALID_OPERATION if no devices in context support intermediate language programs.

This means:

  • If no devices in the context support intermediate language programs, it is impossible to create a valid program object created from an intermediate language, because clCreateProgramWithIL will return an error.
  • Therefore, the CL_INVALID_OPERATION error condition for clSetProgramSpecializationConstant is debatably redundant and unnecessary, because in all of the conditions when it could be returned it will also be a CL_INVALID_PROGRAM.

We have a "consistency check" CTS test for this scenario, but note that the error could just as correctly be CL_INVALID_PROGRAM (since the program is created from source) as it could be CL_INVALID_OPERATION (since no devices associated with the program support IL programs).

https://github.com/KhronosGroup/OpenCL-CTS/blob/b8f8906c251926b1b3679323bfbf3df730b40fb8/test_conformance/api/test_api_consistency.cpp#L955

Should we remove this error condition (and update the CTS)? Or, is there a different way we should phrase the error condition, instead?

Lingua principale
Python
Stelle
427
Fork
137
Merge medio
3g 21h
PR unite (30g)
4

Preparare l'ambiente

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 KhronosGroup/OpenCL-Docs

Tutte le issue di KhronosGroup/OpenCL-Docs

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.