# cudaErrorInvalidConfiguration

**URL:** <https://forums.developer.nvidia.com/t/cudaerrorinvalidconfiguration/2492>\
**Category:** CUDA Programming and Performance\
**Created:** [January 31, 2008, 9:44am UTC](https://forums.developer.nvidia.com/t/cudaerrorinvalidconfiguration/2492 "2008-01-31T09:44:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkeir](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@pkeir](https://forums.developer.nvidia.com/u/pkeir)\
**Post date:** [January 31, 2008, 9:44am UTC](https://forums.developer.nvidia.com/t/cudaerrorinvalidconfiguration/2492/1 "2008-01-31T09:44:58Z")

</div>

Hi,

When I run my kernel,

```auto
integrate_kernel<<<dimGrid, dimBlock>>>(foo,bar);

```

using

```auto
int gridx = 16;

int gridy = 16;

int blockx = 16;

int blockx = 16;

dim3 dimGrid(gridx, gridy, 1);

dim3 dimBlock(blockx, blocky, 1);

```

I get no problems, but if I use 32 instead of 16 throughout, I get an error; found by calling ‘cudaGetLastError()’ immediately after the kernel call. The cudaError is ‘cudaErrorInvalidConfiguration’, and the string is “invalid configuration argument”.

I can see that I’m getting a much faster runtime using 32, but I’m concerned about this (non-halting) error. I’m not using a lot of threads here. Any thoughts?

---

<div class="post-metadata">

**Author:** ![DenisR](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@DenisR](https://forums.developer.nvidia.com/u/DenisR)\
**Post date:** [January 31, 2008, 10:04am UTC](https://forums.developer.nvidia.com/t/cudaerrorinvalidconfiguration/2492/2 "2008-01-31T10:04:21Z")

</div>

32\*32 = 1024. If you look in the programming guide you will see that the maximum amount of threads per block is 512. That is why you get the error.

The reason it is faster is that it has not run at all.
