4 ms·
Apple's own Accelerate Framework offers both BLAS/LAPACK and a set of sparse solvers that include Cholesky and QR. https://developer.apple.com/documentation/ac
by roseway4 6y ago
Apple's own Accelerate Framework offers both BLAS/LAPACK and a set of sparse solvers that include Cholesky and QR.
https://developer.apple.com/documentation/accelerate/sparse_solvers https://developer.apple.com/documentation/accelerate/sparse_...
Accelerate is highly performant on Apple hardware (the current Intel arch). I expect Apple to ensure same for their M-series CPUs, potentially even taking advantage of the tensor and GPGPU capabilities available in the SoC.
- kxyvr 6y agoHuh, this actually may end up solving many of my issues, so thanks for finding that! Outside of their documentation being terrible, they do claim the correct algorithms, so it's something to at least investigate. By the way, if anyone at Apple reads this, thanks for the library, but, you know, calling conventions, algorithm, and options would really help on pages like this: https://developer.apple.com/documentation/accelerate/sparsefactorization_t/sparsefactorizationcholeskyata?language=objc https://developer.apple.com/documentation/accelerate/sparsef...
- stephencanon 6y agoThat's the documentation page for an enumeration value, not a factorization routine (hence there are no calling conventions, etc, to document; it's just a constant). Start here: https://developer.apple.com/documentation/accelerate/solving_systems_using_direct_methods https://developer.apple.com/documentation/accelerate/solving... and also watch the WWDC session from 2017 https://developer.apple.com/videos/play/wwdc2017/711/ https://developer.apple.com/videos/play/wwdc2017/711/ (the section on sparse begins around 21:00). There is also _extensive_ documentation in the Accelerate headers, maintained by the Accelerate team rather than a documentation team, which should always be considered ground truth. Start with Accelerate/vecLib/Sparse/Solve.h (for a normal Xcode install, that's in the file system here): /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/Sparse/Solve.h
- m0zg 6y agoAccelerate is also available (and highly performant) on ARM as well. I was not able to beat it with anything on ARM, including hand-coded assembly, at least for sgemm and simple dot products, which are bread and butter of deep learning. It actually baffles me that Microsoft is not offering linear algebra and DSP acceleration in Windows out of the box. This creates friction, and most devs don't give a shit, so Windows users end up with worse perf on essentially the same hardware.
- stephencanon 6y agoARM themselves made a half-hearted attempt at addressing this with their Ne10 project (https://github.com/projectNe10/Ne10 https://github.com/projectNe10/Ne10), but as far as I could see from the outside they never committed any real resources to it, and it now seems to be abandoned (no public commits for three years).
- m0zg 6y agoThere's also https://github.com/ARM-software/ComputeLibrary https://github.com/ARM-software/ComputeLibrary, but Accelerate easily blows the doors off it, on the same hardware.
- mailslot 6y agoIt worked well on PowerPC too and helped with the Intel transition.
- mattip 6y agoNumpy and SciPy reject use of Accelerate due to faulty implementations of some routines. https://github.com/scipy/scipy/wiki/Dropping-support-for-Accelerate https://github.com/scipy/scipy/wiki/Dropping-support-for-Acc... We have never received any feedback from Apple about these bugs.
- roseway4 6y agoI noticed that SciPy has dropped support. I believe it wasn't only related to bugs, but also an very dated LAPACK implementation (circa 2009). I can't tell from Apple's developer docs whether this has changed. My sense is that Apple's focus is less on scientific computing and more so on enabling developers to build computation-heavy multimedia applications.