File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ def setUp(self):
3535 self .act_state = 'tanh'
3636 self .act_gate = 'sigmoid'
3737 self .origin_mode = True
38- self .use_mkldnn = True
39- self .mkldnn_data_type = "int8"
38+ self .use_onednn = True
39+ self .onednn_data_type = "int8"
4040 self .force_fp32_output = True
4141 self .error_margin = 1e-5
4242 self .set_confs ()
@@ -141,8 +141,8 @@ def setUp(self):
141141 'gate_activation' : self .act_gate ,
142142 'is_reverse' : self .is_reverse ,
143143 'origin_mode' : self .origin_mode ,
144- 'use_mkldnn' : self .use_mkldnn ,
145- 'mkldnn_data_type' : self .mkldnn_data_type ,
144+ 'use_mkldnn' : self .use_onednn ,
145+ 'mkldnn_data_type' : self .onednn_data_type ,
146146 'force_fp32_output' : self .force_fp32_output ,
147147 'Scale_data' : scale_data ,
148148 'Shift_data' : shift_data ,
Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ def setUp(self):
5050 self .act_gate = 'sigmoid'
5151 self .act_cell = 'tanh'
5252 self .act_cand = 'tanh'
53- self .use_mkldnn = True
54- self .mkldnn_data_type = "bfloat16"
53+ self .use_onednn = True
54+ self .onednn_data_type = "bfloat16"
5555 self .force_fp32_output = False
5656 self .weights_dtype = 'fp32'
5757 self .set_confs ()
@@ -145,8 +145,8 @@ def setUp(self):
145145 'cell_activation' : self .act_cell ,
146146 'candidate_activation' : self .act_cand ,
147147 'force_fp32_output' : self .force_fp32_output ,
148- 'use_mkldnn' : self .use_mkldnn ,
149- 'mkldnn_data_type' : self .mkldnn_data_type ,
148+ 'use_mkldnn' : self .use_onednn ,
149+ 'mkldnn_data_type' : self .onednn_data_type ,
150150 }
151151
152152
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ def setUp(self):
3434 self .act_gate = 'sigmoid'
3535 self .act_cand = 'tanh'
3636 self .use_peepholes = False # LSTM u8 doesn't support peepholes
37- self .use_mkldnn = True
38- self .mkldnn_data_type = "int8"
37+ self .use_onednn = True
38+ self .onednn_data_type = "int8"
3939 self .force_fp32_output = False
4040 self .error_margin = 1e-5
4141 self .set_confs ()
@@ -130,8 +130,8 @@ def setUp(self):
130130 'candidate_activation' : self .act_cand ,
131131 'is_reverse' : self .is_reverse ,
132132 'use_peepholes' : self .use_peepholes ,
133- 'use_mkldnn' : self .use_mkldnn ,
134- 'mkldnn_data_type' : self .mkldnn_data_type ,
133+ 'use_mkldnn' : self .use_onednn ,
134+ 'mkldnn_data_type' : self .onednn_data_type ,
135135 'force_fp32_output' : self .force_fp32_output ,
136136 'Scale_data' : scale_data ,
137137 'Shift_data' : shift_data ,
Original file line number Diff line number Diff line change 1919
2020class TestFusionLSTMONEDNNOp (TestFusionLSTMOp ):
2121 def set_conf (self ):
22- self .use_mkldnn = True
22+ self .use_onednn = True
2323 self .check_pir_onednn = True
2424
2525 def test_check_output (self ):
@@ -35,49 +35,49 @@ def test_check_output(self):
3535class TestFusionLSTMONEDNNOpReverse (TestFusionLSTMONEDNNOp ):
3636 def set_conf (self ):
3737 self .is_reverse = True
38- self .use_mkldnn = True
38+ self .use_onednn = True
3939
4040
4141class TestFusionLSTMONEDNNOpInitReverse (TestFusionLSTMONEDNNOp ):
4242 def set_conf (self ):
4343 self .has_initial_state = True
4444 self .is_reverse = True
45- self .use_mkldnn = True
45+ self .use_onednn = True
4646
4747
4848class TestFusionLSTMONEDNNOpMD1 (TestFusionLSTMONEDNNOp ):
4949 def set_conf (self ):
5050 self .M = 36
5151 self .D = 8
52- self .use_mkldnn = True
52+ self .use_onednn = True
5353
5454
5555class TestFusionLSTMONEDNNOpMD2 (TestFusionLSTMONEDNNOp ):
5656 def set_conf (self ):
5757 self .M = 8
5858 self .D = 8
59- self .use_mkldnn = True
59+ self .use_onednn = True
6060
6161
6262class TestFusionLSTMONEDNNOpMD3 (TestFusionLSTMONEDNNOp ):
6363 def set_conf (self ):
6464 self .M = 15
6565 self .D = 3
66- self .use_mkldnn = True
66+ self .use_onednn = True
6767
6868
6969class TestFusionLSTMONEDNNOpBS1 (TestFusionLSTMONEDNNOp ):
7070 def set_conf (self ):
7171 self .lod = [[3 ]]
7272 self .D = 16
73- self .use_mkldnn = True
73+ self .use_onednn = True
7474
7575
7676class TestFusionLSTMONEDNNOpPeepholesInit (TestFusionLSTMONEDNNOp ):
7777 def set_conf (self ):
7878 self .use_peepholes = True
7979 self .has_initial_state = True
80- self .use_mkldnn = True
80+ self .use_onednn = True
8181
8282
8383if __name__ == '__main__' :
You can’t perform that action at this time.
0 commit comments