mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 06:03:15 +08:00
Merge pull request #1398 from ilya-lavrenov:ocl_perf_gemm
This commit is contained in:
commit
b9ae8623b2
@ -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<Size> 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
|
||||
|
@ -51,8 +51,9 @@ using namespace perf;
|
||||
|
||||
typedef TestBaseWithParam<Size> 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
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <vector>
|
||||
#include <numeric>
|
||||
|
||||
#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();
|
||||
|
Loading…
Reference in New Issue
Block a user