Differences between revisions 1 and 5 (spanning 4 versions)
Revision 1 as of 2010-07-19 13:33:00
Size: 1839
Editor: SteveLudtke
Comment:
Revision 5 as of 2017-06-02 12:05:34
Size: 1064
Editor: SteveLudtke
Comment:
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
At present, the only up to date GPU code in EMAN2 uses GPU-enabled Python libraries. Specifically, the new neural networking code for particle picking, heterogeneity analysis and automatic tomogram segmentation all make use of Theano which is fully GPU enabled. To make use of this, or any other GPU capabilities we manage to implement, you will need to have a current version of CUDA installed and working on your computer. More details are available on the
[[http://blake.bcm.edu/emanwiki/EMAN2/Programs/tomoseg|Tomogram Segmentation Tutorial]] page.
Line 3: Line 5:
This technique makes use of the GPU (graphics processing unit) common in most modern PC's, to dramatically
accelerate many image processing algorithms. At present (summer 2010) we have implemented GPGPU support for a significant number of algorithms in the
EMAN2 core (~20-30) using Nvidia's CUDA infrastructure. Implementing GPU support in a massive image processing library like EMAN2 is a major undertaking,
and optimizing the entire image processing pipeline requires further efforts. At the present time, only a handful of these algorithms have been fully optimized.
While you can build EMAN2 with CUDA support now, overall throughput on something like 3-D refinement is not significantly faster than just using multiple cores
on the CPU. That is, if you have a typical quad-core CPU machine and a typical Nvidia graphics card, at the moment, you might as well just use your 4 cores with
the --parallel option. We expect this situation to change over coming months...

If you wish to experiment with CUDA support in EMAN2, there are several steps:
 * you will need to be able to build EMAN2 from source on your local machine
 * run e2speedtest.py to establish a baseline for your CPU (1 core)
 * you will need to install and test the CUDA drivers and SDK from Nvidia
 * enable the CUDA flag using ccmake in EMAN2, and recompile
 * run e2speedtest.py again to compare general performance with the GPU (1 GPU processor)

Eventually we may migrate to the more cross-GPU compatible OpenCL, but at the moment, reports are that performance suffers considerably as compared to CUDA.

Also note that as of July 2010, using CUDA on the Mac is quite tricky, since Snow Leopard (10.6) is 64 bit, and EMAN2 and dependencies are normally compiled
as 64-bit, but CUDA at present only supports 32-bit.
EMAN2 has had more complete GPU support twice in the past once about a decade ago, and again (new implementation) about five years ago. Both of these implementations are now obsolete, and provide a cautionary tale to GPU aficionados. I can still run EMAN2 productively on a 7 year old Linux cluster, but how old a GPU can you use when you run GPU-enabled software? In any case, we may again implement some specialized programs using the GPU, and if so, we will update this page.

GPGPU Computing

At present, the only up to date GPU code in EMAN2 uses GPU-enabled Python libraries. Specifically, the new neural networking code for particle picking, heterogeneity analysis and automatic tomogram segmentation all make use of Theano which is fully GPU enabled. To make use of this, or any other GPU capabilities we manage to implement, you will need to have a current version of CUDA installed and working on your computer. More details are available on the Tomogram Segmentation Tutorial page.

EMAN2 has had more complete GPU support twice in the past once about a decade ago, and again (new implementation) about five years ago. Both of these implementations are now obsolete, and provide a cautionary tale to GPU aficionados. I can still run EMAN2 productively on a 7 year old Linux cluster, but how old a GPU can you use when you run GPU-enabled software? In any case, we may again implement some specialized programs using the GPU, and if so, we will update this page.

EMAN2/Gpu (last edited 2020-02-14 17:23:25 by SteveLudtke)