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

lmbspecialops make error #61

Open
vivasvan1 opened this issue Dec 30, 2018 · 5 comments
Open

lmbspecialops make error #61

vivasvan1 opened this issue Dec 30, 2018 · 5 comments

Comments

@vivasvan1
Copy link

vivasvan1 commented Dec 30, 2018

i am using
cuda version 9.2
python 3.6
tensorflow 1.12.0

i have used -D BUILD_WITH_CUDA=OFF argument during cmake which gives warning:

CMake Warning:
  Manually-specified variables were not used by the project:

    BUILD_WITH_CUDA

Make gives this error!

Scanning dependencies of target lmbspecialops
[ 55%] Building CXX object lib/CMakeFiles/lmbspecialops.dir/decode_flo_op.cc.o
/content/demon/lmbspecialops/src/decode_flo_op.cc: In member function ‘virtual void DecodeFloOp::Compute(tensorflow::OpKernelContext*)’:
/content/demon/lmbspecialops/src/decode_flo_op.cc:65:15: error: ‘const StringPiece {aka const class absl::string_view}’ has no member named ‘starts_with’
     if (!data.starts_with("PIEH")) {
               ^~~~~~~~~~~
lib/CMakeFiles/lmbspecialops.dir/build.make:118: recipe for target 'lib/CMakeFiles/lmbspecialops.dir/decode_flo_op.cc.o' failed
make[2]: *** [lib/CMakeFiles/lmbspecialops.dir/decode_flo_op.cc.o] Error 1
CMakeFiles/Makefile2:95: recipe for target 'lib/CMakeFiles/lmbspecialops.dir/all' failed
make[1]: *** [lib/CMakeFiles/lmbspecialops.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

Can someone please explain what is this error?

@zhz218
Copy link
Collaborator

zhz218 commented Jan 8, 2019

lmbspecialops should compile with tensorflow 1.4.0. or maybe refer to https://github.com/lmb-freiburg/lmbspecialops/tree/amiranas-tensorflow-1.9-patch for patch fixing of later tensorflow version.

@liutao0913
Copy link

liutao0913 commented Aug 13, 2019

change if (!data.starts_with("PIEH")) to if (data.substr(0, 4) != StringPiece("PIEH"))

@andylai2
Copy link

andylai2 commented Feb 5, 2020

@liutao0913 's answer helped me fix the build errors. There are a few other places where the same substitution needs to be made.

@TheRustlessSummer
Copy link

@liutao0913 's answer helped me fix the build errors. There are a few other places where the same substitution needs to be made.

Hello, I am sorry to bother you. I have changed but there are still two errors like that:

In file included from /home/summer/anaconda3/lib/python3.6/site-packages/tensorflow/include/tensorflow/core/framework/attr_value_util.h:24:0,
from /home/summer/anaconda3/lib/python3.6/site-packages/tensorflow/include/tensorflow/core/framework/node_def_util.h:22,
from /home/summer/anaconda3/lib/python3.6/site-packages/tensorflow/include/tensorflow/core/framework/shape_inference.h:21,
from /home/summer/code/demon/lmbspecialops/src/decode_flo_op.cc:21:
/home/summer/anaconda3/lib/python3.6/site-packages/tensorflow/include/tensorflow/core/framework/tensor.h: In instantiation of ‘typename tensorflow::TTypes::ConstScalar tensorflow::Tensor::scalar() const [with T = std::basic_string; typename tensorflow::TTypes::ConstScalar = Eigen::TensorMap<Eigen::TensorFixedSize<const std::basic_string, Eigen::Sizes<>, 1, long int>, 16, Eigen::MakePointer>]’:
/home/summer/code/demon/lmbspecialops/src/decode_flo_op.cc:59:54: required from here
/home/summer/anaconda3/lib/python3.6/site-packages/tensorflow/include/tensorflow/core/framework/tensor.h:887:3: error: static assertion failed: std::string is no longer a scalar type, use tensorflow::tstring
static_assert(
^
lib/CMakeFiles/lmbspecialops.dir/build.make:6104: recipe for target 'lib/CMakeFiles/lmbspecialops.dir/decode_flo_op.cc.o' failed
make[2]: *** [lib/CMakeFiles/lmbspecialops.dir/decode_flo_op.cc.o] Error 1
CMakeFiles/Makefile2:127: recipe for target 'lib/CMakeFiles/lmbspecialops.dir/all' failed
make[1]: *** [lib/CMakeFiles/lmbspecialops.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2

@ghoshsuman
Copy link

@TheRustlessSummer Did you finally find a solution to your problem?

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

6 participants