oneMKL
oneMKL copied to clipboard
Every `CUDA_ERROR_FUNC` could allow a memory leak
If CUDA_ERROR_FUNC, CUSOLVER_ERROR_FUNC etc is called and the result != CUDA_SUCCESS, a cuda_error will be thrown and any allocated pointers will not be deallocated, causing a memory leak.
We should replace each *_ERROR_FUNC with ERROR_FUNC_WITH_POINTERS_TO_DEALLOCATE or something like that. This would also provide a list of pointers to deallocate in the event that the operation does not return CUDA_SUCCESS, preventing memory leaks.
Ping @Alexander-Kleymenov