TomographicImaging/CCPi-Regularisation-Toolkit

How to handle CUDA dependency

paskino opened this issue · 4 comments

So far the only package depending on CUDA is the regularisation. Currently we rely on the host to have CUDA installed.
Jenkins doesn’t build for CUDA, though I seem to remember we used to do that.

At any rate, the question is: how do we handle CUDA dependency?

  • Build : CUDA must be present on the machine. Jenkins can have CUDA 8, 9 or 10. At the moment Jenkins does not have a GPU and cannot run tests. I seem to remember that we addressed this and the tests are just skipped.

  • Runtime: CUDA must be present on the machine. If we build with CUDA 8, the package should work on any machine with CUDA >= 8.

All this is not documented in the package.

There is another way to do this and it would be to depend on the package cudatoolkit from conda. In this way we can just add cudatoolkit in the dependency in the meta.yaml and any machine to install the package will have the CUDA toolkit even if there’s no GPU on the machine.

I suppose this would be the default for the conda package?

Comments?

Astra 1.8.3 (which isn't a dependency here but that we use in other repos) lists cudatoolkit in the conda package.

This is astra current master

Therefore I'd suggest to add cudatoolkit to the build variants.

OK, so if we take cudatoolkit from conda as a dependency then can we use it to build the package? If we can then I'd guess it is the preferred way. It also helps to cover for different versions of cudatoolkit?

I'll look into it

I guess this is obsolete now...