3 ms·
I work as a computational mathematician. Part of the problem on my end is that while the libraries have gotten better, they have not contained the operations t
by kxyvr 4y ago
I work as a computational mathematician. Part of the problem on my end is that while the libraries have gotten better, they have not contained the operations that I need for good algorithms in my field. As an example, when GPUs first came onto the field, cublas computed a subset of the BLAS routines, which are pretty fundamental for putting together known, good algorithms. Eventually, that got better, but then the operations needed to fit onto a single GPU. Eventually, cublas-xt came onto the market and that allowed parallelization across GPUs, which was great. However, it still didn't have all of the needed matrix operations. At the moment, I'm not sure where it currently is.
Of course, matrix algebra was only one of the problems. BLAS supports the writing of LAPACK routines, which tend to deal more with dense factorizations and eigenvalue problems. I believe more factorizations have been implemented recently, but I'm not currently up to date. Nevertheless, that was absolutely a bottle neck for the longest time. Yes, iterative methods don't need factorizations, but a good fraction of the preconditioners do.
Then, of course, this speaks nothing of the sparse linear algebra problem. There's multiple ways to do it, but many of the good sparse factorization routines need dense factorization routines, so these needed to come onto the market first and that took time.
And, to be clear, I know that there are multiple, good teams working on this. It takes time. And, there's a huge number of operations. If you're bored, go look at the manual for Intel's MKL and see the number and variety of operations that it provides. Those operations are there because people like me need them to do our job. I'll also agree that the kinds of operations we use to do our job will evolve over time with hardware. However, matrix algebra, factorizations, and eigenvalue problems lie at the very core of applied mathematics and expecting the mathematics to rework the last several hundred years of practice to accommodate the lack of tooling from the GPU manufacturers isn't realistic either.
Anyway, if someone knows the current state of what's possible, I'd love to hear. Selfishly, what it really boils down to is what operations (algebra, factorization, or eigenvalue), how big (how much memory or on multiple GPUs), and dense or sparse.
- p1esk 4y agoWhat prevents you from simply writing the operations you need in CUDA?
- kxyvr 4y agoHonestly, a combination of time, money, and expertise. Getting a good, low level factorization that works well in parallel is hard. I can write them. Others write them better. However, outside of that, I don't have any financial support to write them and there's no way that I can convince my clients to fund that effort. Personally, I don't really care where the libraries come from, but I will contend that the hardware manufacturers are generally the best place for this work to occur. For many years, each of the chip makers published their own high performance BLAS and LAPACK routines, which worked really well. Intel had MKL, AMD had AMCL, Sun had sunperf, IBM had ESSL. NVIDIA does the same, and I'm hugely grateful for that, but it's not complete. Really, though, the comment is more to answer why more mathematicians don't use GPUs. My contention is not that I or my colleagues view it as a fad, but more that there's a lack of routines that we depend on. I currently work for myself, but I'll also mention that the manufacturers did go to management at places I've worked and management did put pressure on staff to just rewrite everything in CUDA. As staff does, they said, ok, fine, but it's going to cost you labor. Management didn't have the money, or didn't want to spend it, and some mild office conflict occurred. Anyway, mostly that's to say that I will gladly spend thousands on GPUs and recommend it to my clients as soon as I don't have to write all of the low level routines myself.
- p1esk 4y agoIs execution speed important to you? How much of a speed up would make it worth your time to implement it yourself?