Closed Christywl closed 4 years ago
The compilation time mainly records the time to generate operands that can be used as parameter to excute operation. Different backends generate different operand and tfjs backend usually takes more time in this step. And tfjs need an extra step that change the format of kernel in here. Sometimes this step will consume a lot of time. For example, I simply tested with DenseNet 121 ONNX. The tfjs wasm backend needs 175ms to convert operands and 142ms to change format while the previous tflite backend needs 112ms to convert operands.
Test Env: webml-polyfill commit: https://github.com/intel/webml-polyfill/commit/a58f9f5340ca87eca4cda18db019f42752317f9e Platform: Windows(Dell XPS 13, Intel i5-8250U)
Actual Result: The compilation time for TF.js WASM(https://github.com/intel/webml-polyfill/commit/a58f9f5340ca87eca4cda18db019f42752317f9e) became larger than WASM(TFLite) (https://github.com/intel/webml-polyfill/commit/011a7f64fc65edf40c31a1d294aeefba48e4633d) for most models: For example:
How to Reproduce:
Inspect
and check compilation time in the console