Код: Выделить всё
#include
__global__ void hello(){
printf("Hello block: %u and thread: %u\n", blockIdx.x, threadIdx.x);
}
int main(){
hello();
cudaDeviceSynchronize();
}
Код: Выделить всё
%%shell
nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Jun__6_02:18:23_PDT_2024
Cuda compilation tools, release 12.5, V12.5.82
Build cuda_12.5.r12.5/compiler.34385749_0
Подробнее здесь: https://stackoverflow.com/questions/798 ... uda-c-code
Мобильная версия