diff --git a/lite/tests/kernels/compare_compute_test.cc b/lite/tests/kernels/compare_compute_test.cc index fbea52ab0d160982c1f5dd8385329a822c20e8e9..c46718f8bf672dc4460b59401c27a5b47f771daa 100644 --- a/lite/tests/kernels/compare_compute_test.cc +++ b/lite/tests/kernels/compare_compute_test.cc @@ -78,12 +78,12 @@ class CompareComputeTester : public arena::TestCase { auto* out = scope->NewTensor(out_); CHECK(out); out->Resize(x_dims_); - auto* out_data = out->mutable_data(); + auto* out_data = out->template mutable_data(); auto axis = axis_; auto* x = scope->FindTensor(x_); - const auto* x_data = x->data(); + const auto* x_data = x->template data(); auto* y = scope->FindTensor(y_); - auto* y_data_in = y->data(); + auto* y_data_in = y->template data(); using CompareFunc = Functor; if (x_dims_.size() == y_dims_.size()) { diff --git a/lite/tests/kernels/logical_compute_test.cc b/lite/tests/kernels/logical_compute_test.cc index f56b81d57a2102755cb12f89d268f9839494c268..4e379c0a9c3e07119388d9c835ebd4bdef1570b3 100644 --- a/lite/tests/kernels/logical_compute_test.cc +++ b/lite/tests/kernels/logical_compute_test.cc @@ -55,17 +55,17 @@ class LogicalTester : public arena::TestCase { void RunBaseline(Scope* scope) override { auto* x = scope->FindTensor(x_); - const bool* x_data = x->data(); + const bool* x_data = x->template data(); const Tensor* y = nullptr; const bool* y_data = nullptr; if (op_type_ != "logical_not") { y = scope->FindTensor(y_); - y_data = y->data(); + y_data = y->template data(); } auto* out = scope->NewTensor(out_); out->Resize(dims_); - bool* out_data = out->mutable_data(); + bool* out_data = out->template mutable_data(); for (int i = 0; i < dims_.production(); i++) { bool y_tmp = (y_data == nullptr) ? true : y_data[i]; out_data[i] = Functor()(x_data[i], y_tmp); diff --git a/lite/tests/kernels/lookup_table_compute_test.cc b/lite/tests/kernels/lookup_table_compute_test.cc index c4f9277d86128df808351007dda8d300da15a526..988077c6c319d5bcc8e50d6c8e5544331a86fe45 100644 --- a/lite/tests/kernels/lookup_table_compute_test.cc +++ b/lite/tests/kernels/lookup_table_compute_test.cc @@ -65,12 +65,12 @@ class LookupTableComputeTest : public arena::TestCase { out->Resize(out_dims); out->set_lod(ids->lod()); - auto ids_data = ids->data(); + auto ids_data = ids->template data(); auto ids_size = ids_dims.production(); - auto w_data = w->data(); + auto w_data = w->template data(); auto w_rows = w_dims[0]; auto w_cols = w_dims[1]; - auto out_data = out->mutable_data(); + auto out_data = out->template mutable_data(); for (int64_t i = 0; i < ids_size; i++) { auto id = ids_data[i];