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
178 stars 14 forks source link

Optional xnnpack feature relies on weak symbols which are unavailable on Windows #138

Open pkgoogle opened 1 week ago

pkgoogle commented 1 week ago

Original Issue: https://github.com/tensorflow/tensorflow/issues/59913 Opening on behalf of @georgthegreat

Issue Type

Build/Install

Have you reproduced the bug with TF nightly?

Yes

Tensorflow Version

2.4

Current Behaviour?

At the time tflite comes with optional xnnpack feature which relies on TFLITE_ATTRIBUTE_WEAK attribute applied to a delegate function.

As there are no weak symbols on Windows, this feature can not be used universally (i. e. independent from target platform).

I suggest switching this feature on / off in configure time (when build with CMake) or via explicit choosing of option (when build with Bazel). This will force every client to explicitly add a dependency on either xnnpack_enabled or xnnpack_disabled library, just in the same way as with other delegates (i. e. nnapi).

What do you think?

gaikwadrahul8 commented 6 days ago

This issue originally reported by @georgthegreat 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.