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

Increased PTT performances #2875

Merged
merged 9 commits into from
Sep 3, 2023
Merged

Increased PTT performances #2875

merged 9 commits into from
Sep 3, 2023

Conversation

gabknight
Copy link
Contributor

@gabknight gabknight commented Aug 24, 2023

  • cythonized find_closest(.) from dipy.core.shpere to dipy.direction.pmf

  • optimized pmf.get_pmf_value(.): only interpolated the direction of interest instead of the whole pmf.

  • improved cython code in dipy.direction.ptt_direction_getter.pyx

On my tests on the disco dataset, the performances improved by 5X.

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Merging #2875 (357a0bd) into master (50f4325) will increase coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2875   +/-   ##
=======================================
  Coverage   81.48%   81.48%           
=======================================
  Files         144      144           
  Lines       20062    20062           
  Branches     3194     3194           
=======================================
+ Hits        16347    16348    +1     
  Misses       2907     2907           
+ Partials      808      807    -1     

see 1 file with indirect coverage changes

@gabknight
Copy link
Contributor Author

@skoudoro @Garyfallidis I had to modify the cpdef to cdef in the fast_numpy functions to change the inputs from double[:] to double* . As such, I also had to remove the tests. Do we move forward like this? Another option would be to add _c to the cdef function names, and create cpdef functions with the same names that calls their respective _c functions. This option would be fine, but solely used for the testing. What do you think?

@skoudoro
Copy link
Member

I am ok, with that only for fast_numpy module.

In parallel, we need to figure out a way to add unit test for cdef functions

@skoudoro
Copy link
Member

Can you comment then instead or deleting them for now ?

@gabknight gabknight changed the title WIP - Increased PTT performances Increased PTT performances Aug 31, 2023
@gabknight
Copy link
Contributor Author

This is ready for review. Further improvements will come in another PR.

Copy link
Member

@skoudoro skoudoro left a comment

Choose a reason for hiding this comment

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

Thank you @gabknight,

I am going ahead and merge this PR. Looks good to me.

@skoudoro skoudoro merged commit eede25d into dipy:master Sep 3, 2023
25 of 27 checks passed
@gabknight gabknight deleted the OPT_PTT branch September 5, 2023 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants