diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt index ea3448522dea90..038895b1c07429 100644 --- a/samples/cpp/CMakeLists.txt +++ b/samples/cpp/CMakeLists.txt @@ -214,7 +214,9 @@ macro(ie_add_sample) find_package(Threads REQUIRED) find_package(OpenVINO REQUIRED COMPONENTS Runtime) - if(c_sample) + + # Conan does not generate openvino::runtime::c target + if(c_sample AND TARGET openvino::runtime::c) set(ov_link_libraries openvino::runtime::c) else() set(ov_link_libraries openvino::runtime) diff --git a/samples/cpp/benchmark_app/main.cpp b/samples/cpp/benchmark_app/main.cpp index 2bda41ca8b880c..d8b5f14bfa419a 100644 --- a/samples/cpp/benchmark_app/main.cpp +++ b/samples/cpp/benchmark_app/main.cpp @@ -19,9 +19,6 @@ # define WAS_OV_LIBRARY_DEFINED #endif -#include "gna/gna_config.hpp" -#include "gpu/gpu_config.hpp" - #ifdef WAS_OV_LIBRARY_DEFINED # undef IN_OV_COMPONENT # undef WAS_OV_LIBRARY_DEFINED @@ -314,11 +311,11 @@ int main(int argc, char* argv[]) { // Override config if command line parameter is specified if (!config.count("GPU")) config["GPU"] = {}; - config["GPU"][CONFIG_KEY(CONFIG_FILE)] = FLAGS_c; + config["GPU"]["CONFIG_FILE"] = FLAGS_c; } - if (config.count("GPU") && config.at("GPU").count(CONFIG_KEY(CONFIG_FILE))) { - auto ext = config.at("GPU").at(CONFIG_KEY(CONFIG_FILE)).as(); - core.set_property("GPU", {{CONFIG_KEY(CONFIG_FILE), ext}}); + if (config.count("GPU") && config.at("GPU").count("CONFIG_FILE")) { + auto ext = config.at("GPU").at("CONFIG_FILE").as(); + core.set_property("GPU", {{"CONFIG_FILE", ext}}); slog::info << "GPU extensions are loaded: " << ext << slog::endl; } OPENVINO_SUPPRESS_DEPRECATED_END @@ -846,9 +843,8 @@ int main(int argc, char* argv[]) { slog::info << " " << item.first << ": " << slog::endl; for (auto& item2 : item.second.as()) { OPENVINO_SUPPRESS_DEPRECATED_START - if (item2.first == ov::supported_properties || - item2.first == METRIC_KEY(SUPPORTED_CONFIG_KEYS) || - item2.first == METRIC_KEY(SUPPORTED_METRICS)) + if (item2.first == ov::supported_properties || item2.first == "SUPPORTED_CONFIG_KEYS)" || + item2.first == "SUPPORTED_METRICS") continue; OPENVINO_SUPPRESS_DEPRECATED_END slog::info << " " << item2.first << ": " << item2.second.as() << slog::endl; diff --git a/samples/cpp/benchmark_app/remote_tensors_filling.hpp b/samples/cpp/benchmark_app/remote_tensors_filling.hpp index b495b0a7704e9c..dbfee53905dd0d 100644 --- a/samples/cpp/benchmark_app/remote_tensors_filling.hpp +++ b/samples/cpp/benchmark_app/remote_tensors_filling.hpp @@ -6,7 +6,7 @@ #if defined(HAVE_GPU_DEVICE_MEM_SUPPORT) # define HAVE_DEVICE_MEM_SUPPORT -# include +# include "openvino/runtime/intel_gpu/ocl/ocl_wrapper.hpp" #endif #include "utils.hpp"