I'm using the OpenCL clBuildProgram()
API function on a program created from a source string. The source is:
kernel void foo(int val, write_only pipe int outPipe)
{
write_pipe(outPipe, &val);
}
I compile it using NVIDIA CUDA 12.9.86's OpenCL implementation. For command-line options, I use: -cl-std=CL2.0
. The build fails, and I get the following build log:
ptxas fatal : Unresolved extern function '__write_pipe_2'
I didn't ask for the __write_pipe_2
function - NVIDIA put it there in its implementation of write_pipe()
- which is an OpenCL 2.0-specified intrinsic function available in kernel code. So, why doesn't NVIDIA's OpenCL implementation provide the object code (or source code) for that function, during the build? Did I need to do something extra to get my build to succeed?
cl.hpp
, I also definedCL_VERSION_2_0
to be 1.read_pipe (outPipe, 0, 0, &val)
, you should get it to call __write_pipe_1. That won't work for you, though. This has been a driver bug in the past.