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
15
size_t
getCUDAdeviceFreeMem
()
16
{
17
size_t
free, total;
18
cudaErrorCheck
(
cudaMemGetInfo
(&free, &total),
"cudaMemGetInfo failed!"
);
19
return
free;
20
}
cudaErrorCheck
#define cudaErrorCheck(ans, cause)
Definition:
CUDAerror.h:21
CUDAruntime.hpp
handle CUDA/HIP runtime selection.
cudaMemGetInfo
#define cudaMemGetInfo
Definition:
cuda2hip.h:145
getCUDAdeviceFreeMem
size_t getCUDAdeviceFreeMem()
Definition:
CUDAruntime.cpp:15
src
Platforms
CUDA
CUDAruntime.cpp
Generated on Fri Jun 28 2024 10:45:16 for QMCPACK by
1.8.14