diff --git a/pyclesperanto_prototype/_tier0/_cuda_execute.py b/pyclesperanto_prototype/_tier0/_cuda_execute.py index 16b9a814..82b603da 100644 --- a/pyclesperanto_prototype/_tier0/_cuda_execute.py +++ b/pyclesperanto_prototype/_tier0/_cuda_execute.py @@ -6,7 +6,7 @@ #define sampler_t int #define FLT_MIN 1.19209e-07 -#define FLT_MAX 1.fffffe127 +#define FLT_MAX 1e+37 #define MAX_ARRAY_SIZE 1000 @@ -461,10 +461,12 @@ def execute(anchor, opencl_kernel_filename, kernel_name, global_size, parameters # run a_kernel(grid, block, tuple(arguments)) except cp.cuda.compiler.CompileException as ce: - print(ce.source) - print(ce.get_message()) + error = [] for i, k in enumerate(cuda_kernel.split("\n")): - print(i, ":", k) + error.append(str(i) + ":" + k) + error.append(ce.get_message()) + error.append("CUDA compilation failed") + raise RuntimeError("\n".join(error)) #for i, a in enumerate(arguments): # print(i, type(a), a)