MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / UnifiedMemoryDeallocate

Method UnifiedMemoryDeallocate

tensorflow/stream_executor/cuda/cuda_driver.cc:836–848  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

834}
835
836/* static */ void GpuDriver::UnifiedMemoryDeallocate(GpuContext* context,
837 void* location) {
838 ScopedActivateContext activation(context);
839 CUdeviceptr pointer = absl::bit_cast<CUdeviceptr>(location);
840 CUresult res = cuMemFree(pointer);
841 if (res != CUDA_SUCCESS) {
842 LOG(ERROR) << "failed to free unified memory at " << location
843 << "; result: " << ToString(res);
844 } else {
845 VLOG(2) << "deallocated unified memory at " << location << " for context "
846 << context->context();
847 }
848}
849
850/* static */ void* GpuDriver::HostAllocate(GpuContext* context, uint64 bytes) {
851 ScopedActivateContext activation(context);

Callers

nothing calls this directly

Calls 2

ToStringFunction · 0.70
contextMethod · 0.45

Tested by

no test coverage detected