【发布时间】:2017-06-12 02:21:44
【问题描述】:
我按照https://www.codeplay.com/portal/03-30-17-setting-up-tensorflow-with-opencl-using-sycl 在 Ubuntu 16.04 / AMD RX480 上使用 SYCL 设置了 TensorFlow,并且由于 fglrx 版本冲突而跳过了安装 AMD OpenCL 标头。
那么,失败的时候:
- 要么运行: $ bazel test --config=sycl -k --test_timeout 1600 -- //tensorflow/... -//tensorflow/contrib/... -//tensorflow/java/... -//tensorflow/compiler/...
返回: /home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/bazel-out/local_linux-opt/testlogs/tensorflow/go/test/test.log
Executed 1 out of 634 tests: 84 tests pass, 549 fail to build and 1 fails locally.
There were tests whose specified size is too big. Use the --test_verbose_timeout_warnings command line option to see which ones these are.
test.log 显示的位置:
[[ ! -x go ]]
[[ -x /usr/local/go/bin/go ]]
export
PATH=.:/home/opt/anaconda2/envs/sycl/bin:/home/opt/anaconda2/bin:/home/opt/OpenSource/torch/install/bin:/home/opt/OpenSource/torch/install/bin:/home/ai/bin:/home/ai/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/usr/local/go/bin
PATH=.:/home/opt/anaconda2/envs/sycl/bin:/home/opt/anaconda2/bin:/home/opt/OpenSource/torch/install/bin:/home/opt/OpenSource/torch/install/bin:/home/ai/bin:/home/ai/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/usr/local/go/bin
export
GOPATH=/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/_tmp/3e13e1018d21b8204dd1d98027854067/go
GOPATH=/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/_tmp/3e13e1018d21b8204dd1d98027854067/go
mkdir -p
/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/_tmp/3e13e1018d21b8204dd1d98027854067/go/src/github.com/tensorflow
ln -s
/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/bazel-out/local_linux-opt/bin/tensorflow/go/test.runfiles/org_tensorflow
/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/_tmp/3e13e1018d21b8204dd1d98027854067/go/src/github.com/tensorflow/tensorflow
export
LIBRARY_PATH=/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/bazel-out/local_linux-opt/bin/tensorflow/go/test.runfiles/org_tensorflow/tensorflow
LIBRARY_PATH=/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/bazel-out/local_linux-opt/bin/tensorflow/go/test.runfiles/org_tensorflow/tensorflow
++ uname -s
OS=Linux
[[ Linux = \L\i\n\u\x ]]
[[ -z
/usr/local/computecpp/lib:/home/opt/OpenSource/torch/install/lib:/home/opt/OpenSource/torch/install/lib:
]]
export
LD_LIBRARY_PATH=/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/bazel-out/local_linux-opt/bin/tensorflow/go/test.runfiles/org_tensorflow/tensorflow:/usr/local/computecpp/lib:/home/opt/OpenSource/torch/install/lib:/home/opt/OpenSource/torch/install/lib:
LD_LIBRARY_PATH=/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/bazel-out/local_linux-opt/bin/tensorflow/go/test.runfiles/org_tensorflow/tensorflow:/usr/local/computecpp/lib:/home/opt/OpenSource/torch/install/lib:/home/opt/OpenSource/torch/install/lib:
++ go version
echo 'Go version: go version go1.7.4 linux/amd64'
Go version: go version go1.7.4 linux/amd64
go test github.com/tensorflow/tensorflow/tensorflow/go
github.com/tensorflow/tensorflow/tensorflow/go/op
github.com/tensorflow/tensorflow/tensorflow/go
/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/bazel-out/local_linux-opt/bin/tensorflow/go/test.runfiles/org_tensorflow/tensorflow/libtensorflow.so: undefined reference to cl::sycl::program::create_program_for_kernel_impl(std::string, unsigned char const*, int, char const* const*, std::shared_ptr<cl::sycl::detail::context>)
/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/bazel-out/local_linux-opt/bin/tensorflow/go/test.runfiles/org_tensorflow/tensorflow/libtensorflow.so: undefined reference to cl::sycl::program::get_kernel_impl(std::string)
const
collect2: error: ld returned 1 exit status # github.com/tensorflow/tensorflow/tensorflow/go
/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/bazel-out/local_linux-opt/bin/tensorflow/go/test.runfiles/org_tensorflow/tensorflow/libtensorflow.so: undefined reference to cl::sycl::program::create_program_for_kernel_impl(std::string, unsigned char const*, int, char const* const*, std::shared_ptr<cl::sycl::detail::context>)
/home/ai/.cache/bazel/_bazel_ai/03759b09788dc48db1c2f1f857f3711b/execroot/tensorflow-opencl/bazel-out/local_linux-opt/bin/tensorflow/go/test.runfiles/org_tensorflow/tensorflow/libtensorflow.so: undefined reference to cl::sycl::program::get_kernel_impl(std::string)
const
collect2: error: ld returned 1 exit status
FAIL github.com/tensorflow/tensorflow/tensorflow/go [build failed]
FAIL github.com/tensorflow/tensorflow/tensorflow/go/op [build failed]
- 或运行:$ bazel build --local_resources 2048,.5,1.0 -c opt --config=sycl //tensorflow/tools/pip_package:build_pip_package
返回:
/home/opt/OpenSource/TensorFlow/tensorflow-opencl/tensorflow/compiler/xla/service/BUILD:108:1: C++ compilation of rule '//tensorflow/compiler/xla/service:versioned_computation_handle' failed: computecpp failed: error executing command external/local_config_sycl/crosstool/computecpp -Wall -msse3 -g0 -O2 -DNDEBUG '-std=c++11' -MD -MF ... (remaining 103 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from
tensorflow/compiler/xla/service/versioned_computation_handle.cc:16:0:
./tensorflow/compiler/xla/service/versioned_computation_handle.h:33:19: error:
expected type-specifier before 'int64'
using Version = int64;
./tensorflow/compiler/xla/service/versioned_computation_handle.h:36:3:
error: Version does not name a type
Version version;
./tensorflow/compiler/xla/service/versioned_computation_handle.h:38:3:
error: string does not name a type
string ToString() const;
./tensorflow/compiler/xla/service/versioned_computation_handle.h: In member function bool xla::VersionedComputationHandle::operator==(const
xla::VersionedComputationHandle&) const:
./tensorflow/compiler/xla/service/versioned_computation_handle.h:41:13: error:
version was not declared in this scope
(version == other.version);
./tensorflow/compiler/xla/service/versioned_computation_handle.h:41:30: error:
const struct xla::VersionedComputationHandle has no member named version
(version == other.version);
./tensorflow/compiler/xla/service/versioned_computation_handle.h: In member function bool xla::VersionedComputationHandle::operator<(const
xla::VersionedComputationHandle&) cons':
./tensorflow/compiler/xla/service/versioned_computation_handle.h:46:15: error:
version was not declared in this scope
(version < other.version)));
./tensorflow/compiler/xla/service/versioned_computation_handle.h:46:31: error:
'const struct xla::VersionedComputationHandle' has no member named version
(version < other.version)));
tensorflow/compiler/xla/service/versioned_computation_handle.cc: At global scope:
tensorflow/compiler/xla/service/versioned_computation_handle.cc:22:1:
error: string does not name a type
string VersionedComputationHandle::ToString() const {
tensorflow/compiler/xla/service/versioned_computation_handle.cc: In function std::ostream& xla::operator<<(std::ostream&, const
xla::VersionedComputationHandle&):
tensorflow/compiler/xla/service/versioned_computation_handle.cc:28:27:
error: const struct xla::VersionedComputationHandle has no member named ToString out << versioned_handle.ToString();
此外,根据 computecpp_info,我的 CPU 和 GPU 在 ComputeCPP 看来似乎“未经测试”。
【问题讨论】:
-
目前你需要使用带有 AMD 硬件的 Ubuntu 14.04 和这个。你在哪个分支工作?如果没有 sycl 选项,构建是否可以工作?另外,您使用的是什么版本的 ComputeCpp? computecpp_info 工具显示什么?
标签: tensorflow opencl ubuntu-16.04