QMCPACK
CUDAruntime.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2021 QMCPACK developers.
6 //
7 // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
8 //
9 // File created by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #include "CUDAruntime.hpp"
14 
16 {
17  size_t free, total;
18  cudaErrorCheck(cudaMemGetInfo(&free, &total), "cudaMemGetInfo failed!");
19  return free;
20 }
#define cudaErrorCheck(ans, cause)
Definition: CUDAerror.h:21
handle CUDA/HIP runtime selection.
#define cudaMemGetInfo
Definition: cuda2hip.h:145
size_t getCUDAdeviceFreeMem()
Definition: CUDAruntime.cpp:15