TomographicImaging / CCPi-Regularisation-Toolkit

The set of CPU/GPU optimised regularisation modules for iterative image reconstruction and other image processing tasks
Apache License 2.0
49 stars 25 forks source link

Cuda PTX Error with RTX3090 on windows. #211

Open gfardell opened 1 month ago

gfardell commented 1 month ago

Trying to run v24.0.1 (installed from anaconda) via CIL I get an error:

Error: C:\Users\ofn77899\Dev\CCPi-Regularisation-Toolkit\src\Core\regularisers_GPU\TV_FGP_GPU_core.cu:408, code: 222, reason: the provided PTX was compiled with an unsupported toolchain.

This is on a windows, with an RTX3090 and driver version 546.01

@paskino how did you build the binaries? Which version of CUDA Toolkit did you use?

paskino commented 1 month ago

On my laptop I have CUDA 12.4, which might not work for you?

gfardell commented 1 month ago

This probably needs splitting in to multiple issues, but it's useful to have the discussion in one place.

The drivers for 12.4 were released in March and I don't update that often - so that is the route problem. But there are multiple issues here.

https://github.com/TomographicImaging/CCPi-Regularisation-Toolkit/blob/3510f6470a81398696245efb3718b492f74ce719/src/Core/regularisers_GPU/TV_FGP_GPU_core.cu#L524

https://github.com/TomographicImaging/CCPi-Regularisation-Toolkit/blob/3510f6470a81398696245efb3718b492f74ce719/src/Core/regularisers_GPU/shared.h#L28-L38

code:

from cil.plugins.ccpi_regularisation.functions import FGP_TV
from cil.utilities.display import show2D
from cil.utilities import dataexample

data = dataexample.SIMULATED_SPHERE_VOLUME.get()
show2D(data)

TV_cpu = FGP_TV(max_iteration=10, device = 'cpu')
result_cpu = TV_cpu.proximal(data, tau=1.0)

TV_gpu = FGP_TV(max_iteration=10, device = 'gpu')
result_gpu = TV_gpu.proximal(data, tau=1.0)

show2D([result_cpu, result_gpu], title = ['CPU', 'GPU'])

output:

C:\Users\gemst\GitHub\work-CIL\reg_tlk_tests.py:11: UserWarning: Note that the default behaviour now sets the nonnegativity constraint to False 
  TV_cpu = FGP_TV(max_iteration=10, device = 'cpu')
C:\Users\gemst\GitHub\work-CIL\reg_tlk_tests.py:14: UserWarning: Note that the default behaviour now sets the nonnegativity constraint to False 
  TV_cpu = FGP_TV(max_iteration=10, device = 'gpu')
Error: C:\Users\ofn77899\Dev\CCPi-Regularisation-Toolkit\src\Core\regularisers_GPU\TV_FGP_GPU_core.cu:524, code: 222, reason: the provided PTX was compiled with an unsupported toolchain.

Image