-
Notifications
You must be signed in to change notification settings - Fork 62
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
Simple GPU tracking #576
Simple GPU tracking #576
Conversation
Build passed ! Good Job 🍻 ! |
1 similar comment
Build passed ! Good Job 🍻 ! |
Build passed ! Good Job 🍻 ! |
1 similar comment
Build passed ! Good Job 🍻 ! |
Build passed ! Good Job 🍻 ! |
It could possibly be useful to us eventually in dwiml! What is the reason for creating short streamlines only? Memory restriction, or that was actually your initial goal? |
I just needed short streamlines and didn't need backward tracking so I didn't take the time to implement it. But it is not a memory limitation; you can increase the But, I think I will mark the PR as WIP and eventually rename to Then we would have:
For clarity, maybe we should rename |
Are the args so very different? Couldn't it be in the same script _dev and add option '--use_gpu'? Then the initialisation would call another Propagator class? |
A lot of options would not be supported though:
I feel like it would just make the Or I could support all the options the I'll see how GPU tracking would fit in our tracking code structure. The propagator is 100% GPU code, as is the dataset, but I will at least write a proper |
Nice! |
Build passed ! Good Job 🍻 ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor help edit to do. Otherwise, just to leave a trace, I'm having an error running it.
pyopencl._cl.RuntimeError: clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE - clBuildProgram failed: BUILD_PROGRAM_FAILURE
Build on <pyopencl.Device 'GeForce GTX 1080' on 'NVIDIA CUDA' at 0x2ef8f10>:
:174:55: error: implicit conversion from address space "global" to address space "private" is not supported when passing to parameter of destination type
sh_to_sf(odf_sh, sh_to_sf_mat, is_first_step, vertices,
^~~~~~~~
:30:54: note: passing argument to parameter 'vertices' here
const bool is_first_step, const float* vertices,
^
(options: -I /home/local/USHERBROOKE/desm2239/my_env/scilpy_master/lib/python3.7/site-packages/pyopencl/cl)
scripts/scil_compute_short_tracks.py
Outdated
@@ -0,0 +1,161 @@ | |||
#!/usr/bin/env python3 | |||
""" | |||
Perform probabilistic short-tracks tractography[1] on a ODF field inside a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add space before [1] please
Build passed ! Good Job 🍻 ! |
1 similar comment
Build passed ! Good Job 🍻 ! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Watatatow! Ça torpille cette affaire! npv10 en 155 seconds.
Bravo @CHrlS98 !!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appart from the two comments I would say Great Job @CHrlS98
Maybe it need more testing but otherwise LGTM
Build passed ! Good Job 🍻 ! |
2 similar comments
Build passed ! Good Job 🍻 ! |
Build passed ! Good Job 🍻 ! |
Script to compute a probabilistic tractogram on the GPU. The ODF image and mask are interpolated using nearest-neighbor interpolation. The script also incorporates ideas from Ensemble Tractography. Given a list of maximum angles, a different angle drawn at random from the set will be used for each streamline.
Here's a log showing the execution time on a Tractoflow-processed HCP subject.
And a visualization of the output tractogram.
Because it runs on the GPU and uses
pyopencl
which is an optional dependency ofscilpy
, there is not much I can test withpytest
apart from the--help
command.