MSB3721 error and CUDA 13.5 targets for a simple CUDA code [closed]
I am trying to run a simple sample of CUDA code: #include <iostream> #include <stdio.h> #include <cuda_runtime.h> using namespace std; __global__ void helloCUDA() { printf("Hello from GPU!\n"); } int main() { // Launch 1 block with 1 thread helloCUDA <<<1, 1 >>> (); // Check kernel launch errors cudaError_t error = cudaGetLastError(); if (error != cudaSuccess) { cout << "Kernel launch error: " << cudaGetErrorString(error) << endl; return -1; } // Wait for GPU execution to finish error = cudaDeviceSynchronize(); if (error != cudaSuccess) { cout << "GPU execution error: " << cudaGetErrorString(e
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.