MCPcopy Create free account
hub / github.com/apache/singa / GetMemUsage

Method GetMemUsage

src/core/memory/memory.cc:30–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29namespace singa {
30std::pair<size_t, size_t> CnMemPool::GetMemUsage() {
31 size_t free, total;
32 auto status = cnmemMemGetInfo(&free, &total, NULL);
33 CHECK_EQ(status, cnmemStatus_t::CNMEM_STATUS_SUCCESS)
34 << cnmemGetErrorString(status);
35 return std::make_pair(free, total);
36}
37std::pair<size_t, size_t> CnMemPool::GetMemUsage(int id) {
38 CHECK_EQ(cudaSetDevice(id), cudaError_t::cudaSuccess);
39 size_t free, total;

Callers 1

GetAllocatedMemMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected