-
Notifications
You must be signed in to change notification settings - Fork 10
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
multithreading issues #82
Comments
You have to run |
Thanks, the Regarding performance, I do not expect all functions to benefit from multithreading, but thought perhaps some cases such as
Is this consistent with what others are seeing? |
I have learned a few more things (at least when testing on my computer).
Below a little over 2x speed up (with 3 extra threads). int64 multiply is not vectorized
Now if I make larger arrays that are larger than L3 cache size.. here 100million * 4bytes per float - 400MB array size.
Below about 4x speed up (with 3 extra threads), inside L3 cache, but outside L2 cache on my computer
Below runs slower (made small arrays, and reused them)
|
This also demonstrates the problem with simple benchmarks vs. an application. When using many smaller arguments that together do not fit in the L2 cache, breaking an application into smaller blocks may enable all the blocks of arguments to fit in the L2 cache of the various CPUs, providing a speedup. This strategy would be very complicated to execute in pnumpy as a numpy add-on, and would be easier to do in a framework like dask. |
ping @jack-pappas to see if there is a way to get asv to reflect the performance increase when using multiple threads. Perhaps the benchmark should create an |
I only recently downloaded the library and am not sure what the expected result is, but currently the benchmarks involving multiple threads do not show any improvement for me.
possibly related, in the following I get None for
fn.cpustring()
, so it seems the threading is not enabled? Callingfn.thread_enable()
does not seem to enable it either, though.The text was updated successfully, but these errors were encountered: