Closed hakonanes closed 1 year ago
@ericpre: I would be very greatful if you could give your opinion on whether the following fixes #614:
Relevant part of PyEBSDIndex' PyOpenCL context setup: https://github.com/USNavalResearchLaboratory/PyEBSDIndex/blob/main/pyebsdindex/opencl/openclparam.py#L67.
One way to check is to push a branch of the https://github.com/hyperspy/hyperspy-extensions-list repo on github
Thanks for the tip, the kikuchipy test suite passes in the "dev" runs when this PR's branch is used: https://github.com/hakonanes/hyperspy-extensions-list/actions/runs/4204973562/jobs/7296399979
Description of the change
This PR should fix #614 by requiring PyOpenCL and a ~compatible driver~ context to be available when trying to perform Hough indexing of a Dask array with PyEBSDIndex. By doing this check early, we ensure that PyEBSDIndex can use PyOpenCL and that it will not fall back to its CPU implementation, which then calls Numba and errors.
Will make a v0.8.1 release as soon as this PR is merged.
Progress of the PR
Minimal example of the bug fix or new feature
Error message that should be raised when PyOpenCL is installed but no compatible driver is available (error message copy/pasted):
For reviewers
__init__.py
.CHANGELOG.rst
.release.py
,.zenodo.json
and.all-contributorsrc
with the table regenerated.