Running NPP library with CUDA

Hi All,

I have some doubts on How to use NPP library with CUDA.

  1. Will NPP functions run without a GPU installed in my PC ?
    If yes , which library files and header files i have to include. (I am saying about emulation mode).

  2. My application requires to do an affine transformation. i can do it using nppiWarpAffine.
    But i need to know how this npp function can be called inside a CUDA kernel so that i can utilize parallel processing capability of the GPU.
    Can i directly use the NPP function inside the CUDA kernel?

  3. When i compiled the sample code which came with NPP 1.1 , i get the following error.
    error PRJ0019: A tool returned an error code from “Copying DLLs…”

  4. i tried a similar program like boxFilter and dealt with many link errors. what surprise me is that , i have added all library and header files as in the example program(boxFilter), but still i get many link errors.

I am working with Windows Vista, CUDA Toolkit 3.0, NPP 1.1

Thanks and Regards
Sarath

No. NPP is a CUDA library and requires CUDA HW to run on.

NPP is a C API. You invoke NPP functions from the host. The NPP functions then call kernels to perform work.

The NPP SDK example programs have a Visual Studio post-build step that tries to copy the npp and FreeImage DLLs into the binary folder, where the actual executables reside so that the dynamic linker finds them. This might be a bug because of file names having changed and the VisualStudio projects weren’t updated properly. It is easy to work around this by copying the necessary DLLs manually.

The sample programs compiled fine when we tested it before the release. Without seeing the actual linker errors it’s difficult to make a diagnosis as to what causes them.

I try to run NPP sample project with VC2005 (CUDA 3.0, NPP1.1). My project is in D:\NPP_1_1_Windows32\SDK\samples\boxFilter. I copied FreeImage.dll and npp32_11.dll to D:\NPP_1_1_Windows32\SDK\bin\win32, but still saw linking errors. I tried VC2008 express and same thing occurred. The error messages are as follow:

1>Linking…
1>boxFilter.obj : error LNK2019: unresolved external symbol “class std::basic_ostream<char,struct std::char_traits > & __cdecl npp::operator<<(class std::basic_ostream<char,struct std::char_traits > &,class npp::Exception const &)” (??6npp@@YAAAV?$basic_ostream@DU?char_traits@D@std@@@std@@AAV12@ABVException@0@@Z) referenced in function __catch_main$0
1>boxFilter.obj : error LNK2019: unresolved external symbol “void __cdecl npp::saveImage(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class npp::ImageCPU<unsigned char,1,class npp::AllocatorCPU<unsigned char,1> > const &)” (?saveImage@npp@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$ImageCPU@E$00V?$AllocatorCPU@E$00@npp@@@1@@Z) referenced in function _main
1>boxFilter.obj : error LNK2019: unresolved external symbol “public: __thiscall npp::Exception::Exception(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,unsigned int)” (??0Exception@npp@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0I@Z) referenced in function _main

I try to run NPP sample project with VC2005 (CUDA 3.0, NPP1.1). My project is in D:\NPP_1_1_Windows32\SDK\samples\boxFilter. I copied FreeImage.dll and npp32_11.dll to D:\NPP_1_1_Windows32\SDK\bin\win32, but still saw linking errors. I tried VC2008 express and same thing occurred. The error messages are as follow:

1>Linking…
1>boxFilter.obj : error LNK2019: unresolved external symbol “class std::basic_ostream<char,struct std::char_traits > & __cdecl npp::operator<<(class std::basic_ostream<char,struct std::char_traits > &,class npp::Exception const &)” (??6npp@@YAAAV?$basic_ostream@DU?char_traits@D@std@@@std@@AAV12@ABVException@0@@Z) referenced in function __catch_main$0
1>boxFilter.obj : error LNK2019: unresolved external symbol “void __cdecl npp::saveImage(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class npp::ImageCPU<unsigned char,1,class npp::AllocatorCPU<unsigned char,1> > const &)” (?saveImage@npp@@YAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$ImageCPU@E$00V?$AllocatorCPU@E$00@npp@@@1@@Z) referenced in function _main
1>boxFilter.obj : error LNK2019: unresolved external symbol “public: __thiscall npp::Exception::Exception(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::basic_string<char,struct std::char_traits,class std::allocator > const &,unsigned int)” (??0Exception@npp@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0I@Z) referenced in function _main

Those missing symbols are all from the UtilNPP library. I believe that the NPP_SDK solution file has UtilNPP defined as a dependency to the actual samples and that way VisualStudio should pull it in for linking automatically. In order to debug this you could try to configure the project to explicitly link against UtilNPP.

Thanks Frank for your reply,

i have bought a GT220 GPU card. But unfortunately my PC uses this card for display. I am not able to change the display adapter to onboard chipset.

So will this affect my NPP based CUDA program performance.?

Will it create any memory issues.?

Thanks and Regards

Sarath

Even after burning memory for display, GT220 still has enough memory to hold your input data. If you are willing to use GPU solely for CUDA then take a look at the NVIDIA Tesla line (pretty expensive though)