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

[luci] Support scalar axis in SubstituteExpandDimsToReshapePass #14464

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

jinevening
Copy link
Contributor

This supports scalar axis in SubstituteExpandDimsToReshapePass.

ONE-DCO-1.0-Signed-off-by: Hyukjin Jeong [email protected]

This supports scalar axis in SubstituteExpandDimsToReshapePass.

ONE-DCO-1.0-Signed-off-by: Hyukjin Jeong <[email protected]>
@jinevening jinevening requested a review from dayo09 December 16, 2024 11:39
@jinevening
Copy link
Contributor Author

ExpandDims with scalar axis appears in grouped query attention.

{
_graph.init({16, 3, 1}, {16, 3, 1, 1}, 2);

_graph.scalar_axis(2);
Copy link
Contributor

Choose a reason for hiding this comment

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

IDK how it works, that,

This part is called in init and

    _axis = luci::create_const_node<int32_t>(g(), loco::DataType::S32, {1}, axis);
    _axis->name("axis");

This part is called again,

    _axis = luci::create_const_node<int32_t>(g(), loco::DataType::S32, {}, axis);
    _axis->name("axis");

Is the later node with scalar axis is overriding the previous dim1 node?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. It creates a new scalar node and replaces _axis with it.

Copy link
Contributor

@dayo09 dayo09 left a comment

Choose a reason for hiding this comment

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

LGTM

@jinevening jinevening merged commit a2726bf into Samsung:master Dec 17, 2024
9 checks passed
@jinevening jinevening deleted the luci/scalar_axis_expanddims branch December 17, 2024 03:52
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.

2 participants