在 TFLite v2.3 for ARM64 中启用 XNNPack [英] Enable XNNPack in TFLite v2.3 for ARM64

查看:36
本文介绍了在 TFLite v2.3 for ARM64 中启用 XNNPack的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TFLite 团队最近宣布在 TF v2.3 中支持 XNNPack (https://blog.tensorflow.org/2020/07/accelerating-tensorflow-lite-xnnpack-integration.html).这应该会为 ARM v8 内核上的浮点运算提供一些令人印象深刻的加速.

The TFLite team recently announced XNNPack support in TF v2.3 (https://blog.tensorflow.org/2020/07/accelerating-tensorflow-lite-xnnpack-integration.html). This should provide some pretty impressive speedups on float operations on ARM v8 cores.

有谁知道如何为 ARM64 版本的 TFLite 启用 XNNPack?特别是基准测试应用程序将是在目标硬件上测试此新功能的好地方.通过在编译时向 Bazel 传递标志来启用 iOS 和 Android 支持.不幸的是,没有给出为 ARM64 板构建的指南.构建说明(见下文)不提供任何更新的指导,并且检查 download_dependencies.sh 不会显示从任何地方下载 XNNPack.

Does anyone know how to enable XNNPack for ARM64 builds of TFLite? The benchmarking application in particular would be a good place to test out this new functionality on target hardware. iOS and Android support is enabled by passing a flag to Bazel when compiling. Unfortunately, no guidance is given for building for ARM64 boards. The build instructions (see below) don't provide any updated guidance, and inspecting download_dependencies.sh doesn't show XNNPack being downloaded from anywhere.

https://www.tensorflow.org/lite/guide/build_arm64

推荐答案

XNNPACK 尚不支持通过基于 Makefile 的构建.我们最近添加了对 ARM64 交叉编译的实验性支持(通过 --config=elinux_aarch64bazel build 命令中),这应该允许构建时选择加入XNNPACK 通过在构建命令中添加 --define tflite_with_xnnpack=true .期待在下一个 TF 2.4 版本中对交叉编译到 ARM64 的文档进行一些改进,我们还将研究在默认​​情况下为尽可能多的平台启用 XNNPACK.

XNNPACK is not yet supported via Makefile-based builds. We have recently added experimental support for cross-compilation to ARM64 (via --config=elinux_aarch64 in the bazel build command), which should allow build-time opt-in to XNNPACK by also adding --define tflite_with_xnnpack=true in your build command. Expect some improvements in documentation for cross-compilation to ARM64 in the next TF 2.4 release, where we'll also be looking into enabling XNNPACK by default for as many platforms as possible.

这篇关于在 TFLite v2.3 for ARM64 中启用 XNNPack的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆