提交 bb0fdd16 编写于 作者: Y Yan Chunwei 提交者: tensor-tang

fix lite compile (#17858)

* fix lite compile

test=develop

* update

test=develop
上级 b6f71b8a
......@@ -39,6 +39,7 @@ class DDimHvy : public DDimBase<DDimHvy> {
}
value_type operator[](int offset) const { return data_[offset]; }
value_type& operator[](int offset) { return data_[offset]; }
std::vector<int64_t> Vectorize() const { return framework::vectorize(data_); }
......
......@@ -37,6 +37,7 @@ class DDimLite : public DDimBase<DDimLite> {
void ConstructFrom(const std::vector<value_type> &x) { data_ = x; }
value_type operator[](int offset) const { return data_[offset]; }
value_type &operator[](int offset) { return data_[offset]; }
std::vector<int64_t> Vectorize() const { return data_; }
size_t size() const { return data_.size(); }
......
......@@ -23,7 +23,7 @@ if (LITE_WITH_CUDA)
endif()
cc_library(model_parser_lite SRCS model_parser.cc DEPS ${model_parser_deps})
cc_test(test_op_desc_lite SRCS op_desc_test.cc DEPS cpp_op_desc_lite any_lite op_desc_lite compatible_pb_lite)
lite_cc_test(test_op_desc_lite SRCS op_desc_test.cc DEPS cpp_op_desc_lite op_desc_lite compatible_pb_lite)
add_subdirectory(pb)
add_subdirectory(cpp)
cc_library(var_desc_lite SRCS var_desc.cc DEPS framework_proto_lite)
cc_library(op_desc_lite SRCS op_desc.cc DEPS framework_proto_lite)
......@@ -27,9 +27,9 @@ bool ConcatOpLite::CheckShape() const {
}
bool ConcatOpLite::InferShape() const {
std::vector<framework::DDim> input_dims;
std::vector<lite::DDim> input_dims;
for (auto p : param_.x) {
input_dims.push_back(p->dims().data());
input_dims.push_back(p->dims());
}
size_t axis = static_cast<size_t>(param_.axis);
const size_t n = input_dims.size();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册