mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
dnn(opencl): bypass unsupported fusion cases
This commit is contained in:
@@ -2219,10 +2219,6 @@ TEST_P(ConvolutionActivationFusion, Accuracy)
|
||||
Backend backendId = get<0>(get<2>(GetParam()));
|
||||
Target targetId = get<1>(get<2>(GetParam()));
|
||||
|
||||
// bug: https://github.com/opencv/opencv/issues/17964
|
||||
if (actType == "Power" && backendId == DNN_BACKEND_OPENCV && (targetId == DNN_TARGET_OPENCL || targetId == DNN_TARGET_OPENCL_FP16))
|
||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL);
|
||||
|
||||
Net net;
|
||||
int convId = net.addLayer(convParams.name, convParams.type, convParams);
|
||||
int activId = net.addLayerToPrev(activationParams.name, activationParams.type, activationParams);
|
||||
@@ -2235,7 +2231,7 @@ TEST_P(ConvolutionActivationFusion, Accuracy)
|
||||
expectedFusedLayers.push_back(activId); // all activations are fused
|
||||
else if (targetId == DNN_TARGET_OPENCL || targetId == DNN_TARGET_OPENCL_FP16)
|
||||
{
|
||||
if (actType == "ReLU" || actType == "ChannelsPReLU" || actType == "ReLU6" || actType == "TanH" || actType == "Power")
|
||||
if (actType == "ReLU" || actType == "ChannelsPReLU" || actType == "ReLU6" || actType == "TanH" /*|| actType == "Power"*/)
|
||||
expectedFusedLayers.push_back(activId);
|
||||
}
|
||||
}
|
||||
@@ -2349,10 +2345,6 @@ TEST_P(ConvolutionEltwiseActivationFusion, Accuracy)
|
||||
if ((eltwiseOp != "sum" || weightedEltwise) && backendId == DNN_BACKEND_OPENCV && (targetId == DNN_TARGET_OPENCL || targetId == DNN_TARGET_OPENCL_FP16))
|
||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL);
|
||||
|
||||
// bug: https://github.com/opencv/opencv/issues/17964
|
||||
if (actType == "Power" && backendId == DNN_BACKEND_OPENCV && (targetId == DNN_TARGET_OPENCL || targetId == DNN_TARGET_OPENCL_FP16))
|
||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL);
|
||||
|
||||
Net net;
|
||||
int convId = net.addLayer(convParams.name, convParams.type, convParams);
|
||||
int eltwiseId = net.addLayer(eltwiseParams.name, eltwiseParams.type, eltwiseParams);
|
||||
@@ -2369,7 +2361,7 @@ TEST_P(ConvolutionEltwiseActivationFusion, Accuracy)
|
||||
expectedFusedLayers.push_back(activId); // activation is fused with eltwise layer
|
||||
else if (targetId == DNN_TARGET_OPENCL || targetId == DNN_TARGET_OPENCL_FP16)
|
||||
{
|
||||
if (actType == "ReLU" || actType == "ChannelsPReLU" || actType == "Power")
|
||||
if (actType == "ReLU" || actType == "ChannelsPReLU" /*|| actType == "Power"*/)
|
||||
{
|
||||
expectedFusedLayers.push_back(eltwiseId);
|
||||
expectedFusedLayers.push_back(activId);
|
||||
@@ -2431,10 +2423,6 @@ TEST_P(ConvolutionActivationEltwiseFusion, Accuracy)
|
||||
Backend backendId = get<0>(get<4>(GetParam()));
|
||||
Target targetId = get<1>(get<4>(GetParam()));
|
||||
|
||||
// bug: https://github.com/opencv/opencv/issues/17964
|
||||
if (actType == "Power" && backendId == DNN_BACKEND_OPENCV && (targetId == DNN_TARGET_OPENCL || targetId == DNN_TARGET_OPENCL_FP16))
|
||||
applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL);
|
||||
|
||||
Net net;
|
||||
int convId = net.addLayer(convParams.name, convParams.type, convParams);
|
||||
int activId = net.addLayer(activationParams.name, activationParams.type, activationParams);
|
||||
@@ -2451,7 +2439,7 @@ TEST_P(ConvolutionActivationEltwiseFusion, Accuracy)
|
||||
expectedFusedLayers.push_back(activId); // activation fused with convolution
|
||||
else if (targetId == DNN_TARGET_OPENCL || targetId == DNN_TARGET_OPENCL_FP16)
|
||||
{
|
||||
if (actType == "ReLU" || actType == "ChannelsPReLU" || actType == "ReLU6" || actType == "TanH" || actType == "Power")
|
||||
if (actType == "ReLU" || actType == "ChannelsPReLU" || actType == "ReLU6" || actType == "TanH" /*|| actType == "Power"*/)
|
||||
expectedFusedLayers.push_back(activId); // activation fused with convolution
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user