Skip to content
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

Merged
merged 6 commits into from
Jun 27, 2023

Conversation

Linchenn
Copy link
Collaborator

@Linchenn Linchenn commented Jun 13, 2023

This PR replaces the name Warm up time with 1st inference time, because the Warm up time name is confusing: the number of warm up runs could be many and Warm up time actually presents the 1st inference time.

The parallel compilation feature has effects only for WebGL backend and WebGPU backend.

UI Preview:
image

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.

@Linchenn Linchenn requested review from qjia7 and chunnienc June 13, 2023 19:43
e2e/benchmarks/local-benchmark/index.html Outdated Show resolved Hide resolved
throw new Error(
'Parallel Compilation for async function is not supported.');
}
res = await res;
Copy link
Contributor

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)?

Copy link
Collaborator Author

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, thanks.

@Linchenn Linchenn requested a review from qjia7 June 21, 2023 17:10
Copy link
Contributor

@qjia7 qjia7 left a 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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, thanks.

@Linchenn Linchenn enabled auto-merge (squash) June 27, 2023 00:28
@Linchenn Linchenn merged commit 22196bb into tensorflow:master Jun 27, 2023
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