cuda-100-days / day4
Readme.md

Day 4

The focus of Day 4 is cuBLAS Vector Addition


Code Descriptions

cublas_vec_add.cu (Vector Addition using cuBLAS)

  • Implements vector addition using the cuBLAS SAXPY operation.
  • Avoids explicit cudaMemcpy by utilizing cublasSetVector and cublasGetVector.
  • Uses the cuBLAS API for optimized GPU-accelerated BLAS operations.
  • Performs C = A + B efficiently with cublasSaxpy.

Profiling and Running

To compile and run the CUDA program, use:

nvcc -o cublas_vec_add cublas_vec_add.cu -lcublas
./cublas_vec_add