Shark-ML / Shark

The Shark Machine Leaning Library. See more:
http://shark-ml.github.io/Shark/
GNU Lesser General Public License v3.0
507 stars 131 forks source link

Intel MKL support. #99

Open agdavydov81 opened 8 years ago

agdavydov81 commented 8 years ago

Great news: Intel MKL now have a community license So, please consider support MKL as BLAS, LAPACK provider.

The patch with Windows and Linux support is attached to this issue. 0001-BLAS-LAPACK-Intel-MKL-support.zip

This patch also fix missed double to float static cast is BLAS:gemv. Also this patch fix exception throw in destructors of VectorInitializer and VectorSplitter: add noexcept(false) to prevent warnings.

Ulfgard commented 8 years ago

is there a reason why you closed this issue?

note that for your second case: every rule has an exception. In this case it is needed as the code can not check anywhere else that lhs and rhs are the same due to operator precedence - it has to be evaluated from left to right. As all vectors need to be correctly initialized at this stage no other exception can be thrown and thus this code is never called during exception unwinding.

agdavydov81 commented 8 years ago

I just found small bug in my MKL potrf call. I'll fix it an reopen issue soon.

OK, let's leave exception in VectorInitializer and VectorSplitter destructors. So, I'll simple add noexcept(false) to prevent massive compiler (visual studio 2015) warnings.

JosefAssad commented 6 years ago

Just a heads up, MKL is only gratis, not libre. It has registration required, which to the best of my knowledge (I am not a lawyer, don't take my amateur assessment as legal advice, etc. etc.) fails most acknowledged definitions of free software. I can't say whether GPLv3's extended definition of system libraries (section 1) covers something like MKL, but my guess is no and I'd be inclined to think it might be simpler and safer to err on the side of caution in this regard.

How it would work if MKL was abstracted behind a compiletime flag, and then leaving it up to the user might be safer, with the caveat that the user would not be distributing shark then.