diff --git a/python/paddle/fluid/tests/unittests/mkldnn/test_fusion_gru_bf16_mkldnn_op.py b/python/paddle/fluid/tests/unittests/mkldnn/test_fusion_gru_bf16_mkldnn_op.py index fa9a93452dffdeb39d7cad7cebe2e6b18ef526dc..ef26a27d05e1be4fbe34bfc49be3fdec80ad2ee9 100644 --- a/python/paddle/fluid/tests/unittests/mkldnn/test_fusion_gru_bf16_mkldnn_op.py +++ b/python/paddle/fluid/tests/unittests/mkldnn/test_fusion_gru_bf16_mkldnn_op.py @@ -99,13 +99,14 @@ class TestFusionGRUBF16MKLDNNOp(OpTest): if self.with_bias: self.inputs['Bias'] = bias + h0_bf16 = convert_float_to_uint16(h0_fp32) + if self.with_h0: if self.weights_dtype == 'bf16': self.inputs['H0'] = h0_bf16 elif self.weights_dtype == 'fp32': self.inputs['H0'] = h0_fp32 - h0_bf16 = convert_float_to_uint16(h0_fp32) self.outputs = {'Hidden': (hidden, self.lod)} self.attrs = { diff --git a/python/paddle/fluid/tests/unittests/test_hdfs1.py b/python/paddle/fluid/tests/unittests/test_hdfs1.py index 1aac1236156ca159e9b285611a55f38925be22c2..65d12c31e39abd52397ca69ce8baba9ca0ae303f 100644 --- a/python/paddle/fluid/tests/unittests/test_hdfs1.py +++ b/python/paddle/fluid/tests/unittests/test_hdfs1.py @@ -39,6 +39,7 @@ class FSTest1(FSTestBase): fs.mkdirs(dst) fs.mkdirs(dst + "/" + src) output = "" + cmd = "{} -mv {} {}".format(fs._base_cmd, src, dst) try: fs.mv(src, dst, test_exists=False) self.assertFalse(1, "can't execute cmd:{} output:{}".format(cmd, @@ -46,7 +47,6 @@ class FSTest1(FSTestBase): except FSTimeOut as e: print("execute mv {} to {} timeout".format(src, dst)) - cmd = "{} -mv {} {}".format(fs._base_cmd, src, dst) ret, output = fluid.core.shell_execute_cmd(cmd, 6 * 1000, 2 * 1000) self.assertNotEqual(ret, 0) print("second mv ret:{} output:{}".format(ret, output))