Skip to content

Commit

Permalink
Limit .get_data usage
Browse files Browse the repository at this point in the history
  • Loading branch information
KodiaqQ committed Jul 10, 2024
1 parent 9471ac8 commit 8ffe8ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nncf/openvino/graph/node_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ def get_const_value(const_node: ov.Node, dtype: ov.Type = ov.Type.f32) -> np.nda
:param dtype: Value return type.
:return: The constant value.
"""
return const_node.get_data(dtype=dtype.to_dtype())
if const_node.get_element_type() == ov.Type.bf16:
return const_node.get_data(dtype=dtype.to_dtype())
return const_node.data


def get_bias_value(
Expand Down

0 comments on commit 8ffe8ae

Please sign in to comment.