Linking against NPP got error: undefined reference to nppGetStream

First time using NPP, and I am trying to use to convert image from camera with is grey-scale image with a depth of 10 bits to 8 bit.

Iam using 2 functions

NppStatus
nppiCopy_16u_C1R(const Npp16u * pSrc, int nSrcStep, Npp16u * pDst, int nDstStep, NppiSize oSizeROI);

and

NppStatus
nppiConvert_16u8u_C1R(const Npp16u * pSrc, int nSrcStep, Npp8u * pDst, int nDstStep, NppiSize oSizeROI);

However there are undefined references error when using those 2 functions:

Copy.compute_75.cudafe1.cpp:(.text+0xa20c): undefined reference to nppGetStream' Copy.compute_75.cudafe1.cpp:(.text+0xa35c): undefined reference to Stream’
Copy.compute_75.cudafe1.cpp:(.text+0xa390): undefined reference to Event' Copy.compute_75.cudafe1.cpp:(.text+0xa3b4): undefined reference to Stream’
Copy.compute_75.cudafe1.cpp:(.text+0xa414): undefined reference to `Event’

I read the document of NPP here: https://docs.nvidia.com/cuda/npp/index.html
and still do not sure where did I miss. Please help, here is the full line of linking command,

aarch64-linux-gnu-g++ -L/usr/local/cuda/targets/aarch64-linux/lib/ -L/usr/local/cuda/targets/aarch64-linux/lib/stubs/ -o “NPP” ./src/main.o -lpthread -lrt -ldl -lcuda -lcudart_static -lnppc_static -lnppicc_static -lnppisu_static -lnppidei_static

Thank for having a look.

Hi,

Please help to check if you are using the correct GPU architecture first.
For Jetson Nano, it should be compute_53 rather than compute_75.

There are some NPP sample in our CUDA sample directory.
It’s recommended to check its Makefile for more information also.

 /usr/local/cuda-10.0/samples/7_CUDALibraries 

Thanks.

Hi, can you tell how can I check the GPU architecture on Jetson Nano?

Hi,

Jetson Nano is compute_53.

You can find this information via device_query sample.

$ cd /usr/local/cuda/samples/1_Utilities/deviceQuery
$ sudo make
$ sudo ./deviceQuery

./deviceQuery Starting…

CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: “NVIDIA Tegra X1”
CUDA Driver Version / Runtime Version 10.0 / 10.0
CUDA Capability Major/Minor version number: 5.3

Or you can also find this information in our website:

Thanks.