Matlab Support for float32/single and float16/half datatypes in GPU Sparse Matrix Multiplication

5 views (last 30 days)
Is there a timeline for Matlab support for single (float32) and half (float16) datatypes for the non-zero values in GPU sparse matrices and for compatible float32/float16 gpu-accelerated sparse matrix multiplication?
This functionality exists in the underlying sparse CUDA libraries, and I believe it would be possible for users to compile their own MEX files to perform this task. However, considering the computational and memory efficiency that could be achieved by widening the functionality of sparse GPU matrices to float32/float16 non-zero values, I believe there exists a significant enough underlying demand for this functionality in Matlab to justify adding it in a future release. This is especially relevant when using very large GPU sparse matrices, which ultimately overwhelm the VRAM of most commercial GPUs.

Accepted Answer

Mike Croucher
Mike Croucher on 13 Aug 2025
Edited: Mike Croucher on 13 Aug 2025
As of R2025a, single precision sparse matrices are now supported on CPU and GPU. More details available on this blog post New in MATLAB: Single precision sparse matrices » The MATLAB Blog - MATLAB & Simulink
  1 Comment
Anthony
Anthony on 14 Aug 2025

That's excellent! Our lab has been looking forward to this update, and I was excited to see it implemented in the most recent release. Keep us posted on when/if there is a timeline for half precision. We've also recently been exploring using the mexfunction/mexcuda interface for float16 CSR SpMM using CUDA/cuSparse (float32 computeType). Thanks!

Sign in to comment.

More Answers (2)

Joss Knight
Joss Knight on 31 Aug 2024
Half support is not currently planned for sparse.

Walter Roberson
Walter Roberson on 30 Aug 2024
This is not scheduled for R2024b.
If there is a timeline, then it is not publically available.

Products


Release

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!