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

[Collage] CombinerRule and CandidatePartition::EstimateCost #12078

Merged
merged 2 commits into from
Jul 13, 2022

Conversation

mbs-octoml
Copy link
Contributor

@mbs-octoml mbs-octoml commented Jul 12, 2022

See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md.

We complete the PartitionRule sub-class hierarchy with the addition of
CombinePartitionRule, which allows disjoint candidate partitions to be
unioned based on simple rules.

  • By TOpPattern kind, eg a kOutElemwiseFusable and kBroadcast.
  • A tuple argument with injective fields.
  • The projection from an injective group (obviously of tuple type)
  • Combinations of the above.
    These let us mimic many common fusion strategies, including TVMs, so that
    the candidates explored during Collage search are as large as possible to
    expose possible fusion opportunities but no larger.

Also completes CandidatePartition with the EstimateCost method, which is
used during search to construct a stand-alone IRModule for latency estimation.
Thank you @mbaret for authoring the MockCostEstimator on which those
tests depend.

Finish units tests for PartitionRule and CandidatePartition.

@mbs-octoml
Copy link
Contributor Author

@mbaret when you get a chance, thanks.

@mbs-octoml
Copy link
Contributor Author

CI failure is a flake.

See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md.

We complete the PartitionRule sub-class hierarchy with the addition of
CombinePartitionRule, which allows disjoint candidate partitions to be
unioned based on simple rules.
 - By TOpPattern kind, eg a kOutElemwiseFusable and kBroadcast.
 - A tuple argument with injective fields.
 - The projection from an injective group (obviously of tuple type)
 - Combinations of the above.
These let us mimic many common fusion strategies, including TVMs, so that
the candidates explored during Collage search are as large as possible to
expose possible fusion opportunities but no larger.

Also completes CandidatePartition with the EstimateCost method, which is
used during search to construct a stand-alone IRModule for latency estimation.

Finish units tests for PartitionRule and CandidatePartition.
Copy link
Contributor

@mbaret mbaret left a comment

Choose a reason for hiding this comment

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

lgtm

@mbaret mbaret merged commit 261de53 into apache:main Jul 13, 2022
@mbs-octoml mbs-octoml deleted the mbs-collage-combine-rules branch July 13, 2022 21:22
masahi pushed a commit to masahi/tvm that referenced this pull request Jul 15, 2022
…2078)

* [Collage] CombinerRule and CandidatePartition::EstimateCost

See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md.

We complete the PartitionRule sub-class hierarchy with the addition of
CombinePartitionRule, which allows disjoint candidate partitions to be
unioned based on simple rules.
 - By TOpPattern kind, eg a kOutElemwiseFusable and kBroadcast.
 - A tuple argument with injective fields.
 - The projection from an injective group (obviously of tuple type)
 - Combinations of the above.
These let us mimic many common fusion strategies, including TVMs, so that
the candidates explored during Collage search are as large as possible to
expose possible fusion opportunities but no larger.

Also completes CandidatePartition with the EstimateCost method, which is
used during search to construct a stand-alone IRModule for latency estimation.

Finish units tests for PartitionRule and CandidatePartition.

* - fix relay.collage ffi prefix.
xinetzone pushed a commit to daobook/tvm that referenced this pull request Nov 25, 2022
…2078)

* [Collage] CombinerRule and CandidatePartition::EstimateCost

See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md.

We complete the PartitionRule sub-class hierarchy with the addition of
CombinePartitionRule, which allows disjoint candidate partitions to be
unioned based on simple rules.
 - By TOpPattern kind, eg a kOutElemwiseFusable and kBroadcast.
 - A tuple argument with injective fields.
 - The projection from an injective group (obviously of tuple type)
 - Combinations of the above.
These let us mimic many common fusion strategies, including TVMs, so that
the candidates explored during Collage search are as large as possible to
expose possible fusion opportunities but no larger.

Also completes CandidatePartition with the EstimateCost method, which is
used during search to construct a stand-alone IRModule for latency estimation.

Finish units tests for PartitionRule and CandidatePartition.

* - fix relay.collage ffi prefix.
mikeseven pushed a commit to mikeseven/tvm that referenced this pull request Sep 27, 2023
…2078)

* [Collage] CombinerRule and CandidatePartition::EstimateCost

See https://github.com/apache/tvm-rfcs/blob/main/rfcs/0062-collage.md.

We complete the PartitionRule sub-class hierarchy with the addition of
CombinePartitionRule, which allows disjoint candidate partitions to be
unioned based on simple rules.
 - By TOpPattern kind, eg a kOutElemwiseFusable and kBroadcast.
 - A tuple argument with injective fields.
 - The projection from an injective group (obviously of tuple type)
 - Combinations of the above.
These let us mimic many common fusion strategies, including TVMs, so that
the candidates explored during Collage search are as large as possible to
expose possible fusion opportunities but no larger.

Also completes CandidatePartition with the EstimateCost method, which is
used during search to construct a stand-alone IRModule for latency estimation.

Finish units tests for PartitionRule and CandidatePartition.

* - fix relay.collage ffi prefix.
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