-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Running inference comments (#25285)
### Details: - *item1* - *...* ### Tickets: - 145078 --------- Co-authored-by: Karol Blaszczak <[email protected]>
- Loading branch information
1 parent
bbb32b3
commit bf84cec
Showing
5 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#include <openvino/runtime/core.hpp> | ||
|
||
int main() { | ||
{ | ||
//! [compile_model_default_npu] | ||
ov::Core core; | ||
auto model = core.read_model("model.xml"); | ||
auto compiled_model = core.compile_model(model, "NPU"); | ||
//! [compile_model_default_npu] | ||
} | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Copyright (C) 2018-2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
import openvino as ov | ||
from snippets import get_model | ||
|
||
|
||
def main(): | ||
model = get_model() | ||
|
||
core = ov.Core() | ||
if "NPU" not in core.available_devices: | ||
return 0 | ||
|
||
#! [compile_model_default_npu] | ||
core = ov.Core() | ||
compiled_model = core.compile_model(model, "NPU") | ||
#! [compile_model_default_npu] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters