The default value of __CUDA_ARCH__ macro causes the vscode intellisence to report errors

That macro is not defined by any header files. It is defined by the compiler during certain phases as it is compiling code.

intellisense doesn’t work well with CUDA. You can find lots of forum posts to that effect.

If you decide to try to “fix” intellisense, my suggestion is that any changes you make would be wrapped in an ifdef conditioned on the __INTELLISENSE__ macro, so as to be certain to have no effect on actual code compilation.

For example:

#ifdef __INTELLISENSE__
#define __CUDA_ARCH__ 800
#endif