mirror of
https://github.com/opencv/opencv.git
synced 2026-12-01 21:58:44 -06:00
cuda support and Layer Split + per-op executors
This commit is contained in:
@@ -48,6 +48,11 @@
|
||||
|
||||
namespace cv {
|
||||
namespace dnn {
|
||||
|
||||
#ifdef HAVE_CUDA
|
||||
void registerConv2CudaBackend(); // defined in layers/conv2_layer.cpp (plain cv::dnn namespace)
|
||||
#endif
|
||||
|
||||
CV__DNN_INLINE_NS_BEGIN
|
||||
|
||||
static Mutex* __initialization_mutex = NULL;
|
||||
@@ -76,6 +81,10 @@ public:
|
||||
} // namespace
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CUDA
|
||||
void registerCudaCommonExecs(); // op_cuda.cpp (inline namespace)
|
||||
#endif
|
||||
|
||||
void initializeLayerFactory()
|
||||
{
|
||||
CV_TRACE_FUNCTION();
|
||||
@@ -84,6 +93,12 @@ void initializeLayerFactory()
|
||||
static ProtobufShutdown protobufShutdown; CV_UNUSED(protobufShutdown);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CUDA
|
||||
// New graph engine: per-op CUDA executors.
|
||||
registerConv2CudaBackend();
|
||||
registerCudaCommonExecs();
|
||||
#endif
|
||||
|
||||
CV_DNN_REGISTER_LAYER_CLASS(If, IfLayer);
|
||||
CV_DNN_REGISTER_LAYER_CLASS(Loop, LoopLayer);
|
||||
CV_DNN_REGISTER_LAYER_CLASS(Scan, ScanLayer);
|
||||
|
||||
Reference in New Issue
Block a user