This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# MIT license (c) 2022-2024 https://github.com/slowpeek | |
# Homepage: https://gist.github.com/slowpeek/006680bb06e671bc489d4a3274ff3d19 | |
: <<'README' | |
Applicable nvidia driver versions: 525, 530, 535, 545, 550 | |
ABOUT -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Macro for checking cuda errors following a cuda launch or api call | |
#define cudaCheckError() { \ | |
cudaError_t e=cudaGetLastError(); \ | |
if(e!=cudaSuccess) { \ | |
printf("Cuda failure %s:%d: '%s'\n",__FILE__,__LINE__,cudaGetErrorString(e)); \ | |
exit(0); \ | |
} \ | |
} |