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

Method DeviceDeallocate

tensorflow/stream_executor/cuda/cuda_driver.cc:805–817  ·  view source on GitHub ↗

static */

Source from the content-addressed store, hash-verified

803}
804
805/* static */ void GpuDriver::DeviceDeallocate(GpuContext* context,
806 void* location) {
807 ScopedActivateContext activation(context);
808 CUdeviceptr pointer = absl::bit_cast<CUdeviceptr>(location);
809 CUresult res = cuMemFree(pointer);
810 if (res != CUDA_SUCCESS) {
811 LOG(ERROR) << "failed to free device memory at " << location
812 << "; result: " << ToString(res);
813 } else {
814 VLOG(2) << "deallocated " << location << " for context "
815 << context->context();
816 }
817}
818
819/* static */ void* GpuDriver::UnifiedMemoryAllocate(GpuContext* context,
820 uint64 bytes) {

Callers

nothing calls this directly

Calls 2

ToStringFunction · 0.70
contextMethod · 0.45

Tested by

no test coverage detected