Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【Error Message BUAA No. 87, 102】 #66702

Merged
merged 4 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions paddle/cinn/hlir/op/contrib/triangular_solve.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,13 @@ std::shared_ptr<framework::OpStrategy> StrategyForTriangularSolve(
CHECK(!args.empty())
<< "The input argument of triangular_solve is empty! Please check.";
CINNValuePack pack_args = args[0];
CHECK_GE(pack_args.size(), 2U)
<< "Two input tensors are required for the computation of "
"triangular_solve.";
PADDLE_ENFORCE_GE(
pack_args.size(),
2U,
phi::errors::InvalidArgument(
"Two input tensors are required for the computation of "
"triangular_solve, but received %d.",
pack_args.size()));
Expr a_expr = pack_args[0];
Expr b_expr = pack_args[1];
ir::Tensor a = a_expr.as_tensor_ref();
Expand Down
5 changes: 4 additions & 1 deletion test/cpp/eager/task_tests/tensor_utils_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ TEST(TensorUtils, Test) {
1.0 /*value*/,
false /*is_leaf*/);

CHECK_EQ(EagerUtils::IsLeafTensor(t), true);
PADDLE_ENFORCE_EQ(
EagerUtils::IsLeafTensor(t),
true,
phi::errors::InvalidArgument("The tensor t is not a leaf tensor."));

// Test Utils
eager_test::CompareTensorWithValue<float>(t, 5.0);
Expand Down