Hello,
does cuda (nvcc 3.2) support non-inlined device functions for compute capability 2.0?
I could not find an up-to-date answer to that question. Older entries say, that fermi is going to support it…
I use “Cuda compilation tools, release 3.2, V0.2.1221” and compile with arch=sm_20 option and i get an “Error: External calls are not supported (found non-inlined call to …)” error.
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2010 NVIDIA Corporation
Built on Thu_Sep__9_17:06:50_PDT_2010
Cuda compilation tools, release 3.2, V0.2.1221
GPU:
GeForce GTX 470
Example:
kernel.cu
#include "devfunc.cuh"
#include "kernel.cuh"
__global__ void kernel() {
testfunc();
}
kernel.cuh
#ifndef _MY_KERNEL_CUH_
#define _MY_KERNEL_CUH_
__global__ void kernel();
#endif
devfunc.cu
#include "devfunc.cuh"
__device__ void testfunc() {
}
devfunc.cuh
#ifndef __TEST_FUNC_CUH_
#define __TEST_FUNC_CUH_
__device__ void testfunc();
#endif
main.cu
#include "kernel.cuh"
int main(int argc, char**argv) {
kernel<<<1,1>>>();
return 0;
}
nvcc -c -arch=sm_20 kernel.cu
./kernel.cu(5): Error: External calls are not supported (found non-inlined call to _Z8testfuncv)
related posts:
Incremental compilation in nvcc cuda
Calling a class from cuda-kernel
-
Edit: Example added
-
Edit: related entries added