Skip to content

[Collage] CombinerRule and CandidatePartition::EstimateCost#12078

Merged
mbaret merged 2 commits into
apache:mainfrom
mbs-octoml:mbs-collage-combine-rules
Jul 13, 2022
Merged

[Collage] CombinerRule and CandidatePartition::EstimateCost#12078
mbaret merged 2 commits into
apache:mainfrom
mbs-octoml:mbs-collage-combine-rules

Conversation

@mbs-octoml

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

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

@mbaret when you get a chance, thanks.

@mbs-octoml

Copy link
Copy Markdown
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.
@mbs-octoml mbs-octoml force-pushed the mbs-collage-combine-rules branch from 97f062b to d3b608e Compare July 13, 2022 15:33

@mbaret mbaret left a comment

Copy link
Copy Markdown
Contributor

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