add python block (#18085)
This commit is contained in:
parent
a7442c8ed3
commit
f165d8cb2b
@ -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
|
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:
|
the ``ov::CompiledModel::get_property`` call. The code below demonstrates how to get the element type:
|
||||||
|
|
||||||
.. doxygensnippet:: docs/snippets/cpu/Bfloat16Inference1.cpp
|
.. tab-set::
|
||||||
:language: cpp
|
|
||||||
:fragment: [part1]
|
.. 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``.
|
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``.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user