From 27630a894930570a3c70eb0208b9b5c3cf0a8bf2 Mon Sep 17 00:00:00 2001 From: Li Xinqi Date: Sun, 2 Sep 2018 16:42:40 +0800 Subject: [PATCH] no blob coping gdb function (#1196) Former-commit-id: da21ecd6eb0bf460e120095fd9d07e1ca3833159 --- oneflow/core/register/blob.cpp | 13 ------------- oneflow/core/register/blob.h | 1 - 2 files changed, 14 deletions(-) diff --git a/oneflow/core/register/blob.cpp b/oneflow/core/register/blob.cpp index 04859a1d5f..bce1c7c47a 100644 --- a/oneflow/core/register/blob.cpp +++ b/oneflow/core/register/blob.cpp @@ -98,17 +98,4 @@ void Blob::CopyFrom(DeviceCtx* device_ctx, const Blob* rhs) { } } -namespace gdb { - -const Blob* CpuBlobCopyFromGpuBlobPtr(uint64_t gpu_blob_ptr) { - Blob* gpu_blob = reinterpret_cast(gpu_blob_ptr); - char* cpu_body_ptr = reinterpret_cast(malloc(gpu_blob->ByteSizeOfDataContentField())); - cudaMemcpy(cpu_body_ptr, gpu_blob->dptr(), gpu_blob->ByteSizeOfDataContentField(), - cudaMemcpyDeviceToHost); - return new Blob(const_cast(gpu_blob->regst()), gpu_blob->blob_desc_ptr(), - reinterpret_cast(gpu_blob->mut_header_ptr()), cpu_body_ptr); -} - -} // namespace gdb - } // namespace oneflow diff --git a/oneflow/core/register/blob.h b/oneflow/core/register/blob.h index c7ec70dd57..d6cf1e8e6b 100644 --- a/oneflow/core/register/blob.h +++ b/oneflow/core/register/blob.h @@ -75,7 +75,6 @@ class Blob final { void set_max_col_id(int32_t val); bool IsColValid() const { return col_id() <= max_col_id(); } const MemoryCase& mem_case() const; - const Regst* regst() const { return regst_; } private: template -- GitLab