mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 15:53:03 +04:00
DNN: add the Winograd fp16 support (#23654)
* add Winograd FP16 implementation * fixed dispatching of FP16 code paths in dnn; use dynamic dispatcher only when NEON_FP16 is enabled in the build and the feature is present in the host CPU at runtime * fixed some warnings * hopefully fixed winograd on x64 (and maybe other platforms) --------- Co-authored-by: Vadim Pisarevsky <vadim.pisarevsky@gmail.com>
This commit is contained in:
@@ -303,7 +303,7 @@ CV__DNN_INLINE_NS_BEGIN
|
||||
// quantization type flag. The perChannel default is true, that means it contains the parameters
|
||||
// of per-Channel quantization. Otherwise, that means this layer contains per-Tensor quantized parameters.
|
||||
bool per_channel;
|
||||
bool useWinograd = true; // Flag whether to use Winograd to speed up 3x3 convolution.
|
||||
bool useWinograd = false; // Flag whether to use Winograd to speed up 3x3 convolution.
|
||||
static Ptr<BaseConvolutionLayer> create(const LayerParams& params);
|
||||
};
|
||||
|
||||
|
||||
@@ -1458,6 +1458,9 @@ CV__DNN_INLINE_NS_BEGIN
|
||||
/// @sa Net::setPreferableTarget
|
||||
CV_WRAP Model& setPreferableTarget(dnn::Target targetId);
|
||||
|
||||
/// @sa Net::enableWinograd
|
||||
CV_WRAP Model& enableWinograd(bool useWinograd);
|
||||
|
||||
CV_DEPRECATED_EXTERNAL
|
||||
operator Net&() const { return getNetwork_(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user