LLNL / LEAP

comprehensive library of 3D transmission Computed Tomography (CT) algorithms with Python and C++ APIs, a PyQt GUI, and fully integrated with PyTorch
https://leapct.readthedocs.io
MIT License
120 stars 12 forks source link

Force CPU reconstruction #91

Closed LabTelc closed 3 months ago

LabTelc commented 3 months ago

Hello, Is it possible to force the library to use CPU on a system that have a compatible GPU? My system has RTX4070 and AMD EPYC in it and I would like to compare their compute capabilities. I know generally the GPUs are much faster than CPUs in image processing but my GPU has small amount of VRAM thus the performance is pretty rapidly hit by using system RAM. It may also be useful for parallelization, when a large amount of system RAM is available. Thanks

kylechampley commented 3 months ago

Yes, it is possible. Just do this:

leapct.set_gpu(-1)

However, note that the CPU projectors in LEAP have fallen behind and some cases have not been implemented. You may get an error message saying that something has not been implemented for the CPU. If you run into any of these let me know.