From f7af341ba73a764a5711ed529dc466f960d15a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20And=C3=A9n?= Date: Thu, 17 Oct 2024 08:18:18 +0200 Subject: [PATCH] cuda: fix error handling --- include/cufinufft/impl.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/cufinufft/impl.h b/include/cufinufft/impl.h index 134505cda..543634f15 100644 --- a/include/cufinufft/impl.h +++ b/include/cufinufft/impl.h @@ -228,7 +228,8 @@ int cufinufft_makeplan_impl(int type, int dim, int *nmodes, int iflag, int ntran } } - if ((ier = cudaGetLastError())) { + if (cudaGetLastError() != cudaSuccess) { + ier = FINUFFT_ERR_CUDA_FAILURE; goto finalize; }