2 ms·
> I gather Kompute.cc, which runs on GPUs via Vulkan, is the modern choice Or you can just use Eigen via CUDA: https://eigen.tuxfamily.org/dox/TopicCUDA.html
by bayindirh 4y ago
> I gather Kompute.cc, which runs on GPUs via Vulkan, is the modern choice
Or you can just use Eigen via CUDA:
https://eigen.tuxfamily.org/dox/TopicCUDA.html https://eigen.tuxfamily.org/dox/TopicCUDA.html
> Running floating point array kernels on CPU cores seems pointless these days.
CPU level vectorization can do wonders in terms of speed with right libraries (like Eigen, MKL, etc.). I can solve the same problem in seconds with Eigen where its MATLAB implementation takes hours.
- deleted 4y ago[deleted]
- moloch-hai 4y agoThat makes sense if you want to and can depend on CUDA. I gather there are efforts to provide a conversion layer from CUDA to other targets, but they seems to involve adapting the CUDA code to be more portable.
- bayindirh 4y agoI personally don't prefer CUDA (or any other form of lock-down), however they started CUDA integration ~5 years ago (or even before that), so they need to start another migration effort to support another technologies. While I use Eigen extensively on CPU, I don't follow any mailing lists of them, so I don't know the internal state and mindset.
- cyber_kinetist 4y ago> Or you can just use Eigen via CUDA: The link you’ve posted doesn’t mean you can do large dense matmul in CUDA right away, it’s just that you can use fixed sized vector/matrix operations inside kernels (which might be useful if you’re writing graphics code and need some vec3/mat3/quats.) You still have to write your own customized kernel for a large dynamic-sized gemm computation (with tiling and shared memory and all that jazz), and at that point it’ll be best to just use CUBLAS.
- bayindirh 4y agoAs you have read, the document states: > By default, when Eigen's headers are included within a .cu file compiled by nvcc most Eigen's functions and methods are prefixed by the device host keywords making them callable from both host and device code. Eigen casually overrides "*" to do any kind multiplication, hence I guess it'll also carry the GeMM functions alongside to the kernel during compilation, but this needs to be tested. Considering the speed I got from running Eigen on CPU, I still need to find larger problems to make that effort worthwhile, however.