-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[PASS]LoopPartition #56
Merged
Merged
Changes from 7 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
4a31797
loop_partition draft
5c95c6f
divide loop variable into constant domain and variable domain & consi…
335a8ad
process doubt interval
9afb1e1
merge with master branch
266931c
fix and refactor, add relax_map arg in BoundDeduce
40c0b5f
fix testcase and comment
63d3a7d
rebase to zero, convert to SSA
d7aba90
change the logic of generating loop code & fix issues
e2b39b1
add a testcase for relax map in deducebound && fix issues
7aa642c
Merge branch 'master' into dev-clean
b5786b5
clean code
8d0bbd9
const auto&
d2a90b2
add test_multi_if
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
|
||
#include <tvm/expr.h> | ||
#include <tvm/schedule.h> | ||
#include <vector> | ||
|
||
namespace tvm { | ||
namespace arith { | ||
|
@@ -156,6 +157,15 @@ ExprIntSetMap EvalSetForEachSubExpr(Expr r, | |
* \return the set after union | ||
*/ | ||
IntSet Union(const Array<IntSet>& sets); | ||
IntSet Union(const std::vector<IntSet>& sets); | ||
|
||
/*! | ||
* \brief Create an union set of all sets | ||
* \param sets The sets to be intersected | ||
* \return the set after intersected | ||
*/ | ||
IntSet Intersect(const Array<IntSet>& sets); | ||
IntSet Intersect(const std::vector<IntSet>& sets); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can simply construct Array in outside and pass it in. Should be same as vector |
||
|
||
// implementation | ||
inline const IntSetNode* IntSet::operator->() const { | ||
|
@@ -169,11 +179,17 @@ inline const IntSetNode* IntSet::operator->() const { | |
* | ||
* \param v The target variable to be deduced. | ||
* \param cond The conditional expression. | ||
* \param dom_map The domain of each variable. | ||
* \param hint_map The domain of variable, used to help deduce. | ||
* \param relax The domain of each variable, used to relax the domain. | ||
* \return An integer set that can cover all the possible values. | ||
*/ | ||
IntSet DeduceBound(Var v, Expr cond, | ||
const Map<Var, IntSet>& dom_map); | ||
IntSet DeduceBound(Expr v, Expr cond, | ||
const Map<Var, IntSet>& hint_map, | ||
const Map<Var, IntSet>& relax_map); | ||
IntSet DeduceBound(Expr v, Expr e, | ||
const std::unordered_map<const Variable*, IntSet>& hint_map, | ||
const std::unordered_map<const Variable*, IntSet>& relax_map); | ||
|
||
|
||
} // namespace arith | ||
} // namespace tvm | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
always document functions in header