Commit Graph

156 Commits

Author SHA1 Message Date
Ping Yu 906cbe30b2
support string dtype input generation (#8003)
FEATURE
2023-10-13 15:13:45 -07:00
Matthew Soulanille ac9519e537
Show meaningful error message in benchmark tool (#7990) 2023-10-03 13:27:29 -07:00
Matthew Soulanille d500a0d039
Disable firefox browserstack tests temporarily (#7935)
* Disable firefox browserstack tests temporarily

* Remove unused WebGL scripts

* Update test-ci.sh

* Always use port 9876 for karma

* Always use port 9200 for karma

Browserstack supports ports 9200-9400 for safari
testing (https://www.browserstack.com/question/39572), and when karma launches
and its port is in use, it automatically increments the port. Starting at 9200
ensures the port is always supported by BrowserStack.

* Fix bash npm-run-all script

* Fix tfjs-vis test script

* Update karma.conf.js

* Update automl macos test version

---------

Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2023-08-25 17:05:49 -07:00
Linchenn 22196bb7ab
[Local benchmark tool] Add parallel compile option (#7755)
FEATURE

* add parallel compile benchmark

* Update index.html
2023-06-27 00:32:45 +00:00
wrighkv1 2cbc737417
Add npmVersion command line argument to benchmark NPM versions (#7674)
* npmVersion CLIarg

* add readme description

---------

Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com>
Co-authored-by: Matthew Soulanille <msoulanille@google.com>
2023-05-30 20:56:51 +00:00
Matthew Soulanille de94eec199
Fix tfjs-release not updating all tfjs versions of subpackages (#7550)
Some TFJS packages, like wasm, have examples or demos in them. These usually depend on the parent package, but the parent package is not marked as to be updated when updating the subpackage dependency versions. For an example of this, see #7547.

Update the TFJS dependencies of these subpackages to the release version if they are `link:` dependencies.
2023-05-17 18:50:25 +00:00
Linchenn 3f01eb5e17
Fix local benchmark (#7608)
FIX
2023-04-24 09:56:59 -07:00
Xu Xing 8d40c4ffc5
[e2e] Support set env flag from url (#7582)
FEATURE

For most tfjs app, URL parameter like tfjsflags=WEBGPU_PRINT_SHADER:binary
will be recognized as setting tfjs environment flag value (If it has been
registered). For e2e, this logic has been broken due to setEnvFlags will
override values for all existing flags.

This change supports setting environment flag values from URL parameters
in e2e, example: tfjsflags=WEBGPU_PRINT_SHADER:binary. When a flag is
set in both GUI(tunable flag) and URL parameter, URL parameter will
override flag from GUI.

Co-authored-by: Yang Gu <yang.gu@intel.com>
Co-authored-by: Matthew Soulanille <msoulanille@google.com>
Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com>
2023-04-21 20:14:06 -07:00
Xu Xing 3832a961a3
[e2e] Remove pose-detection (#7518)
BUG

* [e2e] Remove pose-detection

* Nit

---------

Co-authored-by: Yang Gu <yang.gu@intel.com>
Co-authored-by: Jiajia Qin <jiajia.qin@intel.com>
2023-04-18 19:46:06 -07:00
Linchenn 237a99104e
[Local benchmark] Fix run button (#7575)
BUG

* Fix run button

* Update index.html
2023-04-11 17:36:03 -07:00
Linchenn 8e4723ef95
Update dat.gui to lil.gui for local benchmark tool (#7538) 2023-04-10 18:48:31 -07:00
Tirumalesh 77e8e53fc4
Fixed the broken link in README.md (#7551)
Fixed the broken link for `tfjs/e2e/benchmarks/model_config.js`  in line 152
2023-04-06 22:37:50 -07:00
Wanming Lin 252bf326ac
[e2e] Move tflite backend to worker thread (#7453)
This PR moves all operations of tflite backend to worker thread
in order to make preparation for WebNN external delegate integration
because the WebNN spec restricts its Sync API in the worker thread.
Besides, this PR also fixes some minor issues.
2023-03-14 10:45:06 -07:00
dependabot[bot] ddb202aa4c
build(deps): bump ua-parser-js in /e2e/benchmarks/browserstack-benchmark (#7317)
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.31...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2023-01-27 13:05:36 -08:00
Linchenn 4efeb24702
rm (#7305)
FEATURE
2023-01-26 10:35:51 -08:00
Linchenn 09535adfe5
Add averageTimeExclFirst to benchmark_util.timeInference (#7231)
FEATURE
2023-01-04 13:33:52 -08:00
Linchenn 4ac5658806
Support batch-benchmark on local device (#7228)
FEATURE
2023-01-03 16:41:26 -08:00
dependabot[bot] 5b0ddc19b1
build(deps): bump fast-json-patch (#7210)
Bumps [fast-json-patch](https://github.com/Starcounter-Jack/JSON-Patch) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/Starcounter-Jack/JSON-Patch/releases)
- [Commits](https://github.com/Starcounter-Jack/JSON-Patch/compare/v3.1.0...3.1.1)

---
updated-dependencies:
- dependency-name: fast-json-patch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-03 09:19:36 -08:00
Linchenn f9d46b6343
Update date for nightly benchmark (#7184)
BUG
2022-12-19 23:15:32 -08:00
Linchenn b40c641664
Increase cycle from week to half-month for nightly benchmark (#7173)
FEATURE

* upd

* enable default date

* fix
2022-12-15 14:25:33 -08:00
Linchenn 11835343f9
Increase timeout and add Gpu info to nightly benchmark (#7145)
FEATURE

* fix firestore

* add test

* fix
2022-12-07 17:14:48 -08:00
dependabot[bot] b426bb4f79
Bump socket.io-parser in /e2e/benchmarks/browserstack-benchmark (#7032)
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-14 10:11:09 -08:00
Xu Xing e2e29e4d8f
Support dump with graphmodel.execute (#6953)
Before this change, only graph model predicting with executeAsync supported dump. This has two drawbackes:
1. Some models don't support dump.
2. For models that have a wrapping / preprocessing layer around the graph model, such as bodypix,
   pose-detection, a lot of change is required to support dump, example
   change: https://github.com/tensorflow/tfjs-models/pull/841.

This change removes this limitation, so that more models are supported and dump is easier.
2022-11-07 12:54:09 -08:00
Linchenn 6d238b3142
[Benchmark] Add weekly scheduling for nightly benchmark (#6959)
FEATURE

* add weeklyRun

* Update app.js

* add tests

* add weeklyCycleRun

* add doc

* Update app.js
2022-10-20 13:26:42 -07:00
Xu Xing e94d083898
[e2e] Support dump mode (#6850)
FEATURE
PERF
* [e2e] Support dump mode

Dump mode enchances model debug mode in three ways:
1. Support whole model dump in different dumpLevel: 0, dump close diffs. 1, dump any diffs. 2, dump all.
2. Support ops dump.
3. Support dumpLength: -1 means all.

Dump works in two steps:
1. Dump tensors into files according to dumpLevel. These dump files start with
"dumpmodel_".
2. When tensor diffs spotted, apply below to each tensor related op: use
the reference as input, run the op again under predict backend. Then
dump all the results into files. These dump files start with "dumpops_"

Example url parameter to turn on dump mode:
KEEP_INTERMEDIATE_TENSORS=true&dumpLevel=1&dumpLength=-1

Bug = https://github.com/tensorflow/tfjs/issues/6860

* Clean model config

* Clean

* Dump ops when diff occurs

* Fix comments

* Refine compare and nit

* Fix comments

* Clean unused var

* Fix comments

* Nit

* Fix comments

Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2022-10-18 12:55:54 -07:00
Linchenn 1bcdd05bb4
[Benchmark] Add GPU hardware info to the benchmark tools (#6907)
FEATURE

* add benchmark

* use webglBackend
2022-10-06 12:58:23 -07:00
Matthew Soulanille c5eb1d39bf
[e2e] Fix incorrect reference to link-package (#6895)
Some package.json files in e2e linked against link_package instead of link-package. This was not discovered earlier because these tests are usually run after the package.jsons are prepared for release and dependencies are rewritten to the release versions.
2022-10-05 09:52:39 -07:00
Na Li 4541972a5d
[benchmark]Add error msg to backend failure. (#6892) 2022-10-04 11:31:17 -07:00
Linchenn ebc655ac4e
Fix nightly benchmark (#6771)
BUG

* fix

* Update cloudbuild.yml

* update bs

Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2022-08-24 14:37:49 -07:00
Linchenn d86a6dba74
add flg (#6772)
FEATURE
2022-08-19 14:43:27 -07:00
Linchenn 59af8c2342
[browserstack benchmark tool] Use stream to write to outfile (#6750)
FEATURE

* write

* Update app.js

* Update app.js
2022-08-18 11:09:49 -07:00
Linchenn 89f59aa6a7
[browserstack benchmark tool] batch benchmark code snippet (#6742)
FEATURE
* move code snippet

* Update app.js

* Update index.js
2022-08-12 13:14:39 -07:00
Linchenn 996bdf4ef4
[browserstack benchmark tool] Move CodeSnippet from backend to frontend (#6738)
* move code snippet

* merge codeSnippet

* Delete benchmark_results.html
2022-08-11 15:41:20 -07:00
Linchenn 8715f5816c
[browserstack benchmark tool] Add a html to present benchmark results (#6740)
FEATURE

* Update benchmark_results.html

* add html

* Update app.js

* upd names

* add args

Co-authored-by: Na Li <linazhao@google.com>
2022-08-11 14:48:53 -07:00
Linchenn 988a26a04f
Add convertedBy (#6745)
FEATURE
2022-08-11 12:47:06 -07:00
Linchenn cbfe2bbdc3
[benchmark tools] Update model lists for benchmarking (#6730)
FEATURE

* vision models

* fix sizes & add language models

* add todo

Co-authored-by: Ping Yu <4018+pyu10055@users.noreply.github.com>
2022-08-09 16:09:27 -07:00
Linchenn cb95557c2b
[benchmark tools] Update mobilenet models (#6729)
FEATURE
* mb23

* fix

* rename

* Update index.html

* Update README.md

* rollback Alpha in html

* rollback alpha for model_config

* Update model_config.js
2022-08-09 15:56:37 -07:00
Linchenn 6ee743f2d0
Setup optimization target deices/browsers (#6722)
PERF

* update target browsers/devices

* Update browser_list.json

* Update index.js

* up
2022-08-05 16:39:42 -07:00
Linchenn f3e6c7fbd9
Fix app.js (#6727)
BUG
2022-08-05 15:01:59 -07:00
Matthew Soulanille 7ae8860dbc
Run the next BrowserStack benchmark immediately instead of in batches (#6717)
Before this change, the benchmark script would start x benchmarks, wait for them all to complete, and then start the next x. This change makes it start new benchmarks immediately when prior benchmarks complete so that there are always x benchmarks running.

This doesn't work across tests that require different karma configs (e.g. changing model / parameters), and all tests from one karma config must complete before tests with a different karma config can start.

Co-authored-by: Linchenn <40653845+Linchenn@users.noreply.github.com>
2022-08-03 16:28:55 -07:00
Linchenn 630913684f
Fix build script (#6716)
BUG
2022-08-03 14:45:19 -07:00
Linchenn 2bc408aba1
Update browser_list.json (#6713)
Adds/updates browsers/devices for the BrowserStack benchmark tool:

1. Windows: updates OS from 10 to 11 and updates browser version to the latest for all browser.
2. Mac: updates OS from Catalina to Monterey and updates browser version to the latest for all browser.
3. ios iphone: adds os_version as 15
4. ios ipad: adds os_version as 14 and 15
5. android: adds os_version as 12.0
2022-08-02 19:41:22 -07:00
Linchenn e5c138e927
[browserstack benchmark tool] Enable code snippet benchmark (#6704)
FEATURE
* benchmark code snippet

* Update benchmark_models.js

* upd

* show code snippet in tool

* typo
2022-08-02 16:09:47 -07:00
Matthew Soulanille 2dc7a7766c
Use the firebase-admin package instead of firebase to push benchmark results (#6711)
Replace the firebase package with firebase-admin. The firebase-admin package is more appropriate for our use case of running benchmarks in GCP and pushing them to Firestore. Per their docs, "The Firebase Admin Node.js SDK enables access to Firebase services from privileged environments (such as servers or cloud) in Node.js." It uses application default credentials, which are available in GCP.
2022-08-02 14:53:21 -07:00
Linchenn 5c5f446938
[browserstack benchmark tool] Enable customizing local builds (#6705)
FEATURE

* enable customizing local builds

* simplify build

* update yarn cmds
2022-08-02 11:48:22 -07:00
Linchenn bb6205704f
Fix browserstack-benchmark tool (#6703)
BUG
* fix bs

* update isTflite
2022-08-01 17:18:03 -07:00
Linchenn 18c8b9d319
[local-benchmark tool] Enable populate modelUrl and input shapes via URL (#6680)
FEATURE

* add modelUrl via Url

* pre-populate input shapes

* number

* Update README.md

* Update README.md
2022-07-27 10:27:46 -07:00
Yang Gu 9afbd865e6
Set willReadFrequently to true for GPU correctness test (#6665)
If willReadFrequently is set to true, 2D canvas will always be backed by
CPU. Otherwise, it will be backed by GPU in first call, and backed by
CPU in the rest calls.
For CPU backends, including CPU and WASM, we set this to true for
perfomance. So to compare the results of GPU with CPU, we need to ensure
it's always backed by CPU.

BUG: #6664

Co-authored-by: Na Li <linazhao@google.com>
2022-07-22 09:46:21 -07:00
Linchenn 2241756004
[Benchmark tools] Add mobilenet V3 (#6615)
* Update model_config.js

* add m_v2
2022-07-11 10:37:57 -07:00
Xu Xing 3c0fc4330c
Split tfjs loading related code to loader.js (#6540)
This change is trying to decouple loading related code from index.html.
With this change, we can also easily implement our own tfjs demo with the latest tfjs build, below is example:

```
    <script src="loader.js"></script>
    <script>
        'use strict';

        async function runTFJS(backend) {
            await tf.setBackend(backend);
            await tf.ready();
            tf.env().set('WEBGPU_CPU_FORWARD', false);
            const a = tf.tensor3d([1, 11, 2, 22, 3, 33, 4, 44], [2, 2, 2]);
            const b = tf.tensor3d([1, 11, 2, 22, 3, 33, 4, 44], [2, 2, 2]);

            const result = tf.add(a, b);
            console.log(await result.data());
        }

        async function loadTFJSDemo() {
            const urlState = new URLSearchParams(location.search);
            let localBuild = [];
            if (urlState && urlState.has('localBuild')) {
                localBuild = urlState.get('localBuild').split(',');
            }
            await loadTFJS(localBuild);
            return urlState.get('backend');
        }

        (async function () {
            const backend = await loadTFJSDemo();
            await runTFJS(backend);
        })();
    </script>
```
2022-06-28 11:08:43 -07:00