提交 0c3cc381 编写于 作者: 刘琦

Merge branch 'fix_eltwise' into 'master'

fix broastcast check in eltwise

See merge request !993
...@@ -1171,12 +1171,23 @@ class EltwiseOp<DeviceType::GPU, T> : public Operation { ...@@ -1171,12 +1171,23 @@ class EltwiseOp<DeviceType::GPU, T> : public Operation {
for (int i = 0; i < input_size; ++i) { for (int i = 0; i < input_size; ++i) {
if (ws->HasTensor(operator_def_->input(i)) && if (ws->HasTensor(operator_def_->input(i)) &&
ws->GetTensor(operator_def_->input(i))->is_weight()) { ws->GetTensor(operator_def_->input(i))->is_weight()) {
MACE_CHECK(TransformFilter<T>( if (ws->GetTensor(operator_def_->input(i))->dim_size() == 1) {
context, MACE_CHECK(TransformFilter<T>(
operator_def_.get(), context,
i, operator_def_.get(),
OpenCLBufferType::ARGUMENT, i,
mem_type) == MaceStatus::MACE_SUCCESS); 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.
先完成此消息的编辑!
想要评论请 注册