Skip to content

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 force-pushed the allocation_rearrange_pr branch from 8f19489 to 23ce28d Compare December 22, 2021 05:22
@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,其它我没问题

@jim19930609 jim19930609 force-pushed the allocation_rearrange_pr branch from 160c131 to 8c08dc6 Compare December 23, 2021 12:33
@@ -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.

这个头文件建议删除下

@jim19930609 jim19930609 force-pushed the allocation_rearrange_pr branch from e37c48b to c8f31ba Compare December 24, 2021 03:55
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