Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect padding for the data source of spPostprocess2D in convolutionFFT2D. #195

Open
xduan-icx opened this issue Apr 6, 2023 · 0 comments

Comments

@xduan-icx
Copy link

In "convolutionFFT2D.cu":

147 extern "C" void spPostprocess2D(void *d_Dst, void *d_Src, uint DY, uint DX,
148 uint padding, int dir) {
...
162 #if (USE_TEXTURE)
163 cudaTextureObject_t texComplex;
164 cudaResourceDesc texRes;
165 memset(&texRes, 0, sizeof(cudaResourceDesc));
166
167 texRes.resType = cudaResourceTypeLinear;
168 texRes.res.linear.devPtr = d_Src;
169 texRes.res.linear.sizeInBytes = sizeof(fComplex) * DY * (DX + padding);

Here the texture size based on "d_Src" should be "sizeof(fComplex) * DY * DX" because neither the data source passed from "test1()" in "main.cpp" nor the data access in kernel "spPostprocess2D_kernel" has padding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant