CUDA.jl
CUDA.jl copied to clipboard
Warn about unsupported CUSPARSE functionality
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.
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.
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.