提交 27630a89 编写于 作者: L Li Xinqi 提交者: Jinhui Yuan

no blob coping gdb function (#1196)



Former-commit-id: da21ecd6
上级 59b9db64
......@@ -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<Blob*>(gpu_blob_ptr);
char* cpu_body_ptr = reinterpret_cast<char*>(malloc(gpu_blob->ByteSizeOfDataContentField()));
cudaMemcpy(cpu_body_ptr, gpu_blob->dptr(), gpu_blob->ByteSizeOfDataContentField(),
cudaMemcpyDeviceToHost);
return new Blob(const_cast<Regst*>(gpu_blob->regst()), gpu_blob->blob_desc_ptr(),
reinterpret_cast<char*>(gpu_blob->mut_header_ptr()), cpu_body_ptr);
}
} // namespace gdb
} // namespace oneflow
......@@ -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<typename T>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册