Files
openvino/docs/snippets/AUTO3.cpp
Ilya Churaev 0c9abf43a9 Updated copyright headers (#15124)
* Updated copyright headers

* Revert "Fixed linker warnings in docs snippets on Windows (#15119)"

This reverts commit 372699ec49.
2023-01-16 11:02:17 +04:00

26 lines
848 B
C++

#include <openvino/openvino.hpp>
int main() {
{
//! [part3]
ov::Core core;
// Read a network in IR, PaddlePaddle, or ONNX format:
std::shared_ptr<ov::Model> model = core.read_model("sample.xml");
// Compile a model on AUTO with Performance Hint enabled:
// To use the “THROUGHPUT” option:
ov::CompiledModel compiled_model = core.compile_model(model, "AUTO",
ov::hint::performance_mode(ov::hint::PerformanceMode::THROUGHPUT));
// To use the “LATENCY” option:
ov::CompiledModel compiled_mode2 = core.compile_model(model, "AUTO",
ov::hint::performance_mode(ov::hint::PerformanceMode::LATENCY));
// To use the “CUMULATIVE_THROUGHPUT” option:
ov::CompiledModel compiled_mode3 = core.compile_model(model, "AUTO",
ov::hint::performance_mode(ov::hint::PerformanceMode::CUMULATIVE_THROUGHPUT));
//! [part3]
}
return 0;
}