-
-
Notifications
You must be signed in to change notification settings - Fork 0
Description
It is currently impossible to get CUDA if OpenCL is present:
Lines 362 to 368 in 7e1d378
| if test "x${HAVE_OPENCL}" = x1; then | |
| DEFAULT_BACKEND="CL_BACKEND" | |
| BANDICOOT_CXXFLAGS="${BANDICOOT_CXXFLAGS} -DCOOT_DEFAULT_BACKEND=CL_BACKEND" | |
| elif test "x${HAVE_CUDA}" = x1; then | |
| DEFAULT_BACKEND="CUDA_BACKEND" | |
| BANDICOOT_CXXFLAGS="${BANDICOOT_CXXFLAGS} -DCOOT_DEFAULT_BACKEND=CUDA_BACKEND" | |
| else |
I am currently in the 3.0.1 branch from the pending PR, recovered the coot_rt_meat.hpp, and standardized tentatively on using COOT_KERNEL_SOURCE_DIR to allow for OpenCL and CUDA. Still, no chance for me to select CUDA (apart from reordering that same code segment). Which is not great.
It's a tricky problem but can we maybe configure both, and then allow a run-time (i.e. package load) switch? Via options() or an environment variable?
Alternatively, the package could also be greatly simplified by just throwing CUDA out. Right now there is a lot of complexity without delivering functionality. CUDA is hard and annoying to setup so I maybe ... having two packages is easier? Or two backend packages? I also do not quite understand how upstream worked and when I asked it was suggested 'it should switch at run-time' yet the documentation plainly disagrees:
(I had started locally adding a call to coot_init() thinking I might switch. Apparently one cannot.)
I currently have a working OpenCL and CUDA setup and am happy and able to test and help make this better. Let know what you are planning, I may be able to help.