Skip to content

[USMP] Hill Climb allocator - #9704

Merged
manupak merged 5 commits into
apache:mainfrom
d-smirnov:greedy
Jan 14, 2022
Merged

[USMP] Hill Climb allocator#9704
manupak merged 5 commits into
apache:mainfrom
d-smirnov:greedy

Conversation

@d-smirnov

Copy link
Copy Markdown
Contributor

This PR adds HillClimb allocator "tir.usmp.algo.hill_climb"
to memory allocation algorithm set

@manupakmanupak 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.

Thanks @d-smirnov.

I did a pass.

Most of my comments are on cleaning up the code, improving clarity and possibly re-using the code rather than duplicating it here.

See if you agree.

Comment threadsrc/tir/usmp/algo/hill_climb.cc Outdated
Comment threadsrc/tir/usmp/algo/hill_climb.cc Outdated
Comment threadsrc/tir/usmp/algo/hill_climb.cc Outdated
Comment threadsrc/tir/usmp/algo/hill_climb.cc Outdated
Comment threadsrc/tir/usmp/algo/hill_climb.cc Outdated
Comment threadtests/python/unittest/test_tir_usmp_algo_hill_climb.py Outdated
Comment threadtests/python/unittest/test_tir_usmp_algo_hill_climb.py
Comment threadtests/python/unittest/test_tir_usmp_algo_hill_climb.py
Comment threadsrc/tir/usmp/algo/hill_climb.cc
Comment threadsrc/tir/usmp/algo/hill_climb.cc Outdated
@manupak

Copy link
Copy Markdown
Contributor

Should we merge the testing here into https://github.com/apache/tvm/blob/af869bc79cecdc18371862524ea241803dc78c7a/tests/python/unittest/test_tir_usmp_algo.py ?

By doing so, we could improve the current testing scope to consider hill climbing allocation while augmenting the tests here to run other algorithms as well, because the tests here seems not special just only to hill climbing algorithm.

This PR adds HillClimb allocator "tir.usmp.algo.hill_climb"
to the memory allocation algorithm set.
Change-Id: Ib7485df93757eb512da040528ec86c920db8d03b
Change-Id: I6700a24c1608d92f87be7dde33cc24f5de1f7063
Change-Id: I0dac5c6d75ade8f813b077c8708aad59d2722933

@manupakmanupak 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.

Looking good now... Thanks @d-smirnov

Some early feedback for the header file creation.

It is better if we can enable hill climb in other tests in test_tir_usmp_algo.py as well.

Comment threadsrc/tir/usmp/algo/greedy.cc
Comment threadsrc/tir/usmp/algo/hill_climb.cc
Comment threadsrc/tir/usmp/algo/hill_climb.cc
Change-Id: If8ed159eceef32d3f22b51e0252161d09222eb1e

@manupakmanupak 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.

Hi @d-smirnov,

Thanks for working with me on this. This looks good now!
One last request is to enable hill_climb in the tests in test_tir_usmp_algo.py that are parameterized on greedy algorithm. Would we able to do that ?

e.g. :

@pytest.mark.parametrize("algorithm", ["greedy_by_size", "greedy_by_conflicts"])
deftest_name_based_ordering(algorithm):

Also, lets just re-trigger the CI once more since this is 19 days old.

Added "hill_climb" into test_tir_usmp_algo.py
Amended sorting to be consistent with "greedy" family
Change-Id: I8e9f5282f15baaab71d6d129aeb9643376b14763

@manupakmanupak 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! Thanks @d-smirnov

@manupak
manupak merged commit 89ae603 into apache:mainJan 14, 2022
crazydemo pushed a commit to crazydemo/tvm that referenced this pull request Jan 27, 2022
* [USMP] Hill Climb allocator
This PR adds HillClimb allocator "tir.usmp.algo.hill_climb"
to the memory allocation algorithm set.
Change-Id: Ib7485df93757eb512da040528ec86c920db8d03b
* requested changes
Change-Id: I6700a24c1608d92f87be7dde33cc24f5de1f7063
* Conda-related linter small fixes
Change-Id: I0dac5c6d75ade8f813b077c8708aad59d2722933
* Moved implementation from greedy.h to greedy.cc
Change-Id: If8ed159eceef32d3f22b51e0252161d09222eb1e
* Integrated into test_tir_usmp_algo.py unit test
Added "hill_climb" into test_tir_usmp_algo.py
Amended sorting to be consistent with "greedy" family
Change-Id: I8e9f5282f15baaab71d6d129aeb9643376b14763
Raghav-Chakravarthy pushed a commit to Raghav-Chakravarthy/tvm that referenced this pull request Jan 28, 2022
* [USMP] Hill Climb allocator
This PR adds HillClimb allocator "tir.usmp.algo.hill_climb"
to the memory allocation algorithm set.
Change-Id: Ib7485df93757eb512da040528ec86c920db8d03b
* requested changes
Change-Id: I6700a24c1608d92f87be7dde33cc24f5de1f7063
* Conda-related linter small fixes
Change-Id: I0dac5c6d75ade8f813b077c8708aad59d2722933
* Moved implementation from greedy.h to greedy.cc
Change-Id: If8ed159eceef32d3f22b51e0252161d09222eb1e
* Integrated into test_tir_usmp_algo.py unit test
Added "hill_climb" into test_tir_usmp_algo.py
Amended sorting to be consistent with "greedy" family
Change-Id: I8e9f5282f15baaab71d6d129aeb9643376b14763
ylc pushed a commit to ylc/tvm that referenced this pull request Feb 16, 2022
* [USMP] Hill Climb allocator
This PR adds HillClimb allocator "tir.usmp.algo.hill_climb"
to the memory allocation algorithm set.
Change-Id: Ib7485df93757eb512da040528ec86c920db8d03b
* requested changes
Change-Id: I6700a24c1608d92f87be7dde33cc24f5de1f7063
* Conda-related linter small fixes
Change-Id: I0dac5c6d75ade8f813b077c8708aad59d2722933
* Moved implementation from greedy.h to greedy.cc
Change-Id: If8ed159eceef32d3f22b51e0252161d09222eb1e
* Integrated into test_tir_usmp_algo.py unit test
Added "hill_climb" into test_tir_usmp_algo.py
Amended sorting to be consistent with "greedy" family
Change-Id: I8e9f5282f15baaab71d6d129aeb9643376b14763
Sign up for freeto 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

@d-smirnov@manupak