Skip to content Skip to sidebar Skip to footer

Opencl Kernel Cannot Work As Expected (pyopencl)

I wrote an OpenCL function to increase 64-bits float point value in an array. But the results is different between CPU and GPU. import numpy as np import pyopencl as cl CL_INC = '

Solution 1:

Your GPU probably doesn't support double-precision floating point numbers. Have you checked for support for the cl_khr_fp64 extension?

Your kernel must also declare its requirement:

#pragma OPENCL EXTENSION cl_khr_fp64 : enable

For more details, see the cl_khr_fp64 extension documentation.

Post a Comment for "Opencl Kernel Cannot Work As Expected (pyopencl)"