Automated Dynamic Analysis of CUDA Programs