21
21
from tests .openvino .native .common import convert_torch_model
22
22
from tests .openvino .native .common import get_actual_reference_for_current_openvino
23
23
from tests .openvino .native .models import SYNTHETIC_MODELS
24
+ from tests .openvino .native .models import FPModel
24
25
from tests .openvino .native .models import ParallelEdgesModel
25
26
from tests .openvino .native .models import get_torch_model_info
26
27
@@ -34,6 +35,19 @@ def test_compare_nncf_graph_synthetic_models(model_cls_to_test):
34
35
compare_nncf_graphs (model_to_test .ov_model , path_to_dot )
35
36
36
37
38
+ @pytest .mark .parametrize (
39
+ "model,precision" ,
40
+ [
41
+ (FPModel (const_dtype = ov .Type .nf4 ), "nf4" ),
42
+ ],
43
+ )
44
+ def test_compare_nncf_graph_precision_synthetic_models (model , precision ):
45
+ path_to_dot = get_actual_reference_for_current_openvino (
46
+ REFERENCE_GRAPHS_DIR / f"{ precision } _{ model .ref_graph_name } "
47
+ )
48
+ compare_nncf_graphs (model .ov_model , path_to_dot )
49
+
50
+
37
51
@pytest .mark .parametrize (
38
52
"model_name" ,
39
53
(
@@ -101,6 +115,7 @@ def _get_default_nncf_graph_edge(from_node, to_node, input_port_id, output_port_
101
115
(ov .Type .f16 , Dtype .FLOAT ),
102
116
(ov .Type .f32 , Dtype .FLOAT ),
103
117
(ov .Type .f64 , Dtype .FLOAT ),
118
+ (ov .Type .nf4 , Dtype .FLOAT ),
104
119
(ov .Type .i4 , Dtype .INTEGER ),
105
120
(ov .Type .i8 , Dtype .INTEGER ),
106
121
(ov .Type .i16 , Dtype .INTEGER ),
@@ -124,7 +139,6 @@ def test_convert_to_nncf_dtype_supported_types(ov_type: ov.Type, expected_nncf_d
124
139
@pytest .mark .parametrize (
125
140
"ov_type" ,
126
141
[
127
- ov .Type .nf4 ,
128
142
ov .Type .undefined ,
129
143
ov .Type .f8e4m3 ,
130
144
ov .Type .f8e5m2 ,
0 commit comments