提交 7432c040 编写于 作者: myq406450149's avatar myq406450149

fix format. test=develop

上级 c9877bee
...@@ -211,7 +211,7 @@ class ArrayToLoDTensorInferShape : public framework::InferShapeBase { ...@@ -211,7 +211,7 @@ class ArrayToLoDTensorInferShape : public framework::InferShapeBase {
PADDLE_ENFORCE_EQ( PADDLE_ENFORCE_EQ(
context->HasInput("X"), true, context->HasInput("X"), true,
platform::errors::NotFound("Input(X) of BmmOp should not be null")); platform::errors::NotFound("Input(X) of BmmOp should not be null"));
PADDLE_ENFORCE_EQ(context->HasInput("RankTable", true), PADDLE_ENFORCE_EQ(context->HasInput("RankTable"), true,
platform::errors::NotFound( platform::errors::NotFound(
"Input(RankTable) of BmmOp should not be null")); "Input(RankTable) of BmmOp should not be null"));
// For compile-time, the first dim of input X and output Out should be -1. // For compile-time, the first dim of input X and output Out should be -1.
......
...@@ -108,11 +108,12 @@ class LoDTensorToArrayOp : public framework::OperatorBase { ...@@ -108,11 +108,12 @@ class LoDTensorToArrayOp : public framework::OperatorBase {
auto max_seq_len = items[0].length; auto max_seq_len = items[0].length;
auto rank_level = rank_table.level(); auto rank_level = rank_table.level();
PADDLE_ENFORCE_LT(rank_level, x.lod().size(), PADDLE_ENFORCE_LT(
platform::errors::InvalidArgument( rank_level, x.lod().size(),
`"Input should be a LoDTensor, and its lod_level should be at " platform::errors::InvalidArgument(
"least %d", "Input should be a LoDTensor, and its lod_level should be at "
rank_level + 1)); "least %d",
rank_level + 1));
out.resize(max_seq_len); out.resize(max_seq_len);
std::vector<std::vector<CopyRange>> copy_ranges(max_seq_len); std::vector<std::vector<CopyRange>> copy_ranges(max_seq_len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册