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

Method ~BaseGPUDevice

tensorflow/core/common_runtime/gpu/gpu_device.cc:424–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

422}
423
424BaseGPUDevice::~BaseGPUDevice() {
425 delete gpu_device_info_;
426 for (auto sb : scratch_) gpu_allocator_->DeallocateRaw(sb);
427 for (auto ctx : device_contexts_) ctx->Unref();
428 if (cuda_graph_cublas_workspace_ != nullptr) {
429 cudaError_t e_cu_free_cublas_worksapce = cudaFree(cuda_graph_cublas_workspace_);
430 if (e_cu_free_cublas_worksapce != cudaSuccess) {
431 LOG(ERROR) << std::string("free cuBLAS workspace failed ")
432 << cudaGetErrorString(e_cu_free_cublas_worksapce);
433 }
434 }
435}
436
437// This should be idempotent if already initialized.
438Status BaseGPUDevice::InitScratchBuffers() {

Callers

nothing calls this directly

Calls 2

DeallocateRawMethod · 0.45
UnrefMethod · 0.45

Tested by

no test coverage detected