diff --git a/oneflow/core/register/blob.cpp b/oneflow/core/register/blob.cpp index 04859a1d5fcf616ec5e12d122aaee892b0851a4c..bce1c7c47a36f65fda614f807403c54e92044505 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 c7ec70dd57600f1325558d93c9d2f950d937e6d1..d6cf1e8e6b6b1f6cc494863233764165f9545cbe 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