Skip to content

Conversation

@phlrain
Copy link
Collaborator

@phlrain phlrain commented Jun 13, 2024

PR Category

CINN

PR Types

Others

Description

pcard-76996

添加fa 到unpack mha的变换pass

同时升级 unplack mha kenrel,支持batch的输入

@paddle-bot
Copy link

paddle-bot bot commented Jun 13, 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.

@phlrain phlrain changed the title Test llama infer mha pass [CINN]add convert to unpacked mha pass Jun 14, 2024
@phlrain phlrain changed the title [CINN]add convert to unpacked mha pass [CINN]add convert to unpack mha pass Jun 14, 2024
auto& shape_analysis =
pir::ShapeAnalysisManager::Instance().Get(op->GetParentProgram());

auto in_shape =
Copy link
Contributor

Choose a reason for hiding this comment

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

const auto&
不要用直接用auto,会引发潜在的拷贝开销。

auto in_shape =
shape_analysis.GetShapeOrDataForValue(op->operand_source(0));

auto dim1 = in_shape.shape()[1];
Copy link
Contributor

Choose a reason for hiding this comment

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

int64_t,不要养成用auto的习惯。

Comment on lines +65 to +67
auto q = op->operand_source(0);
auto k = op->operand_source(1);
auto v = op->operand_source(2);
Copy link
Contributor

Choose a reason for hiding this comment

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

pir::Value
不要养成用auto的习惯。

@paddle-ci-bot
Copy link

paddle-ci-bot bot commented Jun 21, 2024

Sorry to inform you that e424c62's CIs have passed for more than 7 days. To prevent PR conflicts, you need to re-run all CIs manually.

@PaddlePaddle PaddlePaddle locked as off-topic and limited conversation to collaborators Jun 25, 2024
@PaddlePaddle PaddlePaddle unlocked this conversation Jun 25, 2024
@phlrain phlrain merged commit 2d113eb into PaddlePaddle:develop Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants