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

[ENH] add gpu tracking to pyAFQ #962

Merged
merged 3 commits into from
Apr 25, 2023
Merged

Conversation

36000
Copy link
Collaborator

@36000 36000 commented Apr 24, 2023

No description provided.

@36000
Copy link
Collaborator Author

36000 commented Apr 24, 2023

@arokem this is ready for review

Copy link
Collaborator

@arokem arokem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very cool. I think that it would be nice to make the API of the new "gpu_track" function as similar as possible to the API of "track", so that they can more readily be interchanged (and so that they can share much of the boiler-plate code). So, for example, the seed mask is generated within "track", but it is assumed that it is passed into "gpu_track" (and always as Nifti1Image!). The new "gpu_track" function needs data and gradient table, whereas "track" needs model params. WDYT?

# Modified from https://github.com/dipy/GPUStreamlines/blob/master/run_dipy_gpu.py
def gpu_track(data, gtab, seed_img, stop_img,
seed_threshold, stop_threshold, thresholds_as_percentages,
max_angle, step_size, sampling_density, ngpus):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a docstring

@36000
Copy link
Collaborator Author

36000 commented Apr 25, 2023

I agree that we should make the gpu_track API as similar to the track API as possible, but I think we should do that in a future PR, once we have used gpu_track a little more

@arokem
Copy link
Collaborator

arokem commented Apr 25, 2023

OK - that makes sense. Other than that, I think that this is ready to merge, so if you agree, please go ahead!

@36000 36000 merged commit c1637a8 into yeatmanlab:master Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants