File tree Expand file tree Collapse file tree
paddle/pten/api/lib/utils Expand file tree Collapse file tree Original file line number Diff line number Diff 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)) {
You can’t perform that action at this time.
0 commit comments