Closed ericpre closed 1 year ago
Thank you for this, Eric.
The failure is a result of trying to pass a Dask array to Numba. PyEBSDIndex does not support Dask arrays, but its GPU implementation (using PyOpenCL) handles them well. kikuchipy therefore throws an error whenever a Dask array is attempted indexed without PyOpenCL available, as PyEBSDIndex falls back to the CPU/Numba implementation. However, having PyOpenCL does not guarantee that a GPU is available, I realize.
A better implementation would be to check whether a GPU is available, in addition to PyOpenCL being installed. Will do this change. I consider this a bug, and will see if we can release a v0.8.1 patch release when I fix this.
As a sidenote: The test passes whenever you have PyOpenCL installed and access to a GPU, which the GitHub action runners in kikuchipy's test suite have. Must be some other package which PyOpenCL requires to access the GPU that's not available in the integration tests.
As a sidenote: The test passes whenever you have PyOpenCL installed and access to a GPU, which the GitHub action runners in kikuchipy's test suite have. Must be some other package which PyOpenCL requires to access the GPU that's not available in the integration tests.
How do you know that they have GPUs? This is not mentioned in the github documentation.
I suspect that the issue is that the pyebsdindex conda package install pyopencl, while pypi packages doesn't. pyopencl can also run on cpu, so maybe it could be possible to get it to run on CPU of the github runners.
so maybe it could be possible to get it to run on CPU of the github runners.
I think you're right, sorry for my misleading comments. I realize that I have to take another look at kikuchipy's PyEBSDIndex tests on GitHub's runners.
The same issue will occur when installing from conda packages on system without gpu, because there is no guaranty that pyopencl will work.
This issue should be fixed in kikuchipy 0.8.1 available on conda-forge and PyPI.
See https://github.com/hyperspy/hyperspy-extensions-list/actions/runs/4169659339