未验证 提交 2b258c58 编写于 作者: Y YuanRisheng 提交者: GitHub

move clear (#55844)

上级 4aad9c69
......@@ -190,6 +190,11 @@ class DenseTensor : public TensorBase,
void set_storage_properties(
std::unique_ptr<StorageProperties>&& storage_properties);
void clear() {
holder_.reset();
meta_.offset = 0;
}
private:
friend class DenseTensorUtils;
friend class phi::distributed::DistTensor;
......
......@@ -57,11 +57,6 @@ void check_memory_size() const;
void set_layout(const DataLayout layout);
void clear() {
holder_.reset();
meta_.offset = 0;
}
void ShareBufferWith(const DenseTensor& tensor, bool only_buffer=false);
void ShareDataTypeWith(const DenseTensor& tensor) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册