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]; diff --git a/lite/tests/kernels/topk_compute_test.cc b/lite/tests/kernels/topk_compute_test.cc index 699dd000fd49080e7b722754c6c515fb2b77a40c..c54d297518cb0438e1851869b58ac060114d6281 100644 --- a/lite/tests/kernels/topk_compute_test.cc +++ b/lite/tests/kernels/topk_compute_test.cc @@ -50,11 +50,11 @@ class TopkComputeTester : public arena::TestCase { out_dims[out_dims.size() - 1] = k_; out_val->Resize(out_dims); out_ind->Resize(out_dims); - auto* out_val_data = out_val->mutable_data(); - auto* out_ind_data = out_ind->mutable_data(); + auto* out_val_data = out_val->template mutable_data(); + auto* out_ind_data = out_ind->template mutable_data(); auto* x = scope->FindTensor(x_); - const auto* x_data = x->data(); + const auto* x_data = x->template data(); int m = out_dims.production() / k_; int n = x_dims_[x_dims_.size() - 1];