add main function to invoke GPU memory check
This commit is contained in:
parent
728d8c34c0
commit
436005cef5
1 changed files with 5 additions and 0 deletions
5
main.cu
5
main.cu
|
|
@ -10,4 +10,9 @@ void checkGpuMem() {
|
|||
total_m=(uint)total_t/1048576.0;
|
||||
used_m=total_m-free_m;
|
||||
printf("GPU memory usage: used = %f, free = %f MB, total = %f MB\n",used_m,free_m,total_m);
|
||||
}
|
||||
|
||||
int main() {
|
||||
checkGpuMem();
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue