-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Set cutoff threshold for functions that rely on BLAS Level 1 routines (Close #6951) #6959
Conversation
Ah, I don't think this is going to fix everything in #6112 |
What was missing? |
Well @mlubin and I aren't using these, or BLAS at all in fact. But maybe we can make a separate issue for nonBLAS perf issues. Did these BLAS issues get worse between 0.2 and 0.3? |
I think these kinds of changes are fine in the short term, but in the long term, we really should have some idea of where the mystery performance drains are coming from in OpenBLAS. My investigations so far have shown that for really small problem sizes, OpenBLAS is spending a good chunk of time in memory allocation routines, so a fix might not be simple but I definitely believe that we shouldn't have to do these thresholds in Julia. |
I agree that we should really try to improve OpenBLAS. For now the band aids should be OK. What would be great is if we can have a perf tuning framework to detect these cutoffs. |
How about having definitions for all these magic constants in a separate file in Base, or at least at the top somewhere? Otherwise LGTM. @lindahua please merge when ready. |
That's a great idea, viral. I will do that when I do my work on tuning
|
Until better solutions happen, I think this is good enough to merge now. |
Set cutoff threshold for functions that rely on BLAS Level 1 routines (Close #6951)
This patch adds a threshold for
scale!
,vecnorm1
, andvecnorm2
: they calls BLAS only when the array size is above a prefixed threshold.This patch should fix
#6112(#6951), and ensure that these functions perform reasonably well even for small arrays.