Skip to content

Commit 8dc9792

Browse files
authored
Rename use_mkldnn to use_onednn in test cases - part7 (#73909)
1 parent 6c16df3 commit 8dc9792

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

test/mkldnn/test_elementwise_sub_onednn_op.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def setUp(self):
4444
'X': OpTest.np_dtype_to_base_dtype(self.x),
4545
'Y': OpTest.np_dtype_to_base_dtype(self.y),
4646
}
47-
self.attrs = {'axis': self.axis, 'use_mkldnn': self.use_mkldnn}
47+
self.attrs = {'axis': self.axis, 'use_mkldnn': self.use_onednn}
4848
self.outputs = {'Out': self.out}
4949

5050
def init_input_output(self):
@@ -71,7 +71,7 @@ def init_axis(self):
7171
self.axis = -1
7272

7373
def init_kernel_type(self):
74-
self.use_mkldnn = True
74+
self.use_onednn = True
7575

7676
def init_dtype(self):
7777
self.dtype = np.float32
@@ -225,12 +225,12 @@ def setUp(self):
225225
self.x_bf16 = convert_float_to_uint16(self.x)
226226
self.y_bf16 = convert_float_to_uint16(self.y)
227227
self.inputs = {'X': self.x_bf16, 'Y': self.y_bf16}
228-
self.attrs = {'axis': self.axis, 'use_mkldnn': self.use_mkldnn}
228+
self.attrs = {'axis': self.axis, 'use_mkldnn': self.use_onednn}
229229
self.outputs = {'Out': convert_float_to_uint16(self.out)}
230230

231231
def init_dtype(self):
232232
self.dtype = np.float32
233-
self.mkldnn_data_type = "bfloat16"
233+
self.onednn_data_type = "bfloat16"
234234

235235
def init_input_output(self):
236236
self.x = np.random.random(
@@ -312,7 +312,7 @@ def test_check_grad_ignore_x(self):
312312
# complex64, int16, float64, bfloat16, complex128, float32, int32, int64
313313
'''class TestInt8(TestOneDNNElementwiseSubOp):
314314
def init_kernel_type(self):
315-
self.use_mkldnn = True
315+
self.use_onednn = True
316316
self._cpu_only = True
317317
318318
def init_dtype(self):

test/mkldnn/test_fc_bf16_mkldnn_op.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def generate_data(self):
4242

4343
def setUp(self):
4444
self.op_type = "fc"
45-
self.use_mkldnn = True
46-
self.mkldnn_data_type = "bfloat16"
45+
self.use_onednn = True
46+
self.onednn_data_type = "bfloat16"
4747
self.force_fp32_output = False
4848
self.generate_data()
4949

@@ -60,7 +60,7 @@ def setUp(self):
6060
}
6161

6262
self.attrs = {
63-
'use_mkldnn': self.use_mkldnn,
63+
'use_mkldnn': self.use_onednn,
6464
'force_fp32_output': self.force_fp32_output,
6565
}
6666

test/mkldnn/test_fc_mkldnn_op.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ def create_data(self):
3737
def setUp(self):
3838
self.op_type = "fc"
3939
self._cpu_only = True
40-
self.use_mkldnn = True
40+
self.use_onednn = True
4141
self.create_data()
4242
self.inputs = {
4343
'Input': self.matrix.input,
4444
'W': self.matrix.weights,
4545
'Bias': self.bias,
4646
}
4747

48-
self.attrs = {'use_mkldnn': self.use_mkldnn}
48+
self.attrs = {'use_mkldnn': self.use_onednn}
4949

5050
self.outputs = {
5151
'Out': fully_connected_naive(

0 commit comments

Comments
 (0)