Skip to content

Commit

Permalink
corrected FLT_MAX + better compiler error reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
haesleinhuepf committed Nov 28, 2022
1 parent 837b3ea commit 78059b7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pyclesperanto_prototype/_tier0/_cuda_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 78059b7

Please sign in to comment.