未验证 提交 4c267e92 编写于 作者: H huzhiqiang 提交者: GitHub

[BUG FIX]fix armv7 model loading issue(#2836)

上级 f3688e70
......@@ -152,10 +152,8 @@ void ParamDesc::SetDim(const std::vector<int64_t>& dim) {
auto& data_builder = desc_->GetField<PrimaryListBuilder<char>>("data"); \
auto data = data_builder.data(); \
size_t size = data_builder.size() / sizeof(T); \
auto* data_ptr = reinterpret_cast<const T*>(data); \
for (size_t i = 0; i < size; ++i) { \
res.push_back(data_ptr[i]); \
} \
res.resize(size); \
memcpy(&res[0], data, data_builder.size()); \
return res; \
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册