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

CI test fail when using oclgrind or pocl #1

Closed
StRigaud opened this issue Mar 31, 2022 · 3 comments · Fixed by #53
Closed

CI test fail when using oclgrind or pocl #1

StRigaud opened this issue Mar 31, 2022 · 3 comments · Fixed by #53
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@StRigaud
Copy link
Member

Issue with the build and deploy CI

Github action do not provide OpenCL compatible devices making tests impossible to run.

An alternative solution is to use oclgrind which simulate an OpenCL device but that still fail.

The error when running test is OpenCL-error -1001 "CL_PLATFORM_NOT_FOUND_KHR" which means that cl_khr_icd-extention have trouble to load the proper vendor driver.

Information:

  • The current CI is only tested on Ubuntu for now.
  • OpenCL installation is done by apt install apt install opencl-headers ocl-icd-dev ocl-icd-opencl-dev but maybe not necessary?
  • Python package is managed by conda.
@StRigaud StRigaud added the help wanted Extra attention is needed label Mar 31, 2022
@StRigaud
Copy link
Member Author

StRigaud commented Apr 1, 2022

I was not using oclgrind properly.

changed the command
python -m pytest .
to
oclgrind python -m pytest . to run the test.

✔️ The good part is, it detect a platform.
🚫 The bad is it does not generate correct output and the test assert fail.

edit:
using oclgrind with CLIc pure works fine
using oclgrind with python wrapper return wrong values

@StRigaud StRigaud changed the title Cannot run tests during CI because not OpenCL device is found CI test fail when using oclgrind Apr 1, 2022
@StRigaud StRigaud changed the title CI test fail when using oclgrind CI test fail when using oclgrind or pocl Apr 8, 2022
@StRigaud
Copy link
Member Author

StRigaud commented Apr 8, 2022

Following this comment:

Using oclgrind or pocl for enabling opencl on CPU compile and run for pyclesperanto but return wrong values:

# run add_image_and_scalar kernel
input: [1. 1. 1. 1. 1. 1. 1. 1. 1.] float32
valid: [101. 101. 101. 101. 101. 101. 101. 101. 101.] float32
result: [4.7481553e+10 1.0000000e+02 4.7495971e+10 1.0000000e+02 4.7484436e+10
 1.0000000e+02 8.6149689e+25 1.0000000e+02 1.0000000e+02] float32

However, it works fine with CLIc alone.

@StRigaud StRigaud added the bug Something isn't working label Apr 8, 2022
@StRigaud StRigaud mentioned this issue Apr 12, 2022
@StRigaud
Copy link
Member Author

StRigaud commented May 9, 2022

The invalid results is solved, see this.

The remaining issue is the linking with libOpenCL.so not happening with the error ImportError: libOpenCL.so.1: cannot open shared object file: No such file or directory

Solving this should unlock a full CI build and test action

@StRigaud StRigaud linked a pull request Mar 22, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants