Repository for all things CUDA.
CUDA can be run on the BU Shared Computing Cluster or through Google Colab.
module load nvidia-hpc
to load the NVIDIA sdk tools.nvcc <filename> -o <outfile>
!python --version
!nvcc --version
!pip install nvcc4jupyter
%load_ext nvcc4jupyter
%%cuda
at beginning of the block followed by your C++ code.
#include <stdio.h>
__global__ void hello(){
printf("Hello from block: %u, thread: %u\n", blockIdx.x, threadIdx.x);
}
int main(){
// numBlocks, numThreadsPerBlock
hello<<<4, 4>>>();
cudaDeviceSynchronize();
}