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

Dependency declaration issue in mpi.so build #8

Open
aburden5 opened this issue May 5, 2017 · 1 comment
Open

Dependency declaration issue in mpi.so build #8

aburden5 opened this issue May 5, 2017 · 1 comment

Comments

@aburden5
Copy link

aburden5 commented May 5, 2017

Hi, I am new to bazel, attempting to build TensorFlow-AllReduce w/o CUDA from source.

(git rev-parse HEAD: 44302f0)

I am using Bazel 0.4.5, but have also gotten same error when using 0.4.3.
I am in RHEL 4.8.5-4.

when I try "bazel build -c opt :mpi.so" I get the following error:

ERROR: /home_nfs/aburdenx/apps/tensorflow-allreduce/tensorflow/contrib/mpi/BUILD:13:1: undeclared inclusion(s) in rule '//tensorflow/contrib/mpi:mpi.so':
this rule is missing dependency declarations for the following files included by 'tensorflow/contrib/mpi/mpi_ops.cc':
'/home_nfs/aburdenx/apps/tensorflow-allreduce/tensorflow/stream_executor/lib/statusor.h'
'/home_nfs/aburdenx/apps/tensorflow-allreduce/tensorflow/stream_executor/platform/port.h'
'/home_nfs/aburdenx/apps/tensorflow-allreduce/tensorflow/stream_executor/lib/error.h'
'/home_nfs/aburdenx/apps/tensorflow-allreduce/tensorflow/stream_executor/lib/status.h'
'/home_nfs/aburdenx/apps/tensorflow-allreduce/tensorflow/stream_executor/platform/logging.h'.

I have tried several fixes, but am not having any success, including:

-> Tried adding a dependency declaration in tensorflow-allreduce/tensorflow/contrib/mpi/BUILD, as follows:

tf_custom_op_library(
name = "mpi.so",
srcs = ["mpi_ops.cc", "ring.cc", "ring.h"],
gpu_srcs = ["ring.cu.cc", "ring.h"],
deps = [
"//third_party/mpi:mpi",
":mpi_message_proto_cc",
"//tensorflow/stream_executor:stream_executor",
],
)

but I get this error:

tensorflow/stream_executor:stream_executor cannot depend on tensorflow/core:lib.

-> Tried adding --copt="-Itensorflow/stream_executor/lib" to bazel build with no luck

The "undeclared inclusion(s)" error seems to crop up mostly in CUDA builds due to missing path to cuda include dir, but this is clearly different issue that I haven't seen solutions for.

I will greatly appreciate any help moving forward.

Thanks!

@rhdong
Copy link

rhdong commented Aug 12, 2017

Maybe ,you should remove the "tensorflow/stream_executor:stream_executor" and add "--config=cuda" to your bazeel build opt.:
bazel build -c opt --config=cuda tensorflow/tools/pip_package:build_pip_package

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