* 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>
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.
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>
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.
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.
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>
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.
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>
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
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.
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>