tensorflow/tensorflow
Quentin Khan 11c00ca2db If --use_xnnpack is specified, never use the default delegate in benchmark_tflite_model.
**Without this change**, when using `--use_xnnpack`, either:

1. `--use_xnnpack=true`: the **default resolver** (that automatically applies an XNNPack delegate) is used and an XNNPack delegate that follows the options that are given on the command line is explicitly applied.

2. `--use_xnnpack=false`: the **resolver without the default XNNPack delegate** is used and no delegate is explicitly applied, i.e. no delegate is applied.

3. No `--use_xnnpack` is specified: the **default resolver** (that automatically applies an XNNPack delegate) is used.

Case 1 has issues because the custom and default delegates are applied and
these may interfere during the initialization.

- Depending on the XNNPack options some operations may be delegated or not.
- This leads to one or the other delegate to take the ops.
- This makes the benchmarking of initialization completely wrong since two
  delegates are applied.
- This messes up with the XNNPack weight cache since it can never be enabled
  for the default delegate.

To solve this, the new behaviour is:

1. `--use_xnnpack=true`: the **resolver without the default XNNPack delegate**
   is used **and** an XNNPack delegate that follows the options that are given on the command line is explicitly applied.

2. `--use_xnnpack=false`: the **resolver without the default XNNPack delegate** is used and no delegate is explicitly applied, i.e. no delegate is applied.

3. No `--use_xnnpack` is specified: the **default resolver** (that automatically applies an XNNPack delegate) is used.

Cases 2 and 3 are not affected by this change.

PiperOrigin-RevId: 825018995
2025-10-28 07:09:35 -07:00
..
c Automated Code Change 2025-10-15 22:22:48 -07:00
cc Automated Code Change 2025-10-06 07:51:25 -07:00
compiler Automated Code Change 2025-10-28 01:35:51 -07:00
core Update GraphDef version to 2394. 2025-10-28 02:24:51 -07:00
distribute/experimental/rpc
docs_src
dtensor [xla] Migrate Tensorflow and XLA to xla::Future 2025-10-27 17:06:39 -07:00
examples
go Go: Update generated wrapper functions for TensorFlow ops. 2025-10-17 00:12:04 -07:00
java
js
lite If --use_xnnpack is specified, never use the default delegate in benchmark_tflite_model. 2025-10-28 07:09:35 -07:00
python compat: Update forward compatibility horizon to 2025-10-28 2025-10-28 02:15:51 -07:00
security
tools Update pip dependency reference from @pypi_XXX//:pkg to @pypi//XXX. 2025-10-27 07:21:22 -07:00
__init__.py
.clang-format
api_template_v1.__init__.py
api_template.__init__.py
BUILD
build_cleaner_spec.textproto
compat_template_v1.__init__.py
compat_template.__init__.py
opensource_only.files
py.default.bzl
pytype.default.bzl
strict.default.bzl
tensorflow.bzl
tensorflow.default.bzl
tf_exported_symbols.lds
tf_framework_version_script.lds
tf_private_symbols.lds
tf_version_script.lds
tf_version.bzl
tf_version.default.bzl
virtual_root_template_v1.__init__.py
virtual_root_template_v2.__init__.py
workspace1.bzl
workspace2.bzl Update XNNPACK in XLA 2025-10-27 13:13:02 -07:00
workspace3.bzl Simplify tf_vendored repo rule. 2025-10-02 00:42:00 -07:00
workspace0.bzl Remove linking libnvidia-ml.so from hermetic CUDA forward compatibility mode. 2025-10-16 10:28:04 -07:00