Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove skcuda stuff from docs #1435

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 1 addition & 37 deletions docs/source/readme-gpu.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CaImAn and GPUs
===============
Some parts of Caiman already use Tensorflow, and those parts can benefit from using a
Some parts of Caiman use Tensorflow, and those parts can benefit from using a
hardware-accelerated version of Tensorflow. These versions can be installed using Conda
(presently only on the Linux and Windows platforms). Note that this is experimental
and our ability to support this environment is limited. To do this:
Expand All @@ -14,39 +14,3 @@ build of opencv (which may not have graphical bindings). If this happens, you ma
search for the most recent opencv with openblas and switch to it using existing conda tooling.

To do this, check after switching package versions that KERAS_BACKEND is set to tensorflow. If not, you can set it in your terminal by typing `KERAS_BACKEND=tensorflow`. On some platforms it defaults to theano, which will not be hardware-accelerated. This can affect the computational of the Caiman online algorithm.

Caiman and CUDA
---------------

Caiman has experimental support for computing FFTs on your GPU,
using the pycuda libraries instead of OpenCV or numpy. This can be used during motion correction.

Installation
------------
We assume you have Caiman generally working first. If you do not,
follow the general instructions first and verify you have a working
environment.

One (but less-tested with Caiman) route is to install pycuda from conda-forge; activate your
caiman environment and then do `conda install -c conda-forge pycuda`. This may be all you need.

It is possible to instead install CUDA, then use pip to install pycuda, but this is involved enough
that it's better to try the above first.

Use
---
The CUDA codepaths will only be active if the needed libraries are installed on your system. Otherwise non-CUDA codepaths will be active (even if CUDA is requested in our code).

The following functions have been extended with a
use_cuda flag (defaults to false) that if set true will use CUDA for FFT
computation (if the needed libraries are involved):

* The MotionCorrect class - this is most likely the interface you want
* MotionCorrect::motion_correct_rigid() - used internally by MotionCorrect class
* register_translation()
* tile_and_correct()
* motion_correct_batch_rigid()
* motion_correct_batch_pwrigid()
* motion_correction_piecewise()

If you have your environment set up correctly, you can add use_cuda=True to the arguments of MotionCorrect() in your code and it will use your GPU for motion correction.
Loading