-
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
[AutoScheduler] Improve the GPU tutorial by deleting measure_ctx earlier #6660
Merged
Conversation
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
comaniac
approved these changes
Oct 10, 2020
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.
LGTM
merrymercy
commented
Oct 11, 2020
TusharKanekiDey
pushed a commit
to TusharKanekiDey/tvm
that referenced
this pull request
Oct 13, 2020
…ier (apache#6660) * del measurement process in the tutorial * fix * trigger CI
TusharKanekiDey
pushed a commit
to TusharKanekiDey/tvm
that referenced
this pull request
Oct 14, 2020
…ier (apache#6660) * del measurement process in the tutorial * fix * trigger CI
TusharKanekiDey
pushed a commit
to TusharKanekiDey/tvm
that referenced
this pull request
Oct 15, 2020
…ier (apache#6660) * del measurement process in the tutorial * fix * trigger CI
TusharKanekiDey
pushed a commit
to TusharKanekiDey/tvm
that referenced
this pull request
Oct 15, 2020
…ier (apache#6660) * del measurement process in the tutorial * fix * trigger CI
TusharKanekiDey
pushed a commit
to TusharKanekiDey/tvm
that referenced
this pull request
Oct 16, 2020
…ier (apache#6660) * del measurement process in the tutorial * fix * trigger CI
trevor-m
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Oct 19, 2020
…ier (apache#6660) * del measurement process in the tutorial * fix * trigger CI
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
To avoid the confusion in #6570, we call
del measure_ctx
earlier in the tutorial, just after we finish the search.measure_ctx
overloads the__del__
. Ideally, we do not need to calldel measure_ctx
explicitly.However, I found
__del__
only works for local variables.If we use
measure_ctx
as a local variable inside a function, it can be garbage-collected correctly.But in the tutorial,
measure_ctx
is a global variable. It thus cannot be garbage-collected correctly.There are two solutions to this problem.
S1. call
del measure_ctx
explicitlyS2. use
I think S1 is better. In S1,
del measure_ctx
is only required ifmeasure_ctx
is a global variable, which is a rare case (but unfortunately, this happens in the tutorial)