npp

CUDA NPP - unknown error upon GPU error check

若如初见. 提交于 2020-01-05 11:58:42
问题 I am trying to sum all the pixels in an image, and get the average of all pixels using the CUDA NPP library. My image is an 8-bit unsigned char grayscale image of dimension w256 x h1024 . I have tried to follow all the required rules of declaring pointers and passing the corresponding NPP-type pointers to the NPP functions. However, I am getting an unknown error when I perform GPU error checking on my code. I tried to debug it but, I can't seem to figure out as to where I am going wrong, and

CUDA NPP - unknown error upon GPU error check

大憨熊 提交于 2020-01-05 11:58:26
问题 I am trying to sum all the pixels in an image, and get the average of all pixels using the CUDA NPP library. My image is an 8-bit unsigned char grayscale image of dimension w256 x h1024 . I have tried to follow all the required rules of declaring pointers and passing the corresponding NPP-type pointers to the NPP functions. However, I am getting an unknown error when I perform GPU error checking on my code. I tried to debug it but, I can't seem to figure out as to where I am going wrong, and

Nvidia NPP nppiFilter produces garbage when convolving with 2d kernel

a 夏天 提交于 2019-12-13 13:11:00
问题 Nvidia Performance Primitives (NPP) provides the nppiFilter function for convolving a user-provided image with a user-provided kernel. For 1D convolution kernels, nppiFilter works properly. However, nppiFilter is producing a garbage image for 2D kernels. I used the typical Lena image as input: Here's my experiment with a 1D convolution kernel, which produces good output. #include <npp.h> // provided in CUDA SDK #include <ImagesCPU.h> // these image libraries are also in CUDA SDK #include

How can I convert Npp8u * to CUdeviceptr

那年仲夏 提交于 2019-12-08 05:33:26
问题 I am new to cuda driver Api interface but I think that CUdeviceptr looks like a handle parameter.So I confused about the convertion between CUdeviceptr and npp8u *. Npp8u * src; ...... unsigned char temp; temp = src; CUdeviceptr devPtr; ....... devPtr = (CUdeviceptr)temp; I try to write the convertion like above,is that right! 回答1: cuDevicePtr is, in fact, a raw pointer, not a handle. You can see the original architect of the CUDA driver and driver API discuss this here (and school me in the

CUDA, NPP Filters

爱⌒轻易说出口 提交于 2019-12-06 05:11:59
问题 The CUDA NPP library supports filtering of image using the nppiFilter_8u_C1R command but keep getting errors. I have no problem getting the boxFilterNPP sample code up and running. eStatusNPP = nppiFilterBox_8u_C1R(oDeviceSrc.data(), oDeviceSrc.pitch(), oDeviceDst.data(), oDeviceDst.pitch(), oSizeROI, oMaskSize, oAnchor); But if I change it to use nppiFilter_8u_C1R instead, eStatusNPP return the error -24 (NPP_TEXTURE_BIND_ERROR). The code below is the alterations I made to the original