Skip to content

Conversation

@ZelinMa557
Copy link
Contributor

@ZelinMa557 ZelinMa557 commented May 27, 2024

PR Category

CINN

PR Types

New features

Description

implement strategy for generate shape op

@paddle-bot
Copy link

paddle-bot bot commented May 27, 2024

你的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.

@paddle-bot paddle-bot bot added the contributor External developers label May 27, 2024
#include "paddle/cinn/ir/ir.h"
#include "paddle/cinn/lang/builtin.h"
#include "paddle/cinn/lang/compute.h"
#include "paddle/pir/include/dialect/shape/utils/shape_or_data_expr.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

可以换成用dim_expr.h

#include "paddle/cinn/frontend/paddle/cpp/program_desc.h"
#include "paddle/cinn/frontend/paddle/model_parser.h"
#include "paddle/cinn/frontend/var_type_utils.h"
#include "paddle/cinn/hlir/dialect/operator/ir/manual_op.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

这个manual_op.h也换成更具体的头文件吧

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的

Comment on lines 498 to 506
PADDLE_ENFORCE(symbol_bindings.has_value(),
::common::errors::PreconditionNotMet(
"Required symbol_bindings.has_value()==true."));
dst_attrs[::pir::kSymbolBindings] = symbol_bindings.value();
} else if (item.first == ::pir::kOutputDimExprs) {
auto dim_exprs = cinn::dialect::ConvertAttributeToDimExprs(item.second);
PADDLE_ENFORCE(dim_exprs.has_value(),
::common::errors::PreconditionNotMet(
"Required dim_exprs.has_value()==true."));
Copy link
Contributor

Choose a reason for hiding this comment

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

image

报错信息再调整下

@ZelinMa557 ZelinMa557 force-pushed the generate_shape_dev branch 3 times, most recently from 8e4c429 to e7766b1 Compare May 28, 2024 08:39
* refact

Signed-off-by: ZelinMa557 <3388706467@qq.com>
@ZelinMa557 ZelinMa557 force-pushed the generate_shape_dev branch from e7766b1 to 678f0f4 Compare May 28, 2024 13:22
@zyfncg zyfncg merged commit 154b007 into PaddlePaddle:develop May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants