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

make native bazel build work on Apple Silicon #47594

Merged

Conversation

freedomtan
Copy link
Contributor

make bazel --config opt //tensorflow/tools/pip_package:build_pip_package work

  1. include AArch64 stuff for XLA
  2. don't build mkl_dnn

With recent bazel arm64 binary (tested with [1]), it's possible to build pip wheel.
Previously, you need x86_64 bazel, see #45404.

[1] bazelbuild/bazel@492829

make `bazel --config opt //tensorflow/tools/pip_package:build_pip_package` work
1. include AArch64 stuff for XLA
2. don't build mkl_dnn
@google-ml-butler google-ml-butler bot added the size:XS CL Change Size: Extra Small label Mar 5, 2021
@google-cla google-cla bot added the cla: yes label Mar 5, 2021
@simonmaurer
Copy link
Contributor

simonmaurer commented Mar 5, 2021

@freedomtan very nice.
verifying this by building bazel(arm64) on M1 host (latest master branch) using:

bazel build -c opt --cpu=darwin-arm64 --apple_platform_type=macos //src:bazel

as a test, I tried with bazel-3.7.1-darwin-arm64 first using:

bazel-3.7.1-darwin-arm64 --config opt //tensorflow/tools/pip_package:build_pip_package
bazel-3.7.1-darwin-arm64 --config opt --config=macos_arm64 //tensorflow/tools/pip_package:build_pip_package

both resulted in same errors. reporting back once I can try again with the latest master of bazel you mentioned

@freedomtan
Copy link
Contributor Author

@simonmaurer As far as I can tell, neither 3.7.x nor 4.0 arm64 bazel works. That's why I went for bazel master branch. Hopefully, 4.1.0 or 4.0.x will work.

@simonmaurer
Copy link
Contributor

simonmaurer commented Mar 6, 2021

@freedomtan so I can confirm that as of bazel #4928295 it is possible to build the pip package on a M1 host.

bazel- --config opt //tensorflow/tools/pip_package:build_pip_package

doing some tests with python3 now.
the build files are not correctly named yet using:

./bazel-bin/tensorflow/tools/pip_package/build_pip_package --nightly_flag /tmp/tensorflow_pkg

build/bdist.macosx-10.14.6-arm64/wheel/tensorflow/*
where it should be build/bdist.macosx-11.0-arm64/wheel/tensorflow/*

but the resulting wheel is correctly named tensorflow-2.5.0-cp38-cp38-macosx_11_0_arm64.whl.
installing it with:

pip3 install -U /tmp/tensorflow_pkg/tensorflow-2.5.0-cp38-cp38-macosx_11_0_arm64.whl

resulted in errors mainly due to grpcio, h5py and numpy (the other dependant packages are available through pip3) :
ERROR: Could not find a version that satisfies the requirement h5py~=3.1.0 (from tf-nightly) ERROR: No matching distribution found for h5py~=3.1.0

could we rely on installing the dependant packages manually ?

pip3 install -U /tmp/tensorflow_pkg/tensorflow-2.5.0-cp38-cp38-macosx_11_0_arm64.whl --no-dependencies

@simonmaurer
Copy link
Contributor

simonmaurer commented Mar 6, 2021

@freedomtan did you manage to install it properly using pip3? what package versions did you use?
for now I got it working by manually installing binaries grpcio/h5py from the tensorflow_macos download script

super nice. no errors with respect to XLA (Symbol not found: _LLVMInitializeAArch64AsmPrinter) when doing the import tensorflow as tf statement in python ;) check comments jax#5501/tensorflow#45404

@freedomtan
Copy link
Contributor Author

freedomtan commented Mar 7, 2021

@simonmaurer my environ:

  1. python3 venv with python3 from Xcode command line tools
  2. macports for many open source components

As you said the package seems to be properly named as tensorflow-2.5.0-cp38-cp38-macosx_11_0_arm64.whl.

I have to install many dependencies when installing the pip wheel. And yes, I have to "manually" build grpcio (because of zlib and openssl) and h5py (because of macport's paths), which I learned how to do when I installed #45404 based package before.

@gbaned gbaned self-assigned this Mar 8, 2021
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Mar 8, 2021
@gbaned
Copy link
Contributor

gbaned commented Mar 19, 2021

@freedomtan Can you please resolve conflicts? Thanks!

@gbaned gbaned added the stat:awaiting response Status - Awaiting response from author label Mar 19, 2021
@freedomtan
Copy link
Contributor Author

@gbaned done. Thanks for reminding.

@gbaned gbaned removed the stat:awaiting response Status - Awaiting response from author label Mar 21, 2021
PR Queue automation moved this from Assigned Reviewer to Approved by Reviewer Mar 21, 2021
@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Mar 21, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Mar 21, 2021
@byronyi
Copy link
Contributor

byronyi commented Mar 21, 2021

@freedomtan Have you tried the latest TF master with your merge to HEAD? It complains about

DEBUG: Repository io_bazel_rules_docker instantiated at:
  /Users/byronyi/Develop/tensorflow/WORKSPACE:23:14: in <toplevel>
  /Users/byronyi/Develop/tensorflow/tensorflow/workspace0.bzl:105:34: in workspace
  /private/var/tmp/_bazel_byronyi/3c78a9a34f8036289e063b4c27e13075/external/bazel_toolchains/repositories/repositories.bzl:37:23: in repositories
Repository rule git_repository defined at:
  /private/var/tmp/_bazel_byronyi/3c78a9a34f8036289e063b4c27e13075/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
ERROR: /private/var/tmp/_bazel_byronyi/3c78a9a34f8036289e063b4c27e13075/external/local_config_cc/BUILD:48:19: in cc_toolchain_suite rule @local_config_cc//:toolchain: cc_toolchain_suite '@local_config_cc//:toolchain' does not contain a toolchain for cpu 'darwin_arm64'
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: Analysis of target '@local_config_cc//:toolchain' failed

Using your original branch based on 184cf2d works (but it has other issues I probably haven't figured out). Perhaps @chsigg changed .bazelrc and other configs during this time and broke your patch? c0b4a3a looks suspicious, but it could be other ones, too.

cc @mihaimaruseac I just test on my M1 and it doesn't work on HEAD.

@chsigg
Copy link
Contributor

chsigg commented Mar 21, 2021

I'm not sure which build command you expect to work and a full log with --announce_rc would help.

I would have expected you would like to build with --config=macos_arm64. I removed the --noenable_platform_specific_config + --config=macos combo (the former prevents the implicit --config=macos assuming bazel on M1 still detects the host system as macos, the second one adds it explicitly) triggered by --config=macos_arm64 assuming it's a no-op.

It seems like some of you are building with just --cpu=darwin_arm64, which should be equivalent now.

The best way to tell what makes the difference is to build with --announce_rc and compare the working and broken state.

@freedomtan freedomtan marked this pull request as draft March 21, 2021 23:02
@freedomtan
Copy link
Contributor Author

@byronyi and @chsigg thanks, I'll check against HEAD to see how to make it work.

@byronyi
Copy link
Contributor

byronyi commented Mar 21, 2021

@freedomtan mind to share the Bazel build procedure for you to get bazelbuild/bazel@492829? I am trying to build from HEAD but it doesn't work.

@freedomtan
Copy link
Contributor Author

freedomtan commented Mar 22, 2021

@byronyi for bazelbuild/bazel@492829

  1. git clone and checkout it
  2. with bazel-3.7.2-arm64 I built previously, bazel-3.7.2-arm64 build //src/bazel and wait a couple minutes, then there is bazel-bin/src/bazel
  3. with that binary, I was able to build a working tf pip wheel package from tf master about 2 weeks ago by ${BAZEL_SRC}/bazel-bin/src/bazel --config opt //tensorflow/tools/pip_package:build_pip_package

@freedomtan freedomtan marked this pull request as ready for review March 22, 2021 02:58
@freedomtan
Copy link
Contributor Author

@byronyi FYI. I could build (bazel clean --expunge; bazel --config opt //tensorflow/tools/pip_package:build_pip_package) recent tf master (8077fe8) with bazelbuild/bazel@492829.

@byronyi
Copy link
Contributor

byronyi commented Mar 22, 2021

@byronyi FYI. I could build (bazel clean --expunge; bazel --config opt //tensorflow/tools/pip_package:build_pip_package) recent tf master (8077fe8) with bazelbuild/bazel@492829.

@freedomtan Mind to share the output of bazel query --output=build @local_config_cc_toolchains//:all?

Mine is

$ bazel query --output=build  @local_config_cc_toolchains//:all
# /private/var/tmp/_bazel_byronyi/3c78a9a34f8036289e063b4c27e13075/external/local_config_cc_toolchains/BUILD:3:10
toolchain(
  name = "cc-toolchain-darwin",
  exec_compatible_with = ["@platforms//cpu:aarch64", "@platforms//os:osx"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//cpu:aarch64", "@platforms//os:osx"],
  toolchain = "@local_config_cc//:cc-compiler-darwin",
)
# Rule cc-toolchain-darwin instantiated at (most recent call last):
#   /private/var/tmp/_bazel_byronyi/3c78a9a34f8036289e063b4c27e13075/external/local_config_cc_toolchains/BUILD:3:10 in <toplevel>

# /private/var/tmp/_bazel_byronyi/3c78a9a34f8036289e063b4c27e13075/external/local_config_cc_toolchains/BUILD:11:10
toolchain(
  name = "cc-toolchain-armeabi-v7a",
  exec_compatible_with = ["@platforms//cpu:aarch64", "@platforms//os:osx"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//cpu:arm", "@platforms//os:android"],
  toolchain = "@local_config_cc//:cc-compiler-armeabi-v7a",
)
# Rule cc-toolchain-armeabi-v7a instantiated at (most recent call last):
#   /private/var/tmp/_bazel_byronyi/3c78a9a34f8036289e063b4c27e13075/external/local_config_cc_toolchains/BUILD:11:10 in <toplevel>

@byronyi
Copy link
Contributor

byronyi commented Mar 22, 2021

I probably need to install full Xcode instead of the Xcode command line tools...

@freedomtan
Copy link
Contributor Author

Yes, please check your environment. It seems bazel could not find your toolchain.

$ bazel query --output=build  @local_config_cc_toolchains//:all
DEBUG: /Users/freedom/work/tensorflow/tensorflow/version_check.bzl:42:14: 
Current Bazel is not a release version, cannot check for compatibility.
DEBUG: /Users/freedom/work/tensorflow/tensorflow/version_check.bzl:43:14: Make sure that you are running at least Bazel 1.0.0.
# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-armeabi-v7a-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-armeabi-v7a",
)
# Rule cc-toolchain-armeabi-v7a-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-armeabi-v7a-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-armeabi-v7a",
)
# Rule cc-toolchain-armeabi-v7a-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_arm64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_arm64",
)
# Rule cc-toolchain-darwin_arm64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_arm64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_arm64",
)
# Rule cc-toolchain-darwin_arm64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_arm64e-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_arm64e",
)
# Rule cc-toolchain-darwin_arm64e-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_arm64e-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_arm64e",
)
# Rule cc-toolchain-darwin_arm64e-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_x86_64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_x86_64",
)
# Rule cc-toolchain-darwin_x86_64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-darwin_x86_64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-darwin_x86_64",
)
# Rule cc-toolchain-darwin_x86_64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_arm64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_arm64",
)
# Rule cc-toolchain-ios_arm64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_arm64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_arm64",
)
# Rule cc-toolchain-ios_arm64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_arm64e-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_arm64e",
)
# Rule cc-toolchain-ios_arm64e-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_arm64e-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_arm64e",
)
# Rule cc-toolchain-ios_arm64e-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_armv7-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-ios_armv7",
)
# Rule cc-toolchain-ios_armv7-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_armv7-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-ios_armv7",
)
# Rule cc-toolchain-ios_armv7-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_i386-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_32"],
  toolchain = "@local_config_cc//:cc-compiler-ios_i386",
)
# Rule cc-toolchain-ios_i386-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_i386-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_32"],
  toolchain = "@local_config_cc//:cc-compiler-ios_i386",
)
# Rule cc-toolchain-ios_i386-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_x86_64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_x86_64",
)
# Rule cc-toolchain-ios_x86_64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-ios_x86_64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-ios_x86_64",
)
# Rule cc-toolchain-ios_x86_64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-tvos_arm64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-tvos_arm64",
)
# Rule cc-toolchain-tvos_arm64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-tvos_arm64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-tvos_arm64",
)
# Rule cc-toolchain-tvos_arm64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-tvos_x86_64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-tvos_x86_64",
)
# Rule cc-toolchain-tvos_x86_64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-tvos_x86_64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-tvos_x86_64",
)
# Rule cc-toolchain-tvos_x86_64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_arm64_32-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_arm64_32",
)
# Rule cc-toolchain-watchos_arm64_32-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_arm64_32-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:aarch64"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_arm64_32",
)
# Rule cc-toolchain-watchos_arm64_32-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_armv7k-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_armv7k",
)
# Rule cc-toolchain-watchos_armv7k-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_armv7k-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:arm"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_armv7k",
)
# Rule cc-toolchain-watchos_armv7k-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_i386-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_32"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_i386",
)
# Rule cc-toolchain-watchos_i386-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_i386-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_32"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_i386",
)
# Rule cc-toolchain-watchos_i386-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_x86_64-aarch64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:aarch64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_x86_64",
)
# Rule cc-toolchain-watchos_x86_64-aarch64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>

# /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14
toolchain(
  name = "cc-toolchain-watchos_x86_64-x86_64",
  exec_compatible_with = ["@platforms//os:osx", "@platforms//cpu:x86_64"],
  toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
  target_compatible_with = ["@platforms//os:ios", "@platforms//cpu:x86_64"],
  toolchain = "@local_config_cc//:cc-compiler-watchos_x86_64",
)
# Rule cc-toolchain-watchos_x86_64-x86_64 instantiated at (most recent call last):
#   /private/var/tmp/_bazel_freedom/4bb57b4ef1c881b777de0d15fb3c5032/external/local_config_cc_toolchains/BUILD:11:14 in <toplevel>
...

@byronyi
Copy link
Contributor

byronyi commented Mar 22, 2021

Confirmed that could be built with latest Bazel and TF HEAD.

NIT: Seeing multiple machine failures as clang eats all my memory and macOS doing extensive swaps when building with MAX_JOBS=8 on M1 (my Mac has only 8GB RAM /sad).

@copybara-service copybara-service bot merged commit ca4c4a1 into tensorflow:master Mar 24, 2021
PR Queue automation moved this from Approved by Reviewer to Merged Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes ready to pull PR ready for merge process size:XS CL Change Size: Extra Small
Projects
PR Queue
  
Merged
Development

Successfully merging this pull request may close these issues.

None yet

7 participants