Skip to content

Qualcomm AI Engine Direct - Add the argument to specify soc model #5211

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

Merged

Conversation

shewu-quic
Copy link
Collaborator

No description provided.

Copy link

pytorch-bot bot commented Sep 10, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/5211

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit d34cd1a with merge base c5a385e (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 10, 2024
@shewu-quic
Copy link
Collaborator Author

Hi @cccclai and @guangy10,
I think we could add the argument soc_mode to make soc model configurable.
Could you please help to take a look?

Thanks

Copy link
Contributor

@cccclai cccclai left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you

Comment on lines +142 to +147
soc_chip_table = {
"SM8650": QcomChipset.SM8650,
"SM8550": QcomChipset.SM8550,
"SM8475": QcomChipset.SM8475,
"SM8450": QcomChipset.SM8450,
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we need have this table somewhere in the qualcomm backend

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

let me change it to

    qnn_partitioner = QnnPartitioner(
        generate_qnn_executorch_compiler_spec(
            soc_model=getattr(QcomChipset, soc_model),
            backend_options=backend_options,
            debug=False,
            saver=False,
            shared_buffer=shared_buffer,
            profile=False,
        ),
        skip_node_id_set,
        skip_node_op_set,
    )

Copy link
Contributor

Choose a reason for hiding this comment

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

oh is it possible to have a function inside qualcomm like

def get_soc_table():
      return soc_chip_table = {
        "SM8650": QcomChipset.SM8650,
        "SM8550": QcomChipset.SM8550,
        "SM8475": QcomChipset.SM8475,
        "SM8450": QcomChipset.SM8450,
    }

and call it here?

Copy link
Contributor

Choose a reason for hiding this comment

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

that's actually what I meatn..and the previous version seems good actually

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your advice.
But I think we don't want to add this table for maintenance convenience.
Because if we would like to add new soc, we will need to maintain extra table.

@shewu-quic shewu-quic force-pushed the dev1/hutton/add_soc_argument_in_llama branch from 05dbf77 to d34cd1a Compare September 10, 2024 02:43
@facebook-github-bot
Copy link
Contributor

@cccclai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@cccclai
Copy link
Contributor

cccclai commented Sep 10, 2024

Thanks - will merge when CI finishes

@cccclai cccclai merged commit 67ae762 into pytorch:main Sep 10, 2024
36 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants