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

Method Free

src/core/device/cuda_gpu.cc:199–204  ·  view source on GitHub ↗

Free gpu memory.

Source from the content-addressed store, hash-verified

197
198/// Free gpu memory.
199void CudaGPU::Free(void* ptr) {
200 if (ptr != nullptr) {
201 CUDA_CHECK(cudaSetDevice(id_));
202 pool_->Free(ptr);
203 }
204}
205
206void CudaGPU::Sync() {
207 Exec([this](Context* ctx) { CUDA_CHECK(cudaDeviceSynchronize()); }, {}, {},

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected