5 ms·
BLIS: A BLAS-like framework for basic linear algebra routines
- optimalsolver 3y agoNew? Isn't this AMD's reference BLAS implementation?
- dang 3y agoWe've taken the word 'new' out of the title. Thanks!
- lloda 3y agoBLIS is a different library from BLAS, with a better API. For example when you pass an array, you can pass independent strides for all axes, and you can give independent transpose/conjugate flags. It does have a BLAS compatibility interface. The interface isn't perfect though. For example they didn't commit to supporting zero strides. That used to work anyway, but it's broken now for some archs.
- bee_rider 3y agoBLIS is a framework to instantiate (among other things) a BLAS. The exciting bit is that they distilled it down to a couple compute kernels. You provide stuff like the inner loops for a matrix multiplication, it turns it into a numerical library. AMD did use it to create their BLAS library though. Also, side note, when I’ve heard “reference BLAS,” it has been used in the opposite way. Netlib BLAS is the reference BLAS, it has basically bad performance but it defines the functionality. AMD used BLIS to create a tuned vendor BLAS.
- dang 3y agoDiscussed just a little in the past: BLIS: BLAS-Like Library Instantiation Software Framework - https://news.ycombinator.com/item?id=11369541 https://news.ycombinator.com/item?id=11369541 - March 2016 (2 comments)
- boegel 3y agoFor people new to BLIS, I can recommend this talk from the EasyBuild User Meeting (2021): https://www.youtube.com/watch?v=eb3dXivyTzE https://www.youtube.com/watch?v=eb3dXivyTzE
- quanto 3y agoThe real money shot is here: https://github.com/flame/blis/blob/master/docs/Performance.md https://github.com/flame/blis/blob/master/docs/Performance.m... It seems that the selling point is that BLIS does multi-core quite well. I am especially impressed that it does as well as the highly optimized Intel MKL on Intel CPUs. I do not see the selling point of BLIS-specific APIs, though. The whole point of having an open BLAS API standard is that numerical libraries should be drop-in replaceable, so when a new library (such as BLIS here) comes along, one could just re-link the library and reap the performance gain immediately. What is interesting is that numerical algebra work, by nature, is mostly embarrassingly parallel, so it should not be too difficult to write multi-core implementations. And yet, BLIS here performs so much better than some other industry-leading implementations on multi-core configurations. So the question is not why BLIS does so well; the question is why some other implementations do so poorly.
- celrod 3y agoI don't think these are realistic. It does far worse than MKL in practice on Intel CPUs in my tests, especially if arrays are not huge.
- mratsim 3y agoMKL has a JIT similar to libxsmm for small sizes.
- gnufx 3y agoThat's for very small matrices, but I forget the dimensions. It was only because of libxsmm that MKL got it. (You can use libxsmm to dispatch to OpenBLAS or BLIS for non-tiny cases.) BLIS has "small"-dimension support in many cases; I don't remember what they call it, but you can see changelog items about it.
- mgaunard 3y agoIt's not that difficult to be faster than MKL when you write the benchmarks. MKL is a general-purpose library, it does compromises to be good for most sizes. If you care about the performance of specific sizes, you can write code to beat it on that very specific benchmark. Interestingly, BLIS does poorly at small sizes, which is the area where it is easiest to beat MKL at.
- pletnes 3y agoIs this approach similar to or inspired by ATLAS? Sounds like it to me at first glance.
- bee_rider 3y agoThey are solving the same problem (tuning a BLAS). ATLAS tries to automate it away. For BLIS, instead they isolated the part that requires hand-tuning so you only have to write a couple kernels, then they can use them for the whole library. BLIS is quite a bit newer and I’d be surprised if ATLAS kept up.
- gnufx 3y agoNo, and ATLAS is dead. BLIS is a systematic evolution of the "Goto" approach.
- ngmc 3y agoI took one of the group's courses, Linear Algebra: Foundations to Frontiers, for fun at the beginning of COVID lockdown and loved it. Here's the course that teaches their basic approach to creating BLIS: https://www.edx.org/learn/computer-programming/the-university-of-texas-at-austin-laff-on-programming-for-high-performance https://www.edx.org/learn/computer-programming/the-universit... Neat stuff. The instructors are great, so I'll try to make room in my schedule for this later in the year.
- kergonath 3y agoLooks very interesting, thanks for the pointer.
- kietkolac 3y ago[flagged]
- kergonath 3y agoIt’s interesting, it does very well in multicore and with complex numbers. The issue is that there’s no way we’ll rewrite all our code littered with calls to BLAS and LAPACK to use a different API. It looks like they have a BLAS compatibility layer though; I hope it’s good. It even has a nice, friendly licence.
- jacobgorm 3y agoI used this for all my early edge AI work starting in 2016 after benchmarking against it the competition. Surprised that so few people seem to know of it.
- gnufx 3y agoIt's probably worth saying that ~10% differences in BLAS performance are probably lost in the noise of run time variance on an HPC system, especially as things don't typically spend most of their time in BLAS. Also, you don't have licence issues with BLIS and OpenBLAS. For instance when I last looked at cp2k, a major materials science copyleft application, it didn't have a licence exception for linking with MKL.
- ykonstant 3y agoA tangential request: is there any documentation on the architecture and engineering of OpenBLAS kernels? As a non-expert, delving into the assembly code did not give me any insights on how it worked, and I would love it if there was some way to ease people like me into the deep operation of those routines. Particularly, I would love to understand the engineering against CPU specifics (caches, superscalar arch, speculative ex.) and similar low-level insights. Thanks in advance!