-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Local benchmark tool] Add parallel compile option #7755
Conversation
throw new Error( | ||
'Parallel Compilation for async function is not supported.'); | ||
} | ||
res = await res; |
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.
Why we need an extra res = await res
? And is it possible that res is a tensor array so that we can't directly call tf.dispose(res)
?
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.
Why we need an extra res = await res?
I am adding it in case predict is a async function
And is it possible that res is a tensor array so that we can't directly call tf.dispose(res)?
I think tf.dispose is able to process tensor container, https://js.tensorflow.org/api/latest/#dispose
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.
Got it, thanks.
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!
throw new Error( | ||
'Parallel Compilation for async function is not supported.'); | ||
} | ||
res = await res; |
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.
Got it, thanks.
This PR replaces the name
Warm up time
with1st inference time
, because theWarm up time
name is confusing: the number of warm up runs could be many andWarm up time
actually presents the1st inference time
.The parallel compilation feature has effects only for WebGL backend and WebGPU backend.
UI Preview:
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.