I’ve never read or heard that (but there may be something I don’t know, of course).
nvcc can compile modules that “contain” OpenCL kernel code but the only way I’ve ever seen or heard of that working is in the same way that g++ (or cl.exe on windows) can do so - using an OpenCL library call to “handle” the kernel code.
Here is an example of what I mean. (I’m pretty sure that is not what you mean.) In that case the filename extension is .cpp, not .cl. Here is a similar example showing how you can “force” nvcc to “look in” a .cl file. But again, without knowing what you expect the contents of the .cl file to look like, that may not be what you had in mind. I would not say in either of these cases that the nvcc compiler “understands” OpenCL kernel code.
As the error message indicates, by default nvcc won’t look in a file with an extension of .cl for anything (neither would g++). Furthermore, the -l switch is a direction to the linker, (just as it is for g++).
In the early days NVIDIA explicitly stated that it did not provide a standalone compiler for OpenCL code. Some things have changed since that description (for example now I am pretty sure that NVIDIA’s OpenCL library maintains a JIT cache) but I’ve never heard of NVIDIA providing a standalone compiler for OpenCL kernel code.
AFAIK people who want to inspect PTX associated with NVIDIA OpenCL implementation do something like this (which isn’t using/doesn’t need nvcc).