Skip to content

【Infer Symbolic Shape BUAA No.27】edit_distance - #66870

Closed
MufanColin wants to merge 5 commits into
PaddlePaddle:developfrom
MufanColin:cinn_edit_distance_task
Closed

MufanColin wants to merge 5 commits into
PaddlePaddle:developfrom
MufanColin:cinn_edit_distance_task

Conversation

@MufanColin

Copy link
Copy Markdown
Contributor

PR Category

Others

PR Types

Others

Description

因为我刚开始做 CINN,对于相关的内容还不太熟悉,所以这个我先单独提交的。

@paddle-bot

paddle-bot Bot commented Jul 31, 2024

Copy link
Copy Markdown

你的PR提交成功,感谢你对开源项目的贡献!
请关注后续CI自动化测试结果,详情请参考Paddle-CI手册。
Your PR has been submitted. Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@luotao1 luotao1 added contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务 labels Jul 31, 2024
hyps_dims[0],
phi::errors::InvalidArgument("Input(HypsLength) and Input(Hyps) should "
"have identical first dimension."));
PADDLE_ENFORCE_EQ(

@gongshaotian gongshaotian Aug 2, 2024 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该使用 Addequalcstr 添加两个DimExpr之间的约束

const auto &refslength_shape_or_data =
infer_context->GetShapeOrDataForValue(op->operand_source(3));

PADDLE_ENFORCE_EQ(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该使用 Addequalcstr 添加两个DimExpr之间的约束

} else {
PADDLE_ENFORCE_EQ(
hyps_dims[1],
1,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

构造一个值为1的DimExpr,然后使用Addequalcstr 添加两个DimExpr之间的约束

"the 2nd dimension equal to 1."));
PADDLE_ENFORCE_EQ(
refs_dims[1],
1,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers HappyOpenSource Pro 进阶版快乐开源活动,更具挑战性的任务

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants