NVIDIA / CUDALibrarySamples

CUDA Library Samples
Other
1.59k stars 341 forks source link

[cuSPARSELt][spmma] spmma_example raised segmentation fault #124

Closed FrostML closed 1 year ago

FrostML commented 1 year ago

I tried to run spmma_example.cpp on a A10.

The default mnk seems fine. But when I tried to set m=32, n=8192, k=8192, the memory should be enough but the bin spmma_example just failed and raised Segmentation fault (core dumped). Wondering why

https://github.com/NVIDIA/CUDALibrarySamples/tree/master/cuSPARSELt/spmma

qanhpham commented 1 year ago

The n and k parameters are quite high. They can make static array overflowed: __half hB[k * n]; Can you try using dynamic allocation (using new) for the arrays?

FrostML commented 1 year ago

Lesson learned. Thanks a lot.