Skip to content

TensorFlow integrations can only be built out-of-tree. #4195

Closed

Description

@phoenix-meadowlark

The CMake+Bazel TensorFlow integrations build introduced in a3e97f1 can only be built out-of-tree:

# Fails independently of ccache
cmake -G Ninja -B build/ \
  -DCMAKE_C_COMPILER=clang \
  -DCMAKE_CXX_COMPILER=clang++ \
  -DIREE_ENABLE_CCACHE=ON \
  -DLLVM_CCACHE_BUILD=ON \
  -DIREE_BUILD_TENSORFLOW_COMPILER=ON .
cd build/
ninja
INFO: Invocation ID: d083be51-7b4c-4c51-a71a-fb96d8bf7b4d
ERROR: infinite symlink expansion detected
[start of symlink chain]
/usr/local/google/home/meadowlark/dev/iree/build/bazel-out/external/iree_core
/usr/local/google/home/meadowlark/dev/iree
[end of symlink chain]
INFO: Repository com_google_protobuf instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule tf_http_archive defined at:
  /usr/local/google/home/meadowlark/dev/iree/build/bazel-out/external/org_tensorflow/third_party/repo.bzl:131:34: in <toplevel>
ERROR: /usr/local/google/home/meadowlark/dev/iree/integrations/tensorflow/compiler/BUILD:99:10: no such package '@llvm-project//mlir': no such package '@iree_core//': Could not access /usr/local/google/home/meadowlark/dev/iree/build/bazel-out/external/iree_core: Infinite symlink expansion and referenced by '//integrations/tensorflow/compiler:iree-tf-import'
ERROR: /usr/local/google/home/meadowlark/dev/iree/integrations/tensorflow/compiler/BUILD:99:10: no such package '@llvm-project//mlir': no such package '@iree_core//': Could not access /usr/local/google/home/meadowlark/dev/iree/build/bazel-out/external/iree_core: Infinite symlink expansion and referenced by '//integrations/tensorflow/compiler:iree-tf-import'
ERROR: /usr/local/google/home/meadowlark/dev/iree/integrations/tensorflow/compiler/BUILD:99:10: no such package '@llvm-project//mlir': no such package '@iree_core//': Could not access /usr/local/google/home/meadowlark/dev/iree/build/bazel-out/external/iree_core: Infinite symlink expansion and referenced by '//integrations/tensorflow/compiler:iree-tf-import'
ERROR: Analysis of target '//integrations/tensorflow/compiler:iree-tf-import' failed; build aborted: Analysis failed
INFO: Elapsed time: 6.754s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (15 packages loaded, 30 targets configured)
    currently loading: @org_tensorflow//tensorflow/core/platform ... (4 packages)
    Fetching @llvm-project; Restarting.
    Fetching @local_config_cc; Restarting.
    Fetching @local_config_cuda; fetching
    Fetching @local_config_tensorrt; Restarting.

Kokoro doesn't give you the permissions to build out-of-tree, so I've implemented a hacky workaround in the kokoro build script for the time being.

Activity

  1. added
    infrastructure
    integrations/tensorflow
    on Dec 11, 2020
  2. GMNGeoffrey commented on Jan 14, 2021

    @GMNGeoffrey
    Member

    Kokoro has nothing to do with it, really. Docker requires that you mount any filesystems you write to. We currently mount several directories (https://github.com/google/iree/blob/main/build_tools/kokoro/gcp_ubuntu/docker_common.sh). I think the most logical place to build would be $HOME/build which should work fine

  3. self-assigned this
    on Feb 12, 2021
  4. GMNGeoffrey commented on Feb 12, 2021

    @GMNGeoffrey
    Member

    I'll fix this as part of reworking our Bazel + CMake TF integrations setup

  5. GMNGeoffrey commented on Feb 26, 2021

    @GMNGeoffrey
    Member

    Fixed by #4836

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

infrastructureintegrations/tensorflow

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions