Skip to content

Commit 9e80fb0

Browse files
authored
Delete old TensorFlow Bazel code, docs, and flags. (#13437)
Follow-up to the work tracked on #13037.
1 parent 09fb0e6 commit 9e80fb0

File tree

14 files changed

+5
-843
lines changed

14 files changed

+5
-843
lines changed

.bazelignore

-3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,3 @@ third_party
1515

1616
# Ignore the bazel directories when this directory is used as a local repository.
1717
bazel-*
18-
19-
# integrations have separate WORKSPACE files
20-
integrations/

build_tools/bazel/iree.bazelrc

+3-35
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ build --experimental_guard_against_concurrent_changes
1313
# Default to optimized builds
1414
# Override via: "-c dbg" or --compilation_mode=dbg
1515
build --compilation_mode=opt
16-
# Used in TensorFlow, so we have to enable it here as well.
16+
# Legacy from when we depended on TensorFlow, might not be needed in IREE.
1717
common --experimental_repo_remote_exec
1818
# Actually printing output on errors is... a useful default
1919
test --test_output=errors
@@ -59,8 +59,6 @@ build:generic_gcc --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
5959
build:generic_gcc --copt=-Wno-unused-but-set-parameter
6060
build:generic_gcc --copt=-Wno-comment
6161
build:generic_gcc --copt=-Wno-attributes
62-
# NOTE: from a TF dep: external/upb/upb/upb.c and fails on GCC 10.
63-
build:generic_gcc --copt=-Wno-stringop-truncation
6462

6563
###############################################################################
6664
# Options for "generic_clang" builds: these options should generally apply to
@@ -159,12 +157,10 @@ build:generic_clang --linkopt=-Wl,--fatal-warnings
159157
###############################################################################
160158

161159
build:macos_clang --config=generic_clang
162-
build:macos_clang --per_file_copt=tensorflow,iree_tf_compiler@-Wno-unused-variable
163-
build:macos_clang --per_file_copt=tensorflow,iree_tf_compiler,utils@-Wno-range-loop-analysis
160+
build:macos_clang --per_file_copt=utils@-Wno-range-loop-analysis
164161

165162
build:macos_clang_release --config=macos_clang
166-
build:macos_clang_release --per_file_copt=tensorflow,iree_tf_compiler@-Wno-unused-variable
167-
build:macos_clang_release --per_file_copt=tensorflow,iree_tf_compiler,utils@-Wno-range-loop-analysis
163+
build:macos_clang_release --per_file_copt=utils@-Wno-range-loop-analysis
168164
build:macos_clang_release --compilation_mode=opt
169165
build:macos_clang_release --copt=-DNDEBUG
170166

@@ -277,7 +273,6 @@ build:remote_cache_bazel_ci --config=_remote_cache_base
277273
# included for clarity and so that this reference is automatically updated by
278274
# manage_images.py
279275
build:remote_cache_bazel_ci --host_platform_remote_properties_override='properties:{name:"cache-silo-key" value:"gcr.io/iree-oss/swiftshader-bleeding-edge@sha256:b3cce73eb9f41d67981bc8f00e98fd66fe3487caec1bcbf38d4039dcc61e499d"}'
280-
build:remote_cache_bazel_tf_ci --host_platform_remote_properties_override='properties:{name:"cache-silo-key" value:"gcr.io/iree-oss/frontends-swiftshader@sha256:da14cc93637d3bfad469a670d4d7a49982df5d107b775331965e3bacb981d4cf"}'
281276

282277

283278
###############################################################################
@@ -337,37 +332,10 @@ build:_msvc_base --per_file_copt=farmhash@/wd4319 # zero extending to T of great
337332
build:_msvc_base --linkopt=/IGNORE:4217 # mismatch import/export declspec
338333
build:_msvc_base --linkopt=/IGNORE:4001 # no object files
339334

340-
# Flags to make tensorflow build.
341-
# Some of these are also of general use and fine to enable globally for windows.
342-
build:_msvc_base --copt=/arch:AVX
343-
# TensorFlow requires the "monolithic" build mode for now on Windows.
344-
build:_msvc_base --define framework_shared_object=false
345-
346-
# Workaround WinGDI.h defining `ERROR`, which conflicts with logging macros.
347-
# Note that IREE and TensorFlow both `#undef ERROR` and define their own
348-
# separate logging constants with the same name, but IREE needs the Windows
349-
# "graphics device interface" (GDI) for certain GUI sample projects.
350-
build:_msvc_base --per_file_copt=tensorflow@-DNOGDI
351-
352-
# Disables TensorFlow eigen bloat and reduces compile times.
353-
build:_msvc_base --define=override_eigen_strong_inline=true
354-
355-
# Another TensorFlow flag from their config script.
356-
build:_msvc_base --define with_default_optimizations=true
357-
358335
# Separate configs for different MSVC versions as we might want slightly different options.
359336
build:msvc2017 --config=_msvc_base
360337
build:msvc2019 --config=_msvc_base
361338

362-
# TensorFlow builds depend on this flag, but it doesn't appear to work with
363-
# gmock in some of our unit tests, so only enable it for TensorFlow files.
364-
# MSVC (Windows): Standards-conformant preprocessor mode
365-
# See https://docs.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview
366-
build:msvc2017 --per_file_copt=tensorflow@/experimental:preprocessor
367-
# It's also called different things in different MSVC versions and will spam the logs
368-
# if we use the old name with a newer msvc.
369-
build:msvc2019 --per_file_copt=tensorflow@/Zc:preprocessor
370-
371339
# Assume the newer version and alias to --config=windows
372340
build:msvc --config=msvc2019
373341
build:windows --config=msvc

build_tools/benchmarks/comparisons/setup_desktop.sh

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ export CC=clang
5757
export CXX=clang++
5858
python3 configure_bazel.py
5959

60+
# TODO(mariecwhite): Use Python-based importers (no Bazel build)
6061
cd integrations/tensorflow
6162
bazel build -c opt --cxxopt="-Wno-deprecated-builtins" iree_tf_compiler:iree-import-tflite
6263
./symlink_binaries.sh

build_tools/benchmarks/comparisons/setup_mobile.sh

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export CC=clang
6969
export CXX=clang++
7070
python3 configure_bazel.py
7171

72+
# TODO(mariecwhite): Use Python-based importers (no Bazel build)
7273
cd integrations/tensorflow
7374
bazel build -c opt iree_tf_compiler:iree-import-tflite
7475
./symlink_binaries.sh

build_tools/buildkite/cmake/linux/pipeline.yml

-199
This file was deleted.

build_tools/cmake/build_linux_benchmark.sh

-91
This file was deleted.

0 commit comments

Comments
 (0)