Skip to content

[µTVM] Add platform timer and RPCTimeEvaluator to enable AutoTVM#6964

Merged
tqchen merged 5 commits into
apache:mainfrom
areusch:utvm-platform-timer
Dec 28, 2020
Merged

[µTVM] Add platform timer and RPCTimeEvaluator to enable AutoTVM#6964
tqchen merged 5 commits into
apache:mainfrom
areusch:utvm-platform-timer

Conversation

@areusch

@areusch areusch commented Nov 24, 2020

Copy link
Copy Markdown
Contributor

This PR adds a platform-specific timing function plus a device-side implementation of RPCTimeEvaluator. In a follow-on, an AutoTVM test will be added (there are a few different dependent PRs in flight here so need to let them all land before I can test that properly).

@areusch areusch force-pushed the utvm-platform-timer branch 3 times, most recently from 27b1561 to f464ee6 Compare December 11, 2020 18:20
@areusch areusch force-pushed the utvm-platform-timer branch from f464ee6 to b0dc298 Compare December 11, 2020 22:45
@areusch areusch marked this pull request as ready for review December 12, 2020 01:58
@areusch

areusch commented Dec 12, 2020

Copy link
Copy Markdown
Contributor Author


/*! Size of the global function registry, in bytes. */
#define TVM_CRT_GLOBAL_FUNC_REGISTRY_SIZE_BYTES 200
#define TVM_CRT_GLOBAL_FUNC_REGISTRY_SIZE_BYTES 256

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.

out of curiosity, what's the reason for increasing the registry size? just having a nice power of 2?

@tmoreau89 tmoreau89 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 for the PR @areusch, LGTM

@tmoreau89

Copy link
Copy Markdown
Contributor

@liangfu care to take a pass? thanks!

@liangfu liangfu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look good, except for a minor change request.

On the other hand, I think it's time to consider using a goto chain when leaving a function on error, since we could easily leave the function with a memory leak in C implementation.

Comment thread src/runtime/crt/common/crt_runtime_api.c Outdated
@liangfu

liangfu commented Dec 24, 2020

Copy link
Copy Markdown
Member

ping @areusch

@areusch

areusch commented Dec 24, 2020

Copy link
Copy Markdown
Contributor Author

sorry @liangfu for the delay. i've addressed your comment and sync'd to main.

@liangfu liangfu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, the changes looks good.

@areusch

areusch commented Dec 27, 2020

Copy link
Copy Markdown
Contributor Author

@tqchen I think this is ready to merge

@tqchen

tqchen commented Dec 28, 2020

Copy link
Copy Markdown
Member

@liangfu @tmoreau89 feel free to merge next time given both committer approves :) no need to block on myself

@tqchen tqchen merged commit b8ac8d9 into apache:main Dec 28, 2020
tkonolige pushed a commit to tkonolige/incubator-tvm that referenced this pull request Jan 11, 2021
…che#6964)

* Add platform timer to microTVM.

* Address liangfu comments

* cppformat

* clang-format

Co-authored-by: Liangfu Chen <liangfu@apache.org>
TusharKanekiDey pushed a commit to TusharKanekiDey/tvm that referenced this pull request Jan 20, 2021
…che#6964)

* Add platform timer to microTVM.

* Address liangfu comments

* cppformat

* clang-format

Co-authored-by: Liangfu Chen <liangfu@apache.org>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request Jan 21, 2021
…che#6964)

* Add platform timer to microTVM.

* Address liangfu comments

* cppformat

* clang-format

Co-authored-by: Liangfu Chen <liangfu@apache.org>
electriclilies pushed a commit to electriclilies/tvm that referenced this pull request Feb 18, 2021
…che#6964)

* Add platform timer to microTVM.

* Address liangfu comments

* cppformat

* clang-format

Co-authored-by: Liangfu Chen <liangfu@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants