Skip to content

Conversation

@chenyang78
Copy link

@chenyang78 chenyang78 commented Oct 2, 2023

Summary:
This PR removed several APIs from the AOTInductor interface,
which are not used by the client.

It also simplified AOTInductor's model class by removing
the dim info for input/output tensors. We included dim info
before to return max output shapes, which was used by the client
to allocate memory for output tensors. Now, we allocate output
tensor memory from the .so so that we don't need to maintain
such information any more. The deletion of dim info from
the model class also simplified the codegen quite a bit.

Test Plan: ci

Reviewed By: khabinov

Differential Revision: D49835430

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @kadeng @muchulee8 @aakhundov @ColinPeppler

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 2, 2023

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit c80ee86 with merge base 31d6358 (image):

UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:

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

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49835430

Copy link
Contributor

@khabinov khabinov left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM!

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49835430

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49835430

@chenyang78 chenyang78 added the topic: not user facing topic category label Oct 3, 2023
Copy link
Contributor

Choose a reason for hiding this comment

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

Since you are working on simplification, let me ask this question: do we really need to maintain the name and dtype for inputs and outputs? If we do, then should we make them as members of AOTInductorModelContainer, as they are the same for the model instances?

Copy link
Author

Choose a reason for hiding this comment

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

I think we'd better keep input/output names, because the order of inputs and outputs kept in the .so might not be the same as the order of inputs and outputs prepared by the user. Having an API that returns the name at an index would allow the user to create correct mappings. We don't really need dtype. Let me remove it.

Regarding where to keep input/output name info, I think attaching them to the model class may be better, because the user may not use the model container via the new APIs AOTInductorModelCreate and AOTInductorModelRun.

…ch#110411)

Summary:

This PR removed several APIs from the AOTInductor interface,
which are not used by the client.

It also simplified AOTInductor's model class by removing
the dim info for input/output tensors. We included dim info
before to return max output shapes, which was used by the client
to allocate memory for output tensors. Now, we allocate output
tensor memory from the .so so that we don't need to maintain
such information any more. The deletion of dim info from
the model class also simplified the codegen quite a bit.

Test Plan: ci

Reviewed By: khabinov

Differential Revision: D49835430
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49835430

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D49835430

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 4, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants