Skip to content

Fix an apparent bug in the [web] timer.#10875

Merged
kparzysz-quic merged 2 commits intoapache:mainfrom
octoJon:main
Apr 2, 2022
Merged

Fix an apparent bug in the [web] timer.#10875
kparzysz-quic merged 2 commits intoapache:mainfrom
octoJon:main

Conversation

@octoJon
Copy link
Copy Markdown
Contributor

@octoJon octoJon commented Apr 1, 2022

I've never worked in TypeScript before, so it's possible I'm wrong, but the behavior of this timer script appears to be inconsistent with the earlier(?) code in tvm/src/runtime/rpc/rpc_module.cc#L387-388.

As far as I can tell, what this code is supposed to be doing is scaling up the number of runs measured per trial if minRepeatMs hasn't been reached. The max condition seems to be intended to make sure that the number of replicates run on subsequent trials is no less than 1.618 times the previous attempt's trials -- presumably as a failsafe against somehow getting stuck in a very tight loop. The version of the code in web/src/runtime.ts wouldn't actually avoid that problem, though.

@octoJon octoJon marked this pull request as draft April 1, 2022 20:46
@octoJon octoJon marked this pull request as ready for review April 1, 2022 20:47
Copy link
Copy Markdown
Contributor

@AndrewZhaoLuo AndrewZhaoLuo left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for catching this. Without this it would appear to hit the *1.618 more often

@kparzysz-quic kparzysz-quic merged commit daa0689 into apache:main Apr 2, 2022
pfk-beta pushed a commit to pfk-beta/tvm that referenced this pull request Apr 11, 2022
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Apr 11, 2022
Sign up for free to 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.

3 participants