Skip to content

Commit

Permalink
Merge pull request opencv#23243 from WanliZhong:accelerate_palm_det
Browse files Browse the repository at this point in the history
  • Loading branch information
alalek committed Feb 14, 2023
2 parents 76350cd + c8f5e22 commit 58d8a27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion modules/dnn/perf/perf_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct Layer_Slice : public TestBaseWithParam<tuple<Backend, Target> >
}
};

static std::set<std::string> nary_eltwise_cuda_deny_ops = {"add", "equal", "greater", "less", "mean", "mul", "pow", "sub"};
static std::set<std::string> nary_eltwise_cuda_deny_ops = {"equal", "greater", "less", "mean", "pow", "sub"};

struct Layer_NaryEltwise : public TestBaseWithParam<tuple<Backend, Target> >
{
Expand Down
3 changes: 2 additions & 1 deletion modules/dnn/src/layers/nary_eltwise_layers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class NaryEltwiseLayerImpl CV_FINAL : public NaryEltwiseLayer
op == OPERATION::LESS_EQUAL
);
if (op == OPERATION::MAX || op == OPERATION::MIN || op == OPERATION::SUM ||
op == OPERATION::PROD || op == OPERATION::DIV)
op == OPERATION::PROD || op == OPERATION::DIV || op == OPERATION::ADD)
return backendId == DNN_BACKEND_OPENCV || backendId == DNN_BACKEND_CUDA;
return backendId == DNN_BACKEND_OPENCV;
}
Expand Down Expand Up @@ -688,6 +688,7 @@ class NaryEltwiseLayerImpl CV_FINAL : public NaryEltwiseLayer
case OPERATION::SUM: return cuda4dnn::EltwiseOpType::SUM;
case OPERATION::PROD: return cuda4dnn::EltwiseOpType::PRODUCT;
case OPERATION::DIV: return cuda4dnn::EltwiseOpType::DIV;
case OPERATION::ADD: return cuda4dnn::EltwiseOpType::SUM;
default: CV_Error(Error::StsNotImplemented, "Other operators except MAX, MIN, SUM, PRODUCT and DIV are not supported with cuda.");
}
}();
Expand Down

0 comments on commit 58d8a27

Please sign in to comment.