We can now create a new Project as CUDA 11.8 Runtime by Visual Studio, but it fails

We can now create a new Project CUDA 11.8 by Runtime Visual Studio, but it fails.
This Project can be created as follows:
File => New => Project => Create a new project => CUDA 11.8 Runtime

However, a console application created fails by giving the following error message:

C:\Users\Public\Visual Studio Samples\3 CUDA Apps\CudaRuntime1\x64\Debug\CudaRuntime1.exe (process 11892) exited with code 1.


Although I could write relatively complex C++ We can now create a new Project CUDA 11.8 Runtime, but it fails.
This Project can be created as follows:
File => New => Project => Create a new project => CUDA 11.8 Runtime

However, a console application created fails by giving the following error message:

C:\Users\Public\Visual Studio Samples\3 CUDA Apps\CudaRuntime1\x64\Debug\CudaRuntime1.exe
(process 11892) exited with code 1.

To automatically close the console when debugging stops,
enable Tools->Options->Debugging->Automatically close the console when debugging stops.

Press any key to close this window . . .


Although I could write relatively complex C++ programs 20 years ago,
C++ hasa changed a lot since then.

As the GitHub samples using CUDA 11.8 and producing graphical output fails
because of OpenGL problem, I am trying to figure out what is causing this problem.

I will appreciate any help.rograms 20 years ago,
C++ has changed a lot since then.

As the GitHub samples using CUDA 11.8 and producing graphical output fails
because of OpenGL problem, I am trying to figure out what is causing these problems.

I will appreciate any help.

Given that you can build and compile, this sounds like a driver or runtime issue rather than a tools issue. I suggest posting this under one of the CUDA forums.

The error occurs at line 91 of kernel.cu. The line is “addKernel<<<1, size>>>(dev_c, dev_a, dev-b)”.
This construct is a special addition by NVIDIA and is for
“// Launch a kernel on the GPU with one thread for each element.”.

The error indicated by Visual Studio is
"E0029 expected an expression CudaRutime1 kernel.cu line 91.

“kernel” is a function that is executed by GPU. Please refer to NVIDIA pages explaining "kernel fuction, for example,

CUDA Refresher: The CUDA Programming Model | NVIDIA Technical Blog.

<<< >>> is used to indicate <<<numBlocks, shreadsPerBlock>>>.

However, I am not understanding this mechanism fully.


I opende the page of CUDA forums", but I cannot find a link to add a new post.

I would recommend specifically posting to the programming and performance forum here CUDA Programming and Performance - NVIDIA Developer Forums