Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Unify Tensors PR #1] Replaced pten::Allocation with shared_ptr<memory::Allocation> for Storage #38301

Merged
merged 8 commits into from
Dec 24, 2021

Conversation

jim19930609
Copy link
Contributor

@jim19930609 jim19930609 commented Dec 21, 2021

PR types

New features

PR changes

Others

Describe

Replaced pten::Allocation with shared_ptrmemory::Allocation for Storage.

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@jim19930609 jim19930609 changed the title [Unify Tensors PR #3] Replaced pten::Allocation with shared_ptr<memory::Allocation> for Storage [Unify Tensors PR #1] Replaced pten::Allocation with shared_ptr<memory::Allocation> for Storage Dec 22, 2021
chenwhql
chenwhql previously approved these changes Dec 23, 2021
Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -15,6 +15,7 @@ limitations under the License. */
#pragma once

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不建议改这个文件,Tensor 可将接收的 Allocator 从 pten::Allocator 改为 memory::Allocator

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per offline discussion, replaced AllocateShared() interface with a virtual place() method.

Copy link
Contributor

@Shixiaowei02 Shixiaowei02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

除了 paddle/pten/core/allocator.h,其它我没问题

@@ -15,6 +15,7 @@ limitations under the License. */
#pragma once

#include <cstdint>
#include "paddle/fluid/memory/memory.h"
Copy link
Contributor

@Shixiaowei02 Shixiaowei02 Dec 24, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个头文件建议删除下

Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jim19930609 jim19930609 merged commit 42cf2be into PaddlePaddle:develop Dec 24, 2021
jim19930609 added a commit that referenced this pull request Dec 27, 2021
…tr<memory::Allocation> for Storage (#38301)"

This reverts commit 42cf2be.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants