release MUL and ADD operator on CUDA

This commit is contained in:
wanli 2023-02-10 19:33:59 +08:00
parent 96a45e842e
commit c8f5e228fc
2 changed files with 3 additions and 2 deletions

View File

@ -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> >
{

View File

@ -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.");
}
}();