mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 22:44:02 +08:00
release MUL and ADD operator on CUDA
This commit is contained in:
parent
96a45e842e
commit
c8f5e228fc
@ -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> >
|
||||
{
|
||||
|
@ -112,7 +112,7 @@ public:
|
||||
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;
|
||||
}
|
||||
@ -688,6 +688,7 @@ public:
|
||||
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.");
|
||||
}
|
||||
}();
|
||||
|
Loading…
Reference in New Issue
Block a user