CUDA.jl icon indicating copy to clipboard operation
CUDA.jl copied to clipboard

Warn about unsupported CUSPARSE functionality

Open maleadt opened this issue 3 years ago • 2 comments
trafficstars

CUSPARSE's API coverage is fairly limited, e.g. sparse*sparse isn't supported, leading to bugs filed like https://github.com/JuliaGPU/CUDA.jl/issues/1264. Instead of silently allowing those operations, maybe we should consider throwing an error a la CUSPARSE does not support this operation.

maleadt avatar Dec 10 '21 15:12 maleadt

sparse * sparse is supported by cuSPARSE: https://github.com/JuliaGPU/CUDA.jl/issues/1264#issuecomment-992038154, but just not added to CUDA.jl CUDA.CUSPARSE yet.

As an alternative to warning, setting CUDA.allowscalar(false) prevents performing these unimplemented sparse operations siliently on CPU.

learning-chip avatar Dec 13 '21 02:12 learning-chip

As an alternative to warning, setting CUDA.allowscalar(false) prevents performing these unimplemented sparse operations siliently on CPU.

Sure, but that prompts people to file issues about adding that functionality, which often isn't feasible for sparse array functionality. And those API calls you mention don't typically support all formats; eagerly converting is often too expensive, so I think it would be better to error in that case.

maleadt avatar Dec 13 '21 07:12 maleadt