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

[browserstack benchmark tool] batch benchmark code snippet #6742

Merged
merged 7 commits into from
Aug 12, 2022

Conversation

Linchenn
Copy link
Collaborator

@Linchenn Linchenn commented Aug 10, 2022

This PR enables users add code snippets to benchmark into preconfigured_browser.json. Then the app.js program will iterate each code snippet to benchmark.

An example usage:

  1. update the "benchmark" value in preconfigured_browser.json with the following:
{
    "model": ["mobilenet_v2", "mesh_128"],
    "numRuns": 10,
    "backend": ["webgl"],
    "codeSnippets": [{"codeSnippet":"predict = () => { return tf.conv2d(img, filter, 1, 'same');};",
                      "setupCodeSnippetEnv":"img = tf.randomUniform([1, 240, 240, 3], 0, 1000); filter = tf.randomUniform([3, 3, 3, 3], 0, 1000);"}]
  }
  1. run node app.js --benchmark='./preconfigured_browser.json' --cloud --outfile=js and you could see benchmark results for the code snippet in benchmark_results.html

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


This change is Reviewable

Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewable status: :shipit: complete! 1 of 1 approvals obtained (waiting on @pyu10055)

Copy link
Collaborator

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

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

Reviewed 3 of 3 files at r1.
Reviewable status: :shipit: complete! 2 of 1 approvals obtained

@pyu10055 pyu10055 merged commit 89f59aa into tensorflow:master Aug 12, 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