提交 94c73cb3 编写于 作者: Y yejianwu

fix broastcast check in eltwise

上级 4b69b083
......@@ -1192,12 +1192,23 @@ class EltwiseOp<DeviceType::GPU, T> : public Operation {
for (int i = 0; i < input_size; ++i) {
if (ws->HasTensor(operator_def_->input(i)) &&
ws->GetTensor(operator_def_->input(i))->is_weight()) {
MACE_CHECK(TransformFilter<T>(
context,
operator_def_.get(),
i,
OpenCLBufferType::ARGUMENT,
mem_type) == MaceStatus::MACE_SUCCESS);
if (ws->GetTensor(operator_def_->input(i))->dim_size() == 1) {
MACE_CHECK(TransformFilter<T>(
context,
operator_def_.get(),
i,
OpenCLBufferType::ARGUMENT,
mem_type) == MaceStatus::MACE_SUCCESS);
} else if (ws->GetTensor(operator_def_->input(i))->dim_size() == 4) {
MACE_CHECK(TransformFilter<T>(
context,
operator_def_.get(),
i,
OpenCLBufferType::IN_OUT_CHANNEL,
mem_type) == MaceStatus::MACE_SUCCESS);
} else {
MACE_NOT_IMPLEMENTED;
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册