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

[Refactoring Tensor PR #7] differentiate deprecated interfaces #39228

Merged
merged 2 commits into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions paddle/fluid/framework/variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class Variable {
private:
// This method hides type T, so it doesn't appear as a template parameter of
// Variable.
pten::TensorInplaceVersion* InplaceVersionCounter();
pten::DenseTensor::InplaceVersion* InplaceVersionCounter();

public:
void SetInplaceVersionToZero();
Expand Down Expand Up @@ -114,8 +114,8 @@ class Variable {
std::shared_ptr<Placeholder> holder_;
};

inline pten::TensorInplaceVersion* Variable::InplaceVersionCounter() {
pten::TensorInplaceVersion* version_counter_ptr(nullptr);
inline pten::DenseTensor::InplaceVersion* Variable::InplaceVersionCounter() {
pten::DenseTensor::InplaceVersion* version_counter_ptr(nullptr);
if (IsType<framework::LoDTensor>()) {
version_counter_ptr =
&GetMutable<framework::LoDTensor>()->InplaceVersionCounter();
Expand Down
2 changes: 1 addition & 1 deletion paddle/pten/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ cc_library(kernel_context SRCS kernel_context.cc DEPS pten_enforce pten_context)
cc_library(tensor_base SRCS tensor_base.cc allocator.cc storage.cc DEPS pten_enforce)
cc_library(tensor_meta SRCS tensor_meta.cc DEPS pten_enforce mixed_vector)
cc_library(lod_utils SRCS lod_utils.cc DEPS pten_enforce mixed_vector)
cc_library(dense_tensor SRCS dense_tensor.cc DEPS convert_utils tensor_meta tensor_base)
cc_library(dense_tensor SRCS dense_tensor.cc dense_tensor_impl.cc DEPS convert_utils tensor_meta tensor_base)
cc_library(pten_device_context SRCS device_context.cc DEPS tensor_base )
cc_library(meta_tensor SRCS meta_tensor.cc DEPS tensor_base tensor_meta dense_tensor)
cc_library(infermeta_utils SRCS infermeta_utils.cc DEPS meta_tensor)
Expand Down
Loading