diff --git a/demos/common/cpp/utils/src/config_factory.cpp b/demos/common/cpp/utils/src/config_factory.cpp index 14e88e65c0e..087e85e20d7 100644 --- a/demos/common/cpp/utils/src/config_factory.cpp +++ b/demos/common/cpp/utils/src/config_factory.cpp @@ -48,7 +48,7 @@ ModelConfig ConfigFactory::getUserConfig(const std::string& flags_d, if (flags_nthreads != 0) config.compiledModelConfig.emplace(ov::inference_num_threads.name(), flags_nthreads); - config.compiledModelConfig.emplace(ov::affinity.name(), ov::Affinity::NONE); + config.compiledModelConfig.emplace(ov::hint::enable_cpu_pinning.name(), false); ov::streams::Num nstreams = deviceNstreams.count(device) > 0 ? ov::streams::Num(deviceNstreams[device]) : ov::streams::AUTO; diff --git a/demos/multi_channel_common/cpp/graph.hpp b/demos/multi_channel_common/cpp/graph.hpp index bc42e02ee1d..01dd99c58c3 100644 --- a/demos/multi_channel_common/cpp/graph.hpp +++ b/demos/multi_channel_common/cpp/graph.hpp @@ -29,7 +29,7 @@ static inline size_t roundUp(size_t enumerator, size_t denominator) { static inline std::queue compile(std::shared_ptr&& model, const std::string& modelPath, const std::string& device, size_t performanceHintNumRequests, ov::Core& core) { - core.set_property("CPU", ov::affinity(ov::Affinity::NONE)); + core.set_property("CPU", ov::hint::enable_cpu_pinning(false)); ov::CompiledModel compiled = core.compile_model(model, device, { {ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT)}, {ov::hint::num_requests(performanceHintNumRequests)}}); diff --git a/demos/security_barrier_camera_demo/cpp/main.cpp b/demos/security_barrier_camera_demo/cpp/main.cpp index 02f23a2442c..b27da3508a4 100644 --- a/demos/security_barrier_camera_demo/cpp/main.cpp +++ b/demos/security_barrier_camera_demo/cpp/main.cpp @@ -718,7 +718,7 @@ int main(int argc, char* argv[]) { if (FLAGS_nthreads != 0) { core.set_property("CPU", ov::inference_num_threads(FLAGS_nthreads)); } - core.set_property("CPU", ov::affinity(ov::Affinity::NONE)); + core.set_property("CPU", ov::hint::enable_cpu_pinning(false)); core.set_property("CPU", ov::streams::num((device_nstreams.count("CPU") > 0 ? ov::streams::Num(device_nstreams["CPU"]) : ov::streams::AUTO))); device_nstreams["CPU"] = core.get_property("CPU", ov::streams::num); diff --git a/demos/social_distance_demo/cpp/main.cpp b/demos/social_distance_demo/cpp/main.cpp index bc158a15334..308787e87c3 100644 --- a/demos/social_distance_demo/cpp/main.cpp +++ b/demos/social_distance_demo/cpp/main.cpp @@ -695,7 +695,7 @@ int main(int argc, char* argv[]) { if (FLAGS_nthreads != 0) { core.set_property("CPU", ov::inference_num_threads(FLAGS_nthreads)); } - core.set_property("CPU", ov::affinity(ov::Affinity::NONE)); + core.set_property("CPU", ov::hint::enable_cpu_pinning(false)); core.set_property("CPU", ov::streams::num((deviceNStreams.count("CPU") > 0 ? ov::streams::Num(deviceNStreams["CPU"]) : ov::streams::AUTO))); deviceNStreams["CPU"] = core.get_property("CPU", ov::streams::num); }