mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Merge pull request #23255 from zihaomu:fused_cuda_naryeltwise
DNN: fuse conv+naryEletwise on CUDA backend.
This commit is contained in:
@@ -606,7 +606,8 @@ public:
|
||||
if(IS_DNN_CUDA_TARGET(preferableTarget))
|
||||
{
|
||||
Ptr<EltwiseLayer> eltwise = top.dynamicCast<EltwiseLayer>();
|
||||
if (!eltwise.empty()) // && eltwise->op == EltwiseLayer::SUM && eltwise->coeffs.empty())
|
||||
Ptr<NaryEltwiseLayer> naryEltwise = top.dynamicCast<NaryEltwiseLayer>();
|
||||
if (!eltwise.empty() || !naryEltwise.empty())
|
||||
{
|
||||
/* we also need to check that the eltwise input does not require shortcut mechanism
|
||||
* it's difficult to verify it here but we hope that `fuseLayers` has done the check already
|
||||
|
||||
Reference in New Issue
Block a user