diff --git a/modules/ocl/perf/perf_fft.cpp b/modules/ocl/perf/perf_fft.cpp index 840f009a36b36b5a5d71746e6cf3a8adf04775d8..4cba47e96080cf3afcb56a0c282723036b24d076 100644 --- a/modules/ocl/perf/perf_fft.cpp +++ b/modules/ocl/perf/perf_fft.cpp @@ -43,6 +43,7 @@ // the use of this software, even if advised of the possibility of such damage. // //M*/ + #include "perf_precomp.hpp" using namespace perf; @@ -51,7 +52,9 @@ using namespace perf; typedef TestBaseWithParam dftFixture; -PERF_TEST_P(dftFixture, DISABLED_dft, OCL_TYPICAL_MAT_SIZES) // TODO not implemented +#ifdef HAVE_CLAMDFFT + +PERF_TEST_P(dftFixture, dft, OCL_TYPICAL_MAT_SIZES) { const Size srcSize = GetParam(); @@ -70,7 +73,7 @@ PERF_TEST_P(dftFixture, DISABLED_dft, OCL_TYPICAL_MAT_SIZES) // TODO not impleme oclDst.download(dst); - SANITY_CHECK(dst); + SANITY_CHECK(dst, 1.5); } else if (RUN_PLAIN_IMPL) { @@ -81,3 +84,5 @@ PERF_TEST_P(dftFixture, DISABLED_dft, OCL_TYPICAL_MAT_SIZES) // TODO not impleme else OCL_PERF_ELSE } + +#endif diff --git a/modules/ocl/perf/perf_gemm.cpp b/modules/ocl/perf/perf_gemm.cpp index aaa1dac23fe7b60d3b7386dc8c769be1a42bc87f..803e1f91b60d69545011f5d117afa4b19fa633c7 100644 --- a/modules/ocl/perf/perf_gemm.cpp +++ b/modules/ocl/perf/perf_gemm.cpp @@ -51,8 +51,9 @@ using namespace perf; typedef TestBaseWithParam gemmFixture; -PERF_TEST_P(gemmFixture, DISABLED_gemm, - ::testing::Values(OCL_SIZE_1000, OCL_SIZE_2000)) // TODO not implemented +#ifdef HAVE_CLAMDBLAS + +PERF_TEST_P(gemmFixture, gemm, ::testing::Values(OCL_SIZE_1000, OCL_SIZE_2000)) { const Size srcSize = GetParam(); @@ -72,14 +73,16 @@ PERF_TEST_P(gemmFixture, DISABLED_gemm, oclDst.download(dst); - SANITY_CHECK(dst); + SANITY_CHECK(dst, 0.01); } else if (RUN_PLAIN_IMPL) { TEST_CYCLE() cv::gemm(src1, src2, 1.0, src3, 1.0, dst); - SANITY_CHECK(dst); + SANITY_CHECK(dst, 0.01); } else OCL_PERF_ELSE } + +#endif diff --git a/modules/ocl/perf/perf_precomp.hpp b/modules/ocl/perf/perf_precomp.hpp index a93d74eb2e4dbe5893261238c00bc6e547c016ff..a6d9eab4030176dc79f66f4ec27f451002356fd2 100644 --- a/modules/ocl/perf/perf_precomp.hpp +++ b/modules/ocl/perf/perf_precomp.hpp @@ -59,6 +59,7 @@ #include #include +#include "cvconfig.h" #include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" @@ -93,7 +94,7 @@ using namespace cv; #ifdef HAVE_OPENCV_GPU #define OCL_PERF_ELSE \ - if (RUN_GPU_IMPL) \ + if (RUN_GPU_IMPL) \ CV_TEST_FAIL_NO_IMPL(); \ else \ CV_TEST_FAIL_NO_IMPL();