add python block (#18085)

This commit is contained in:
Tatiana Savina 2023-06-16 11:21:33 +02:00 committed by GitHub
parent a7442c8ed3
commit f165d8cb2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -124,9 +124,21 @@ Inference Precision Hint
If the model has been converted to ``bf16``, the ``ov::hint::inference_precision`` is set to ``ov::element::bf16`` and can be checked via
the ``ov::CompiledModel::get_property`` call. The code below demonstrates how to get the element type:
.. doxygensnippet:: docs/snippets/cpu/Bfloat16Inference1.cpp
:language: cpp
:fragment: [part1]
.. tab-set::
.. tab-item:: C++
:sync: cpp
.. doxygensnippet:: docs/snippets/cpu/Bfloat16Inference1.cpp
:language: cpp
:fragment: [part1]
.. tab-item:: Python
:sync: py
.. doxygensnippet:: docs/snippets/cpu/Bfloat16Inference.py
:language: py
:fragment: [part1]
To infer the model in ``f32`` precision instead of ``bf16`` on targets with native ``bf16`` support, set the ``ov::hint::inference_precision`` to ``ov::element::f32``.