Error: Calls are not supported

I am having a compile problem with a kernel that is using sqrt, the compiler reported:

Error: Calls are not supported (found non-inlined call to _Z4sqrtf)

As far as I understood this is an available function in the kernel so what might be wrong?

Can’t think of too much here… but just couple of basic checks…

  1. u must have included math.h

  2. math functions are specifically defined for float operations as well. if “sqrt” is for int values then sqrtf() is for float values. Just make sure that you are passing the variable of according data type to the function.

Maybe you should avoid including math.h and use CUDA’s predefined sqrtf. Calls in device have to be inlined, but the CRT certainly is not.