You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-8Lines changed: 9 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,11 @@ To install, simply run `pip install .` in the top-level repository directory.
8
8
## Running the examples
9
9
This repository contains several example usage scripts.
10
10
11
-
There are two example scripts using the HARDI dataset, `run_dipy_cpu_hardi.py` and `run_dipy_gpu_hardi.py`, which run on CPU and GPU respectively.
11
+
The script `run_gpu_streamlines.py` demonstrates how to run any diffusion MRI dataset on the GPU. It can also run on the CPU for reference, if the argument `--device=cpu` is used. If not data is passed, it will donaload and use the HARDI dataset.
12
12
13
13
To run the baseline CPU example on a random set of 1000 seeds, this is the command and example output:
14
14
```
15
-
$ python run_dipy_cpu_hardi.py --chunk-size 100000 --output-prefix small --nseeds 1000
15
+
$ python run_gpu_streamlines.py --device=cpu --output-prefix small --nseeds 1000
16
16
parsing arguments
17
17
Fitting Tensor
18
18
Computing anisotropy measures (FA,MD,RGB)
@@ -30,7 +30,7 @@ Streamline generation total time: 6.9404990673065186 sec
30
30
31
31
To run the same case on a single GPU, this is the command and example output:
$ python run_gpu_streamlines.py --output-prefix small --nseeds 1000 --ngpus 1
34
34
parsing arguments
35
35
Fitting Tensor
36
36
Computing anisotropy measures (FA,MD,RGB)
@@ -48,11 +48,13 @@ Streamline generation total time: 0.3834989070892334 sec
48
48
Destroy GPUTracker...
49
49
```
50
50
51
+
Note that if you experience memory errors, you can adjust the `--chunk-size` flag.
52
+
51
53
To run on more seeds, we suggest enabling the `--use-fast-write` flag in the GPU script to not get bottlenecked by writing files. Here is a comparison running on 500K seeds on 1 GPU with and without this flag:
5. The code produces a number of independent track files (one per processed "chunk"), but we have provided a merge script to combine them into a single trk file. To merge files, run:
126
128
```
127
129
$ docker run --gpus=all -v ${PWD}:/opt/exec/output:rw -it docker.pkg.github.com/dipy/gpustreamlines/gpustreamlines:latest \
0 commit comments