任务:
我正在尝试使用 OpenCL 使用 bazel 构建 TensorFlow 库,以便在 GPU 上运行操作而不启用 Tensorflow 的 GPU(没有 CUDA/NVIDIA)。
基本上想借助 Android NDK 和内置的 opencl-tensorflow 库在移动 GPU 上运行)
采取的步骤:
将/home/ashok/.cache/bazel/_bazel_ashok/337a0d8d7fbaddcaa8098e349718a6d6/external 中的 eigen_archive 库替换为 https://bitbucket.org/benoitsteiner/eigen-opencl 的“eigen-opencl”库并使用 bazel 构建 TensorFlow。
面临的问题:“half”不是“Eigen”的成员
INFO: Found 1 target...
ERROR: /home/ashok/Ashok/tensorflow-1.0.1/tensorflow/core/BUILD:814:1: C++ compilation of rule '//tensorflow/core:android_tensorflow_lib_lite' failed (Exit 1)
In file included from ./tensorflow/core/framework/allocator.h:25:0,
from ./tensorflow/core/framework/op_kernel.h:22,
from ./tensorflow/core/util/guarded_philox_random.h:19,
from tensorflow/core/util/guarded_philox_random.cc:16:
./tensorflow/core/framework/type_traits.h:69:52: error: 'half' is not a member of 'Eigen'
std::is_trivial::value || std::is_same<T, Eigen::half>::value ||
^
./tensorflow/core/framework/type_traits.h:69:52: error: 'half' is not a member of 'Eigen'
./tensorflow/core/framework/type_traits.h:69:63: error: template argument 2 is invalid
std::is_trivial::value || std::is_same<T, Eigen::half>::value ||
^
Target //tensorflow/examples/android:tensorflow_demo failed to build
请帮忙解决问题
最佳答案
使用https://bitbucket.org/benoitsteiner/opencl而不是 https://bitbucket.org/benoitsteiner/eigen-opencl因为它是最新的存储库
关于c++ - 'half' 不是 'Eigen' 的成员,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45767353/