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

[BYOC] InlineCompilerFunctions helper pass #11923

Merged
merged 3 commits into from
Jun 27, 2022

Conversation

mbs-octoml
Copy link
Contributor

@mbs-octoml mbs-octoml commented Jun 27, 2022

The TensorRT BYOC integration needs to 'undo' partitionings in some situations. Add an
InlineCompilerFunctions pass to make that robust. In particular, it must undo both the
'partitioning' (ie separating out the "Compiler" function) and any 'compositing' (ie separating
out small sub-graphs as "Composite" functions).

Fix misspelled nn.bias_add while there.

Note that the current implementation has been broken since #11203 (mea culpa) but was untested by CI. I have all the tests fixed in a follow-up PR and a few other bug fixes.

The TensorRT BYOC integration needs to 'undo' partitionings in some situations. Add an
InlineCompilerFunctions pass to make that robust. In particular, it must undo both the
'partitioning' (ie separating out the "Compiler" function) and any 'compositing' (ie separating
out small sub-graphs as "Composite" functions).

Fix misspelled nn.bias_add while there.

Note that the current implementation is broken but untested in CI. I have all the tests
fixed in a follow-up PR.
Copy link
Member

@masahi masahi left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@comaniac comaniac left a comment

Choose a reason for hiding this comment

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

The changes look clean. Thanks!
One miner point is the name InlineCompilerFunctions seems a bit confusing although the implementation itself is general to inline functions with their global vars specified. Would that be better to just call something like InlineFunctions?

@mbs-octoml
Copy link
Contributor Author

Thanks @comaniac, agree -- the iface changed but I forgot to update the pass name.

@masahi masahi merged commit 62b21a1 into apache:main Jun 27, 2022
@mbs-octoml mbs-octoml deleted the mbs-prep-for-trt2 branch June 27, 2022 23:04
blackkker pushed a commit to blackkker/tvm that referenced this pull request Jul 7, 2022
* [BYOC] InlineCompilerFunctions helper pass

The TensorRT BYOC integration needs to 'undo' partitionings in some situations. Add an
InlineCompilerFunctions pass to make that robust. In particular, it must undo both the
'partitioning' (ie separating out the "Compiler" function) and any 'compositing' (ie separating
out small sub-graphs as "Composite" functions).

Fix misspelled nn.bias_add while there.

Note that the current implementation is broken but untested in CI. I have all the tests
fixed in a follow-up PR.

* - Lints

* - Only AOT compilation paths ensure "executor" is provided as a Target attribute.
mikeseven pushed a commit to mikeseven/tvm that referenced this pull request Sep 27, 2023
* [BYOC] InlineCompilerFunctions helper pass

The TensorRT BYOC integration needs to 'undo' partitionings in some situations. Add an
InlineCompilerFunctions pass to make that robust. In particular, it must undo both the
'partitioning' (ie separating out the "Compiler" function) and any 'compositing' (ie separating
out small sub-graphs as "Composite" functions).

Fix misspelled nn.bias_add while there.

Note that the current implementation is broken but untested in CI. I have all the tests
fixed in a follow-up PR.

* - Lints

* - Only AOT compilation paths ensure "executor" is provided as a Target attribute.
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.

4 participants