Skip to content

DNN backends registry - #13332

Merged
alalek merged 2 commits into
opencv:3.4from
mshabunin:dnn-backends
Dec 5, 2018
Merged

alalek merged 2 commits into
opencv:3.4from
mshabunin:dnn-backends

Conversation

@mshabunin

@mshabunin mshabunin commented Nov 29, 2018 •

Copy link
Copy Markdown
Contributor

This pullrequest changes

adds basic registry for DNN backends and targets

docker_image:Custom=ubuntu-openvino:16.04
buildworker:Custom=linux-2
test_opencl:Custom=OFF

}
INSTANTIATE_TEST_CASE_P(/**/, Reproducibility_SqueezeNet_v1_1, availableDnnTargets());
INSTANTIATE_TEST_CASE_P(/**/, Reproducibility_SqueezeNet_v1_1,
testing::ValuesIn(getAvailableTargets(DNN_BACKEND_OPENCV)));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It enables FP16 tests so we can use common thresholds:

double l1 = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 4e-3 : 1e-5;
double lInf = (target == DNN_TARGET_OPENCL_FP16 || target == DNN_TARGET_MYRIAD) ? 2e-2 : 1e-4;

It should fix the following tests:

Reproducibility_SqueezeNet_v1_1.Accuracy/1, where GetParam() = OCL_FP16
Reproducibility_GoogLeNet.Batching/1, where GetParam() = OCL_FP16

However the following ones doesn't pass:

Reproducibility_GoogLeNet.IntermediateBlobs/1, where GetParam() = OCL_FP16
Reproducibility_GoogLeNet.SeveralCalls/1, where GetParam() = OCL_FP16

I think it's OK if we skip them for now for OCL_FP16 target.

dkurt
dkurt previously approved these changes Dec 5, 2018

@dkurt dkurt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dkurt dkurt self-assigned this Dec 5, 2018
@mshabunin
mshabunin changed the base branch from master to 3.4 December 5, 2018 10:17
@mshabunin
mshabunin force-pushed the dnn-backends branch 2 times, most recently from 72f3724 to 729a14f Compare December 5, 2018 10:26
@mshabunin
mshabunin force-pushed the dnn-backends branch 2 times, most recently from 1cb99bd to 974d080 Compare December 5, 2018 10:46
}

INSTANTIATE_TEST_CASE_P(/*nothing*/, DNNTestNetwork, dnnBackendsAndTargets(true, true, false));
INSTANTIATE_TEST_CASE_P(/*nothing*/, DNNTestNetwork, dnnBackendsAndTargets());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to keep false for withCpuOCV

testing::internal::ParamGenerator< tuple<Backend, Target> > dnnBackendsAndTargets(
bool withInferenceEngine = true,
bool withHalide = false,
bool withCpuOCV = true

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

withCpuOCV is ignored here. Some tests use default CPU implementation as reference so we don't compare it with itself.

@dkurt
dkurt dismissed their stale review December 5, 2018 14:50

default backend, cpu implementation

@alalek
alalek merged commit fe459c8 into opencv:3.4 Dec 5, 2018
@alalek

alalek commented Dec 5, 2018

Copy link
Copy Markdown
Member

I will prepare fixup commit for that.

This was referenced Dec 5, 2018
@mshabunin
mshabunin deleted the dnn-backends branch February 26, 2019 12:09
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
DNN backends registry (opencv#13332)

* Added dnn backends registry

* dnn: process DLIE/FPGA target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants