# CUFFT with size 1 Is this a bug?

**URL:** <https://forums.developer.nvidia.com/t/cufft-with-size-1-is-this-a-bug/5613>\
**Category:** CUDA Programming and Performance\
**Created:** [September 23, 2008, 6:15am UTC](https://forums.developer.nvidia.com/t/cufft-with-size-1-is-this-a-bug/5613 "2008-09-23T06:15:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shinkee](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@shinkee](https://forums.developer.nvidia.com/u/shinkee)\
**Post date:** [September 23, 2008, 6:15am UTC](https://forums.developer.nvidia.com/t/cufft-with-size-1-is-this-a-bug/5613/1 "2008-09-23T06:15:01Z")

</div>

Currently I’m implementing CUFFT in a big software package. The software package came with a test program for FFT. The CUFFT failed as the test program was passing an input array of size 1 to be calculated by CUFFT. Yea I know that it doesn’t really make sense to calculate FFT of array with size 1, but I still kinda expect it to give the correct answer (even if it is trivial) instead of giving me the CUFFT\_INVALID\_PLAN error.

So is this considered a bug? From what I can see, this can be addressed by a simple IF case and doesn’t need to go through the kernel code when the input size is 1. I guessed programmer shouldn’t be expected to be aware of such limitation of CUFFT.

---

<div class="post-metadata">

**Author:** ![jack](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/jack/32/12069_2.png) [@jack](https://forums.developer.nvidia.com/u/jack)\
**Post date:** [September 23, 2008, 1:16pm UTC](https://forums.developer.nvidia.com/t/cufft-with-size-1-is-this-a-bug/5613/2 "2008-09-23T13:16:33Z")

</div>

Does FFTW have the same behavior? I would imagine that the CUDA developers were trying to mimic the behavior of FFTW as closely as possible.

---

<div class="post-metadata">

**Author:** ![shinkee](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@shinkee](https://forums.developer.nvidia.com/u/shinkee)\
**Post date:** [September 24, 2008, 10:38am UTC](https://forums.developer.nvidia.com/t/cufft-with-size-1-is-this-a-bug/5613/3 "2008-09-24T10:38:44Z")

</div>

Nope, it’s not the same as FFTW.  
FFTW does give the correct answer for this
