You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/10/25 20:15:31 UTC
[GitHub] [tvm] zxybazh opened a new pull request, #13198: [MetaSchedule][Minor] Fix Memory Database Module Equality
zxybazh opened a new pull request, #13198:
URL: https://github.com/apache/tvm/pull/13198
Previously the memory database assumed the workload tokens are from `CommitWorkload` function, this PR allows the use of module equality function in `GetTopK` function to compare workloads.
Thanks to @petersalas for point it out.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] zxybazh commented on a diff in pull request #13198: [MetaSchedule][Minor] Fix Memory Database Module Equality
Posted by GitBox <gi...@apache.org>.
zxybazh commented on code in PR #13198:
URL: https://github.com/apache/tvm/pull/13198#discussion_r1004930742
##########
src/meta_schedule/database/memory_database.cc:
##########
@@ -71,7 +71,7 @@ class MemoryDatabaseNode : public DatabaseNode {
if (run_secs.empty()) {
continue;
}
- if (record->workload.same_as(workload)) {
+ if (WorkloadEqual(GetModuleEquality())(record->workload, workload)) {
Review Comment:
See [here](https://cs.github.com/apache/tvm/blob/23c2909f2917fe9fbccad8e440199e5e4a106ba9/src/meta_schedule/database/json_database.cc#L131) for JSONDatabase's implementation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] masahi commented on a diff in pull request #13198: [MetaSchedule][Minor] Fix Memory Database Module Equality
Posted by GitBox <gi...@apache.org>.
masahi commented on code in PR #13198:
URL: https://github.com/apache/tvm/pull/13198#discussion_r1004927019
##########
src/meta_schedule/database/memory_database.cc:
##########
@@ -71,7 +71,7 @@ class MemoryDatabaseNode : public DatabaseNode {
if (run_secs.empty()) {
continue;
}
- if (record->workload.same_as(workload)) {
+ if (WorkloadEqual(GetModuleEquality())(record->workload, workload)) {
Review Comment:
What does it fix? They don't seem equivalent (pointer vs structural equality)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] junrushao merged pull request #13198: [MetaSchedule][Minor] Fix Memory Database Module Equality
Posted by GitBox <gi...@apache.org>.
junrushao merged PR #13198:
URL: https://github.com/apache/tvm/pull/13198
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] tvm-bot commented on pull request #13198: [MetaSchedule][Minor] Fix Memory Database Module Equality
Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13198:
URL: https://github.com/apache/tvm/pull/13198#issuecomment-1291086062
<!---bot-comment-->
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
<sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] zxybazh commented on a diff in pull request #13198: [MetaSchedule][Minor] Fix Memory Database Module Equality
Posted by GitBox <gi...@apache.org>.
zxybazh commented on code in PR #13198:
URL: https://github.com/apache/tvm/pull/13198#discussion_r1004929787
##########
src/meta_schedule/database/memory_database.cc:
##########
@@ -71,7 +71,7 @@ class MemoryDatabaseNode : public DatabaseNode {
if (run_secs.empty()) {
continue;
}
- if (record->workload.same_as(workload)) {
+ if (WorkloadEqual(GetModuleEquality())(record->workload, workload)) {
Review Comment:
Here we wanted to find the tuning records for the structrually equal module, but here instead of doing WorkloadEquality comparsion, it's directly doing pointer comparison, which doesn't seem to be correct.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] petersalas commented on a diff in pull request #13198: [MetaSchedule][Minor] Fix Memory Database Module Equality
Posted by GitBox <gi...@apache.org>.
petersalas commented on code in PR #13198:
URL: https://github.com/apache/tvm/pull/13198#discussion_r1004935036
##########
src/meta_schedule/database/memory_database.cc:
##########
@@ -71,7 +71,7 @@ class MemoryDatabaseNode : public DatabaseNode {
if (run_secs.empty()) {
continue;
}
- if (record->workload.same_as(workload)) {
+ if (WorkloadEqual(GetModuleEquality())(record->workload, workload)) {
Review Comment:
Would it be practical to have a common suite of `Database` tests that can be run against each implementation to test common invariants?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] zxybazh commented on a diff in pull request #13198: [MetaSchedule][Minor] Fix Memory Database Module Equality
Posted by GitBox <gi...@apache.org>.
zxybazh commented on code in PR #13198:
URL: https://github.com/apache/tvm/pull/13198#discussion_r1005079558
##########
src/meta_schedule/database/memory_database.cc:
##########
@@ -71,7 +71,7 @@ class MemoryDatabaseNode : public DatabaseNode {
if (run_secs.empty()) {
continue;
}
- if (record->workload.same_as(workload)) {
+ if (WorkloadEqual(GetModuleEquality())(record->workload, workload)) {
Review Comment:
Hi Peter, we do have unit tests for MetaSchedule Database [here](https://github.com/apache/tvm/blob/23c2909f2917fe9fbccad8e440199e5e4a106ba9/tests/python/unittest/test_meta_schedule_database.py) but there's not many cases against MemoryDatabase. Will add a regression test in this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] zxybazh commented on pull request #13198: [MetaSchedule][Minor] Fix Memory Database Module Equality
Posted by GitBox <gi...@apache.org>.
zxybazh commented on PR #13198:
URL: https://github.com/apache/tvm/pull/13198#issuecomment-1291086426
CC @junrushao @masahi
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [tvm] zxybazh commented on a diff in pull request #13198: [MetaSchedule][Minor] Fix Memory Database Module Equality
Posted by GitBox <gi...@apache.org>.
zxybazh commented on code in PR #13198:
URL: https://github.com/apache/tvm/pull/13198#discussion_r1005079558
##########
src/meta_schedule/database/memory_database.cc:
##########
@@ -71,7 +71,7 @@ class MemoryDatabaseNode : public DatabaseNode {
if (run_secs.empty()) {
continue;
}
- if (record->workload.same_as(workload)) {
+ if (WorkloadEqual(GetModuleEquality())(record->workload, workload)) {
Review Comment:
Hi Peter, we do have unit tests for MetaSchedule Database [here](https://github.com/apache/tvm/blob/23c2909f2917fe9fbccad8e440199e5e4a106ba9/tests/python/unittest/test_meta_schedule_database.py) but there's not many cases against MemoryDatabase. Will add a regression test in a later PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org