diff options
Diffstat (limited to 'cuda/meminfo.cu')
-rw-r--r-- | cuda/meminfo.cu | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/cuda/meminfo.cu b/cuda/meminfo.cu new file mode 100644 index 0000000..aebe709 --- /dev/null +++ b/cuda/meminfo.cu @@ -0,0 +1,14 @@ +#include <iostream> + +using namespace std; + +int +main(void) +{ + size_t free_bytes; + size_t total_bytes; + cudaSetDevice(0); + cudaMemGetInfo( &free_bytes, &total_bytes ); + cerr << "[cnn] Memory Free (MB): " << free_bytes/1024/1024 << "/" << total_bytes/1024/1024 << endl << endl; +} + |