Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with compiling Tensorflow #78

Open
rahasayantan opened this issue Nov 4, 2017 · 1 comment
Open

Issue with compiling Tensorflow #78

rahasayantan opened this issue Nov 4, 2017 · 1 comment

Comments

@rahasayantan
Copy link

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No

OS Platform and Distribution (e.g., Linux Ubuntu):14.04.3-->Trusty

TensorFlow installed from (source or binary):Source

TensorFlow version (use command below):1.0 (Steps-> Downloaded tensorflow from https://github.com/benoitsteiner/tensorflow-opencl, ./configure - to configure project)

Bazel version (if compiling from source):0.5.4

CUDA/cuDNN version:NA

OPENCL Version:
Number of platforms: 1
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 2.0 AMD-APP (1800.11)
Platform Name: AMD Accelerated Parallel Processing
Platform Vendor: Advanced Micro Devices, Inc.
Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices

GPU model and memory:
Platform Name: AMD Accelerated Parallel Processing
Number of devices: 2
Device Type: CL_DEVICE_TYPE_GPU
Board name: AMD Radeon (TM) R5 M335
Memory: 4096M

Exact command to reproduce:
run the python script -- ipython keras_code.py

** G++/GCC version**:
g++-4.8

I have compiled CPP programs, they work fine.

ComputeCPP: 0.3.4
-- ** Python**: I am using Anaconda distribution Python for 2.7.2. (Anaconda - 2.4.3)

Describe the problem:

I have tried installing as per the steps given in :
https://www.codeplay.com/portal/03-30-17-setting-up-tensorflow-with-opencl-using-sycl

I have cloned the following git Repo:
git clone https://github.com/benoitsteiner/tensorflow-opencl.git

Everything works fine till the compile step: I use the following command:
bazel build --local_resources 2048,.5,1.0 -c opt --config=sycl //tensorflow/tools/pip_package:build_pip_package

================

Error

ERROR: /home/sayantan/Downloads/tensorflow-opencl/tensorflow/core/kernels/BUILD:2512:1: C++ compilation of rule '//tensorflow/core/kernels:softmax_op' failed (Exit 1).
In file included from tensorflow/core/kernels/softmax_op.cc:20:
In file included from ./tensorflow/core/kernels/softmax_op.h:23:
In file included from ./third_party/eigen3/unsupported/Eigen/CXX11/Tensor:4:
In file included from external/eigen_archive/unsupported/Eigen/CXX11/Tensor:14:
In file included from external/eigen_archive/Eigen/Core:299:
In file included from external/local_config_sycl/crosstool/../sycl/include/SYCL/sycl.hpp:20:
In file included from external/local_config_sycl/crosstool/../sycl/include/SYCL/sycl_interface.h:54:
external/local_config_sycl/crosstool/../sycl/include/SYCL/multi_pointer.h:342:3: error: multiple overloads of 'global_ptr' instantiate to the same signature 'void (pointer_t)' (aka 'void (attribute((address_space(1))) float *)')
global_ptr(pointer_t ptr) : Base(ptr) {}
^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSyclExprConstructor.h:42:74: note: in instantiation of template class 'cl::sycl::global_ptr<attribute((address_space(1))) float>' requested here
EvalToLHSConstructor(const utility::tuple::Tuple<Params...> &t) : expr(ConvertToActualTypeSycl(typename Eigen::internal::remove_all::type, utility::tuple::get(t))) {}
^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorDeviceSycl.h:31:88: note: expanded from macro 'ConvertToActualTypeSycl'
#define ConvertToActualTypeSycl(Scalar, buf_acc) reinterpret_cast<typename cl::sycl::global_ptr::pointer_t>((&(*buf_acc.get_pointer())))
^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSyclExprConstructor.h:226:1: note: in instantiation of member function 'Eigen::TensorSycl::internal::EvalToLHSConstructor<attribute((address_space(1))) float *, 0, cl::sycl::accessor<unsigned char, 1, cl::sycl::access::mode::write, cl::sycl::access::target::global_buffer, cl::sycl::codeplay::access::placeholder::false_t>, cl::sycl::accessor<unsigned char, 1, cl::sycl::access::mode::read, cl::sycl::access::target::global_buffer, cl::sycl::codeplay::access::placeholder::false_t> >::EvalToLHSConstructor' requested here
EVALTO(const)
^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSyclExprConstructor.h:223:41: note: expanded from macro 'EVALTO'
: nestedExpression(funcD.xprExpr, t), buffer(t), expr(buffer.expr, nestedExpression.expr) {}
^
external/eigen_archive/unsupported/Eigen/CXX11/src/Tensor/TensorSyclExprConstructor.h:506:10: note: in instantiation of function template specialization 'Eigen::TensorSycl::internal::ExprConstructor<const Eigen::TensorEvalToOp<const Eigen::TensorReductionOp<Eigen::internal::MaxReducer, const Eigen::IndexList<Eigen::type2index<1>>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 1, long>, 16, MakeGlobalPointer>, MakeGlobalPointer>, MakeGlobalPointer>, const Eigen::TensorEvalToOp<const Eigen::TensorSycl::internal::PlaceHolder<const Eigen::TensorReductionOp<Eigen::internal::MaxReducer, const Eigen::IndexList<Eigen::type2index<1>>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 1, long>, 16, MakePointer>, MakePointer>, 1>, MakePointer>, cl::sycl::accessor<unsigned char, 1, cl::sycl::access::mode::write, cl::sycl::access::target::global_buffer, cl::sycl::codeplay::access::placeholder::false_t>, cl::sycl::accessor<unsigned char, 1, cl::sycl::access::mode::read, cl::sycl::access::target::global_buffer, cl::sycl::codeplay::access::placeholder::false_t> >::ExprConstructor<Eigen::TensorSycl::internal::FunctorExtractor<Eigen::TensorEvaluator<const Eigen::TensorEvalToOp<const Eigen::TensorReductionOp<Eigen::internal::MaxReducer, const Eigen::IndexList<Eigen::type2index<1>>, const Eigen::TensorMap<Eigen::Tensor<const float, 2, 1, long>, 16, MakePointer>, MakePointer>, MakePointer>, const Eigen::SyclDevice> > >' requested here
return ExprConstructor<OrigExpr, IndexExpr, Params...>(funcD, t);
.....

2 errors generated.
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3715.231s, Critical Path: 167.06s

Can you please help?

Thanks and regards
Sayantan Raha

@mirh
Copy link

mirh commented Dec 10, 2017

This has been specifically mentioned as fixed on official upstream.
Can you try it or this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants