Skip to content

Commit 3923918

Browse files
committed
fix conflict
1 parent 7a0e226 commit 3923918

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

paddle/pten/api/lib/utils/tensor_utils.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ pten::ScalarArray MakePtenScalarArrayFromVarList(
9191
vector_data.reserve(variable_list.size());
9292

9393
for (auto* var : variable_list) {
94-
paddle::framework::proto::VarType::Type data_type;
94+
paddle::experimental::DataType data_type;
9595
if (var->IsType<framework::LoDTensor>()) {
9696
const auto& tensor = var->Get<framework::LoDTensor>();
97-
data_type = tensor.type();
98-
if (data_type == paddle::framework::proto::VarType::INT64) {
97+
data_type = tensor.dtype();
98+
if (data_type == paddle::experimental::DataType::INT64) {
9999
const auto& tensor = var->Get<framework::LoDTensor>();
100100
if (tensor.IsInitialized() &&
101101
!platform::is_same_place(tensor.place(), expected_place)) {
@@ -105,7 +105,7 @@ pten::ScalarArray MakePtenScalarArrayFromVarList(
105105
} else {
106106
vector_data.push_back(*tensor.data<int64_t>());
107107
}
108-
} else if (data_type == paddle::framework::proto::VarType::INT32) {
108+
} else if (data_type == paddle::experimental::DataType::INT32) {
109109
const auto& tensor = var->Get<framework::LoDTensor>();
110110
if (tensor.IsInitialized() &&
111111
!platform::is_same_place(tensor.place(), expected_place)) {

0 commit comments

Comments
 (0)