google-ai-edge / LiteRT

LiteRT is the new name for TensorFlow Lite (TFLite). While the name is new, it's still the same trusted, high-performance runtime for on-device AI, now with an expanded vision.
https://ai.google.dev/edge/litert
Apache License 2.0
167 stars 13 forks source link

tensorflowlite.dll is huge (compared to other platforms) #153

Open gaikwadrahul8 opened 16 hours ago

gaikwadrahul8 commented 16 hours ago

Opened on behalf of @sztomi, Issue is current as of this writing. Previous Issue: https://github.com/tensorflow/tensorflow/issues/48118

Please make sure that this is a build/installation issue. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template

System information

Describe the problem

Provide the exact sequence of commands / steps that you executed before running into the problem

bazel build -c opt //tensorflow/lite/tensorflowlite.dll

This yields a 15MB statically linked binary when compiled for 32-bit windows (i.e. the 64-bit version will be even larger). Compared to other platforms, this is a 5x increase that is difficult to explain, especially in lieu of tools like bloaty on Windows. Unfortunately I don't know where to start poking this at all - but I do believe that even accounting for platform differences, a 5x size difference is unexpected. The same issue was noted here: https://github.com/tensorflow/tensorflow/issues/33634#issuecomment-620645664 (with a suggestion to use the C API instead, but the C API is a binding that cannot be used independent from the C++ binary).

Any other info / logs

Let me know if I can include any more info.

gaikwadrahul8 commented 12 hours ago

This issue originally reported by @pkgoogle has been moved to this dedicated repository for LiteRT to enhance issue tracking and prioritization. To ensure continuity, we have created this new issue on your behalf.

We appreciate your understanding and look forward to your continued involvement.