-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Collage] SubGraphs #11981
[Collage] SubGraphs #11981
Conversation
@mbaret, thanks. |
cfc5aff
to
300dc7d
Compare
green and ready for review |
d0d4237
to
d71779d
Compare
See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. (Special thanks to Matthew Barrett for authoring partition_rule_test.cc and suggesting a PR partitioning strategy.) Collage uses a small 'combinator library' of PartitionRule to decribe how candidate partitions can be extracted from a model for measurement and comparison. This introduces most of that machinery, however we defer the all important 'CombinerPartitionRule' for the next PR. Thus the rules at this stage can only express the sorts of DFPattern-based rules we find in most BYOC integrations, and cannot describe rules more traditionally associated with operator fusion. Based on apache#11981.
See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. (Special thanks to Matthew Barrett for authoring partition_rule_test.cc and suggesting a PR partitioning strategy.) Collage uses a small 'combinator library' of PartitionRule to decribe how candidate partitions can be extracted from a model for measurement and comparison. This introduces most of that machinery, however we defer the all important 'CombinerPartitionRule' for the next PR. Thus the rules at this stage can only express the sorts of DFPattern-based rules we find in most BYOC integrations, and cannot describe rules more traditionally associated with operator fusion. Based on apache#11981.
d71779d
to
70fc25a
Compare
I read this out of curiosity, I cannot review this on a technical level. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Largely looks good to me, couple of points around naming. It's tacitly acknowledged that more of this infrastructure will get exercised by tests in later PRs.
See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. Collage works in units of 'sub-graphs', which are potential partitions of the overall Relay model. This PR introduces SubGraph (an arbitrary partitioning, without any implication about how it is to be represented), it's companion SubSubGraph (implying a representation as a function), and some supporting odds 'n ends.
- make 'Compiler' name explicit
70fc25a
to
33e8c94
Compare
Thanks @SebastianBoblest, every little bit helps. Thanks and PTAL @mbaret. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. (Special thanks to Matthew Barrett for authoring partition_rule_test.cc and suggesting a PR partitioning strategy.) Collage uses a small 'combinator library' of PartitionRule to decribe how candidate partitions can be extracted from a model for measurement and comparison. This introduces most of that machinery, however we defer the all important 'CombinerPartitionRule' for the next PR. Thus the rules at this stage can only express the sorts of DFPattern-based rules we find in most BYOC integrations, and cannot describe rules more traditionally associated with operator fusion. Based on apache#11981.
* [Collage] PartitionRule (though without CombinePartitionRule) See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. (Special thanks to Matthew Barrett for authoring partition_rule_test.cc and suggesting a PR partitioning strategy.) Collage uses a small 'combinator library' of PartitionRule to decribe how candidate partitions can be extracted from a model for measurement and comparison. This introduces most of that machinery, however we defer the all important 'CombinerPartitionRule' for the next PR. Thus the rules at this stage can only express the sorts of DFPattern-based rules we find in most BYOC integrations, and cannot describe rules more traditionally associated with operator fusion. Based on #11981. * - Backport improvements to partiton_rule_test.cc * - Oops
* [Collage] SubGraphs See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. Collage works in units of 'sub-graphs', which are potential partitions of the overall Relay model. This PR introduces SubGraph (an arbitrary partitioning, without any implication about how it is to be represented), it's companion SubSubGraph (implying a representation as a function), and some supporting odds 'n ends. * - make Integer <-> size_t conversion explicit - make 'Compiler' name explicit * - fix namespace ambiguity * - review comments
…#11993) * [Collage] PartitionRule (though without CombinePartitionRule) See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. (Special thanks to Matthew Barrett for authoring partition_rule_test.cc and suggesting a PR partitioning strategy.) Collage uses a small 'combinator library' of PartitionRule to decribe how candidate partitions can be extracted from a model for measurement and comparison. This introduces most of that machinery, however we defer the all important 'CombinerPartitionRule' for the next PR. Thus the rules at this stage can only express the sorts of DFPattern-based rules we find in most BYOC integrations, and cannot describe rules more traditionally associated with operator fusion. Based on apache#11981. * - Backport improvements to partiton_rule_test.cc * - Oops
* [Collage] SubGraphs See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. Collage works in units of 'sub-graphs', which are potential partitions of the overall Relay model. This PR introduces SubGraph (an arbitrary partitioning, without any implication about how it is to be represented), it's companion SubSubGraph (implying a representation as a function), and some supporting odds 'n ends. * - make Integer <-> size_t conversion explicit - make 'Compiler' name explicit * - fix namespace ambiguity * - review comments
…#11993) * [Collage] PartitionRule (though without CombinePartitionRule) See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. (Special thanks to Matthew Barrett for authoring partition_rule_test.cc and suggesting a PR partitioning strategy.) Collage uses a small 'combinator library' of PartitionRule to decribe how candidate partitions can be extracted from a model for measurement and comparison. This introduces most of that machinery, however we defer the all important 'CombinerPartitionRule' for the next PR. Thus the rules at this stage can only express the sorts of DFPattern-based rules we find in most BYOC integrations, and cannot describe rules more traditionally associated with operator fusion. Based on apache#11981. * - Backport improvements to partiton_rule_test.cc * - Oops
* [Collage] SubGraphs See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. Collage works in units of 'sub-graphs', which are potential partitions of the overall Relay model. This PR introduces SubGraph (an arbitrary partitioning, without any implication about how it is to be represented), it's companion SubSubGraph (implying a representation as a function), and some supporting odds 'n ends. * - make Integer <-> size_t conversion explicit - make 'Compiler' name explicit * - fix namespace ambiguity * - review comments
…#11993) * [Collage] PartitionRule (though without CombinePartitionRule) See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. (Special thanks to Matthew Barrett for authoring partition_rule_test.cc and suggesting a PR partitioning strategy.) Collage uses a small 'combinator library' of PartitionRule to decribe how candidate partitions can be extracted from a model for measurement and comparison. This introduces most of that machinery, however we defer the all important 'CombinerPartitionRule' for the next PR. Thus the rules at this stage can only express the sorts of DFPattern-based rules we find in most BYOC integrations, and cannot describe rules more traditionally associated with operator fusion. Based on apache#11981. * - Backport improvements to partiton_rule_test.cc * - Oops
* [Collage] SubGraphs See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. Collage works in units of 'sub-graphs', which are potential partitions of the overall Relay model. This PR introduces SubGraph (an arbitrary partitioning, without any implication about how it is to be represented), it's companion SubSubGraph (implying a representation as a function), and some supporting odds 'n ends. * - make Integer <-> size_t conversion explicit - make 'Compiler' name explicit * - fix namespace ambiguity * - review comments
…#11993) * [Collage] PartitionRule (though without CombinePartitionRule) See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md. (Special thanks to Matthew Barrett for authoring partition_rule_test.cc and suggesting a PR partitioning strategy.) Collage uses a small 'combinator library' of PartitionRule to decribe how candidate partitions can be extracted from a model for measurement and comparison. This introduces most of that machinery, however we defer the all important 'CombinerPartitionRule' for the next PR. Thus the rules at this stage can only express the sorts of DFPattern-based rules we find in most BYOC integrations, and cannot describe rules more traditionally associated with operator fusion. Based on apache#11981. * - Backport improvements to partiton_rule_test.cc * - Oops
See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md.
Collage works in units of 'sub-graphs', which are potential partitions of the
overall Relay model. This PR introduces SubGraph (an arbitrary partitioning, without
any implication about how it is to be represented), it's companion SubSubGraph
(implying a representation as a function), and some supporting odds 'n ends.