cuda support and Layer Split + per-op executors

This commit is contained in:
Abhishek Gola
2026-06-08 18:06:28 +05:30
parent a5e4c04903
commit 72ffdfc170
32 changed files with 995 additions and 328 deletions

View File

@@ -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);