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

Reconsider --enable-opencl / --disable-opencl #5397

Open
solardiz opened this issue Dec 20, 2023 · 3 comments
Open

Reconsider --enable-opencl / --disable-opencl #5397

solardiz opened this issue Dec 20, 2023 · 3 comments

Comments

@solardiz
Copy link
Member

We no longer depend on OpenCL library nor headers being available on the system at build time (we load the library dynamically at runtime, and we use our own copy of the headers), but we still check for both in configure and don't enable OpenCL support if either or both are missing.

Do we want to continue checking (I think @claudioandre-br said so)? If so, or regardless, do we possibly want explicit --enable-opencl to override any checks (just like --disable-opencl would)? I've just tested, and it does not yet do that, and indeed we currently only document --disable-opencl. We'll also need to document --enable-opencl if we start supporting it.

As to the default, if we do continue checking, then maybe check only for the library? We definitely don't need the headers anymore, at all, but the library we'd use at runtime, so it makes more sense to check for it. Alternatively, we could make the check an OR - enable OpenCL support by default if at least one of the two - library or headers - is found at build time, indicating that the system is possibly meant to work with OpenCL and is maybe just slightly misconfigured.

@solardiz
Copy link
Member Author

if we do continue checking, then maybe check only for the library? We definitely don't need the headers anymore

We no longer check the headers due to @claudioandre-br's #5398.

We still check the library. We still do not have --enable-opencl that could be used to build with OpenCL on library-less systems - I think we should at least add that.

@solardiz
Copy link
Member Author

solardiz commented Jan 2, 2024

@claudioandre-br I really would like to have --enable-opencl at least for build-testing of changes to OpenCL host code on systems without OpenCL.

@solardiz
Copy link
Member Author

solardiz commented Jan 5, 2024

I really would like to have --enable-opencl at least for build-testing of changes to OpenCL host code on systems without OpenCL.

Also for --fuzz of OpenCL formats' hash parsing, including on CI, without needing to install an OpenCL library in there. Edit: this use case probably needs more changes, as we currently initialize an OpenCL device even during --fuzz of such formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant