mirror of
https://github.com/opencv/opencv.git
synced 2026-07-30 07:43:03 +04:00
Add implementation in case plaidml isn't found
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
// Copyright (C) 2019 Intel Corporation
|
||||
|
||||
|
||||
#ifdef HAVE_PLAIDML
|
||||
|
||||
#include "test_precomp.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
@@ -19,6 +17,8 @@
|
||||
namespace opencv_test
|
||||
{
|
||||
|
||||
#ifdef HAVE_PLAIDML
|
||||
|
||||
inline cv::gapi::plaidml::config getConfig()
|
||||
{
|
||||
auto read_var_from_env = [](const char* env)
|
||||
@@ -173,6 +173,13 @@ TEST(GAPI_PlaidML_Pipelines, TwoOutputOperations)
|
||||
EXPECT_EQ(0, cv::norm(out_mat[1], ref_mat[1]));
|
||||
}
|
||||
|
||||
} // namespace opencv_test
|
||||
#else // HAVE_PLAIDML
|
||||
|
||||
TEST(GAPI_PlaidML_Pipelines, ThrowIfPlaidMLNotFound)
|
||||
{
|
||||
ASSERT_ANY_THROW(cv::gapi::core::plaidml::kernels());
|
||||
}
|
||||
|
||||
#endif // HAVE_PLAIDML
|
||||
|
||||
} // namespace opencv_test
|
||||
|
||||
Reference in New Issue
Block a user