提交 df28a3b4 编写于 作者: T tensor-tang

fix lod and op test

上级 f3cd2612
...@@ -134,6 +134,8 @@ class FCOpKernel : public framework::OpKernel<T> { ...@@ -134,6 +134,8 @@ class FCOpKernel : public framework::OpKernel<T> {
math::FCCompute<platform::CPUDeviceContext, T>( math::FCCompute<platform::CPUDeviceContext, T>(
blas, in_dims[0], w_dims[1], w_dims[0], input_data, w_data, output_data, blas, in_dims[0], w_dims[1], w_dims[0], input_data, w_data, output_data,
bias ? bias->data<T>() : NULL); bias ? bias->data<T>() : NULL);
// TODO(TJ): fuse act
} }
}; };
......
...@@ -242,6 +242,7 @@ class FuisonLSTMKernel : public framework::OpKernel<T> { ...@@ -242,6 +242,7 @@ class FuisonLSTMKernel : public framework::OpKernel<T> {
to_batch(dev_ctx, *xx, batched_gate, true, is_reverse); to_batch(dev_ctx, *xx, batched_gate, true, is_reverse);
} else { } else {
to_batch(dev_ctx, *x, xx, true, is_reverse); to_batch(dev_ctx, *x, xx, true, is_reverse);
batched_gate->set_lod(xx->lod());
math::FCCompute<DeviceContext, T>(blas, x_dims[0], wx_dims[1], x_dims[1], math::FCCompute<DeviceContext, T>(blas, x_dims[0], wx_dims[1], x_dims[1],
xx_data, wx_data, batched_gate_data, xx_data, wx_data, batched_gate_data,
bias->data<T>()); bias->data<T>());
......
...@@ -112,7 +112,7 @@ class TestLstmOp(OpTest): ...@@ -112,7 +112,7 @@ class TestLstmOp(OpTest):
} }
def test_check_output(self): def test_check_output(self):
self.check_output(atol=1e-8) self.check_output()
class TestLstmOpInitReverse(TestLstmOp): class TestLstmOpInitReverse(TestLstmOp):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册