未验证 提交 11a6149b 编写于 作者: L limingshu 提交者: GitHub

[BugFix] Fix error attributes setting in FusedLinear unitest (#50359)

* first commit.

* change host logic

* fix code bugs

* fix code error

---------
Co-authored-by: Nzhangbopd <1299246947@qq.com>
上级 12eff933
......@@ -46,7 +46,7 @@ class TestFuseGemmEpilogueGradOpDXYBiasFP16(OpTest):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}
self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}
DX, DY, DBias = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
......@@ -105,7 +105,7 @@ class TestFuseGemmEpilogueGradOpDYBiasFP16(OpTest):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}
self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}
_, DY, DBias = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
......@@ -164,7 +164,7 @@ class TestFuseGemmEpilogueGradOpDYFP16(OpTest):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}
self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}
_, DY, _ = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
......@@ -219,7 +219,7 @@ class TestFuseGemmEpilogueGradOpDXYFP16(OpTest):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}
self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}
DX, DY, _ = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
......
......@@ -60,7 +60,7 @@ class XPUTestFuseGemmGradOp(XPUOpTestWrapper):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}
self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}
DX, DY, DBias = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
......@@ -81,7 +81,7 @@ class XPUTestFuseGemmGradOp(XPUOpTestWrapper):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}
self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}
_, DY, DBias = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
......@@ -96,7 +96,7 @@ class XPUTestFuseGemmGradOp(XPUOpTestWrapper):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}
self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}
_, DY, _ = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
......@@ -111,7 +111,7 @@ class XPUTestFuseGemmGradOp(XPUOpTestWrapper):
'Y': np.random.random((4, 128)).astype(self.dtype) - 0.5,
}
self.attrs = {"activation": 'none'}
self.attrs = {"activation_grad": 'none'}
DX, DY, _ = get_outputs(
self.inputs['DOut'], self.inputs['X'], self.inputs['Y']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册