@@ -129,7 +129,7 @@ def _get_inference_outs(self, config):
129129 return outs
130130
131131 def _get_analysis_config (
132- self , use_gpu = False , use_trt = False , use_mkldnn = False
132+ self , use_gpu = False , use_trt = False , use_onednn = False
133133 ):
134134 '''
135135 Return a new object of AnalysisConfig.
@@ -177,7 +177,7 @@ def _get_analysis_config(
177177 if self .enable_tensorrt_varseqlen :
178178 config .enable_tensorrt_varseqlen ()
179179
180- elif use_mkldnn :
180+ elif use_onednn :
181181 config .enable_onednn ()
182182 if self .enable_onednn_bfloat16 :
183183 config .enable_onednn_bfloat16 ()
@@ -186,7 +186,7 @@ def _get_analysis_config(
186186 def check_output (self , atol = 1e-3 ):
187187 '''
188188 Check whether calculating on CPU and GPU, enable TensorRT
189- or disable TensorRT, enable MKLDNN or disable MKLDNN
189+ or disable TensorRT, enable ONEDNN or disable ONEDNN
190190 are all the same.
191191 '''
192192 self .assertFalse (
@@ -201,7 +201,7 @@ def check_output_with_option(
201201 ):
202202 '''
203203 Check whether calculating on CPU and GPU, enable TensorRT
204- or disable TensorRT, enable MKLDNN or disable MKLDNN
204+ or disable TensorRT, enable ONEDNN or disable ONEDNN
205205 are all the same.
206206 '''
207207 place = base .CUDAPlace (0 ) if use_gpu else base .CPUPlace ()
@@ -287,13 +287,13 @@ def check_output_with_option(
287287 if (not use_gpu ) and self .enable_mkldnn :
288288 onednn_outputs = self ._get_inference_outs (
289289 self ._get_analysis_config (
290- use_gpu = use_gpu , use_mkldnn = self .enable_mkldnn
290+ use_gpu = use_gpu , use_onednn = self .enable_mkldnn
291291 )
292292 )
293293
294294 self .assertTrue (
295295 len (paddle_outs ) == len (onednn_outputs ),
296- "The number of outputs is different between CPU and MKLDNN . " ,
296+ "The number of outputs is different between CPU and ONEDNN . " ,
297297 )
298298
299299 if self .enable_onednn_bfloat16 :
@@ -304,7 +304,7 @@ def check_output_with_option(
304304 onednn_output ,
305305 rtol = 1e-05 ,
306306 atol = atol ,
307- err_msg = 'Output has diff between CPU and MKLDNN . ' ,
307+ err_msg = 'Output has diff between CPU and ONEDNN . ' ,
308308 )
309309
310310 class TensorRTParam :
0 commit comments