java - 如何编译支持GPU的tflite?

标签 java c++ delegates gpu tensorflow-lite

我尝试编译具有 GPU 支持的 Android tflite

bazel build --cxxopt='--std=c++11' -c opt --fat_apk_cpu=arm64-v8a //tensorflow/lite/java:tensorflowlite_gpu

但我收到一些错误消息,例如:

./tensorflow/lite/delegates/gpu/gl/gl_call.h:60:29: error: no viable conversion from returned value of type 'tflite::gpu::Status' to function return type 'int'
    if (status.ok()) return OkStatus();

我需要将任何其他命令行参数传递给 bazel 吗?

最佳答案

您需要-DMESA_EGL_NO_X11_HEADERS标志。请参阅https://github.com/tensorflow/tensorflow/issues/27320

关于java - 如何编译支持GPU的tflite?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59628878/

相关文章:

java - 内存不足错误: GC overhead limit exceeded android

android - 可以从 Android 应用程序调用它们的合法 linux 命令?

c++ - QML TreeView : How to get QModelIndex of childs

c# - 如何避免捕获变量?

ios - 如何在另一个选项卡的 View Controller 中为协议(protocol)设置委托(delegate)?

java - 如何下载创建的目录中的文件

java - jTable jquery 不删除数据库中的记录

java - 使用 Maven 打包资源文件和类的最佳实践

c++ - 如何在不指定维度的情况下用 Eigen 声明张量?

python - 委托(delegate)给 Python 中的 dict 类