banesullivan / scooby

🐶 🕵️ Great Dane turned Python environment detective
MIT License
47 stars 12 forks source link

Improved BLAS/LAPACK guessing #54

Closed prisae closed 2 years ago

prisae commented 4 years ago

If OK with @seberg we should include this https://gist.github.com/seberg/ce4563f3cb00e33997e4f80675b80953 instead of our often unsuccessful approach

try:
    import mkl
    mkl.get_version_string()
except (ImportError, AttributeError):
    mkl = False

try:
    import numexpr
except ImportError:
    numexpr = False

# Get mkl info from numexpr or mkl, if available
if mkl:
    MKL_INFO = mkl.get_version_string()
elif numexpr:
    MKL_INFO = numexpr.get_vml_version()
else:
    MKL_INFO = False

What do you think @banesullivan ?

seberg commented 4 years ago

If it works for you, sure, go ahead. You might want to check out joblib and https://github.com/joblib/threadpoolctl (although maybe that has a different dependency). My approach does not really work on windows though, and I am not sure about mac.

prisae commented 4 years ago

Thanks @seberg. joblib would be another requirement, what we would like to avoid. If it doesn't work on Windows it might be an issue, but I cannot test. However, we could use our current approach and your approach. @banesullivan can test if it works on a mac. We'll let you know and definitely mention/cite you if we implement it! scooby is under the MIT license, would that be fine with you?

seberg commented 4 years ago

Honestly, please just use it as public domain, its not really anything special IMO.

banesullivan commented 4 years ago

@prisae, I'm all for it! I can test on Mac/Windows (I have Windows under a VM) once the PR is in and then we can decide on how to proceed.

Thanks for the good work in the gist, @seberg!

prisae commented 2 years ago

What is the status of this @banesullivan?

banesullivan commented 2 years ago

I have no updates and don't have the bandwidth to open a PR for this at this time. If you or @seberg can get started I should be able to help finalize and review it though

prisae commented 2 years ago

No, I cannot really remember why I opened it, or what triggered it. Just now I downloaded the gist to quickly try, and it actually returned Unable to guess BLAS implementation, while a scooby.Report() returns the MKL libray. I am sure there was a good reason due to something the gist can what scooby cannot, but I don't remember.

So I'll close this (if I ever remember I'll reopen).

I am also not sure if we improved something in the last two years already in this regard.

We might want to add some BLAS/LAPACK information at some point (maybe this was the reason?).