Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CL adapter: add consistent and useful fail state if entry point extension isn't supported. #1362

Open
aarongreig opened this issue Feb 19, 2024 · 1 comment
Labels
opencl OpenCL adapter specific issues

Comments

@aarongreig
Copy link
Contributor

aarongreig commented Feb 19, 2024

We have a few entry point implementations in the CL adapter that rely on functions from OpenCL extensions, such as the USM functionality. Right now if we find that the CL extension function needed for an entry point isn't available we return UR_RESULT_ERROR_INVALID_VALUE, which isn't helpful and doesn't fit with the few instances where we have a spec definition of what should happen in these cases (for instance the UR_RESULT_ERROR_INVALID_OPERATION return from urUSMHostAlloc).

We should for sure just change the return code from that helper function, and I think this should be accompanied by a spec pass to make sure that, wherever appropriate, we have a return code defined for when a backend doesn't support an entry point with an associated device info query. For example the host pipe functions are similar to the USM ones in that there is an associated device info query for support, but their spec doesn't define the error code that should be returned if that support isn't there.

@kbenzie kbenzie added needs-discussion This needs further discussion opencl OpenCL adapter specific issues labels Feb 19, 2024
@kbenzie kbenzie removed the needs-discussion This needs further discussion label Feb 28, 2024
@alycm
Copy link

alycm commented Feb 28, 2024

Discussed 2024-02-28: An error code in this case makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
opencl OpenCL adapter specific issues
Projects
None yet
Development

No branches or pull requests

3 participants