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

[BUG FIX][Compiling] Fix the issue that x86 lib can not compile successfully on MAC env

上级 91434cd3
......@@ -81,7 +81,7 @@ class SequenceReshapeFloatCompute
auto& param = *param_.get_mutable<operators::SequenceReshapeParam>();
auto* in = param.x;
auto* out = param.output;
auto out_data = out->mutable_data<T>();
auto out_data = out->template mutable_data<T>();
for (int i = 0; i < out->dims().production(); i++) {
out_data[i] = 0;
}
......@@ -109,9 +109,9 @@ class SequenceReshapeFloatCompute
}
}
out->Resize(std::vector<int64_t>{in->numel() / out_width, out_width});
auto* dst_ptr = out->mutable_data<T>();
auto* dst_ptr = out->template mutable_data<T>();
auto size = in->numel() * sizeof(T);
std::memcpy(dst_ptr, in->data<T>(), size);
std::memcpy(dst_ptr, in->template data<T>(), size);
}
virtual ~SequenceReshapeFloatCompute() = default;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册