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

Improve inclusion of CL headers. #27

Closed
chir-set opened this issue May 1, 2023 · 5 comments
Closed

Improve inclusion of CL headers. #27

chir-set opened this issue May 1, 2023 · 5 comments

Comments

@chir-set
Copy link

chir-set commented May 1, 2023

Today's build of SlicerIGSIO failed on Arch Linux, while it used to build seamlessly and there does not seem to have been commits since 10/12/2022.

CL/cl.hpp could not be found.

A quick and dirty fix has been editing IGSIO/CMakeLists.txt in the build tree as such :

include_directories(/opt/rocm/include /opt/rocm/opencl/include)

A better fix would be to allowing passing an OpenCL_DIR when configuring. As stated above, Arch Linux does not install these files in /usr/include.

Just a ping for a future improvement if you find it important.

Regards.

@lassoan
Copy link
Contributor

lassoan commented May 2, 2023

I don't see any errors on the dashboards, neither Preview nor Stable, on any platforms. We recently changed defaults to enable OpenCL acceleration. If you don't have OpenCL on your computer then you may disable it (it is only used for faster volume reconstruction).

@Sunderlandkyl could you check if we could pass on OpenCL folder(s)?

@chir-set
Copy link
Author

chir-set commented May 2, 2023

Thank you for considering @lassoan .

It's not a big issue, I only need SlicerIGSIO as a dependency to build SlicerIGT. Things are not out of scope here.

@Sunderlandkyl
Copy link
Collaborator

Yeah, we can add the option to SlicerIGSIO.

SlicerIGSIO_USE_GPU should only be enabled by default if find_package(OpenCL) is successful.
Does find_package(OpenCL) not find the correct paths?

@chir-set
Copy link
Author

chir-set commented May 2, 2023

Does find_package(OpenCL) not find the correct paths?

That seems to be the case.

If I specify

-DOpenCL_DIR:PATH=/opt/rocm/opencl

and configure, the result is :

CMake Warning:
  Manually-specified variables were not used by the project:

    OpenCL_DIR

At build :

In file included from /home/arc/src/SlicerIGSIO-SuperBuild9/IGSIO/VolumeReconstruction/vtkIGSIOPasteSliceIntoVolume.cxx:59:
/home/arc/src/SlicerIGSIO-SuperBuild9/IGSIO/VolumeReconstruction/vtkIGSIOPasteSliceIntoVolumeHelperOpenCL.h:61:10: fatal error: 'CL/cl.hpp' file not found
#include <CL/cl.hpp>

@chir-set
Copy link
Author

Actually, I found an Arch opench-headers package that installs the headers in /usr/include. So this issue becomes moot, closing and sorry for the noise.

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

No branches or pull requests

3 participants