-
Notifications
You must be signed in to change notification settings - Fork 2
Fixed #22 Propose new pyfftw_sdp #25
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
base: main
Are you sure you want to change the base?
Conversation
|
Review these changes at https://app.gitnotebooks.com/stumpy-dev/sliding_dot_product/pull/25 |
|
@seanlaw |
|
@NimaSarajpoor Please go ahead! |
|
The script for
Observations
Conclusion
I think it should be worth it to check the performance of multi-threading |
The baseline implementation of sliding_dot_product/sdp/pyfftw_sdp.py Line 11 in d8f0423
The benchmark was run using the following #!/bin/bash
rm -rf sdp/__pycache__
./timing.py -timeout 5.0 -pmin 6 -pmax 24 pyfftw challenger_2threads challenger_4threads challenger_8threads scipy_oaconvolve > timing.csv
rm -rf sdp/__pycache__Results
Observations
Side note |
|
@seanlaw |
Please give me some time to review it more thoroughly |
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.
@NimaSarajpoor I basically have one primary suggestion for you to consider but I am not married to it (see below)
seanlaw
left a comment
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.
@NimaSarajpoor I've left some comments for you to consider
|
@seanlaw |
seanlaw
left a comment
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.
@NimaSarajpoor I think this is ready to be merged. I left a comment for you to consider but feel free to ignore if you disagree as I do not feel strongly about it
sdp/pyfftw_sdp.py
Outdated
| Sliding dot product between `Q` and `T`. | ||
| """ | ||
| m = Q.shape[0] | ||
| if self.n != T.shape[0]: |
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.
I don't think this if statement is needed. The lines below can still be executed regardless of whether the length has changed
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.
Right..... the only reason for having that if statement is to avoid calling pyfftw.next_fast_len when possible. It should be fine though to remove it as that results in just a slight drop in the performance for lengths 2^18 to 2^21 (0%-10%).



This PR addresses issue #22. The proposed pyfftw-based sdp will first be added under
challenger_sdp.pyso that we can compare it against the existing pyfftw_sdp. Eventually, once we are certain that there is no other concern, we will move it topyfftw_sdp.