Merge pull request #16092 from YashasSamaga:cuda4dnn-conv-act-fuse
authorYashas Samaga B L <yashas_2010@yahoo.com>
Sat, 14 Dec 2019 19:26:58 +0000 (00:56 +0530)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Sat, 14 Dec 2019 19:26:58 +0000 (22:26 +0300)
commit17c485eb03a8db9a19c4b5b82fcf1a906aa9d6ce
treeece60c0b5de4e5f079a94ee417771db3568dc8f4
parent5b0b59ecfb1b670fa3a152a8b2b0048d4b128b31
Merge pull request #16092 from YashasSamaga:cuda4dnn-conv-act-fuse

cuda4dnn: fuse activations with convolutions

* fuse ReLU, ReLU6, TanH, Sigmoid with conv

* fix OpenCL errors

* improve ReLU, add power, swish and mish

* fix missing fusion entries

* fix handling of unsetAttached

* remove whole file indentation

* optimize power = 1.0, use IDENTITY instead of NONE

* handle edge case: change backend and then clear
modules/dnn/src/cuda/bias_activation.cu [new file with mode: 0644]
modules/dnn/src/cuda4dnn/kernels/bias_activation.hpp [new file with mode: 0644]
modules/dnn/src/cuda4dnn/primitives/convolution.hpp
modules/dnn/src/dnn.cpp
modules/dnn/src/layers/convolution_layer.cpp