Skip to content

Commit

Permalink
Delete old TensorFlow Bazel code, docs, and flags. (iree-org#13437)
Browse files Browse the repository at this point in the history
Follow-up to the work tracked on
iree-org#13037.
  • Loading branch information
ScottTodd authored May 10, 2023
1 parent 09fb0e6 commit 9e80fb0
Show file tree
Hide file tree
Showing 14 changed files with 5 additions and 843 deletions.
3 changes: 0 additions & 3 deletions .bazelignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,3 @@ third_party

# Ignore the bazel directories when this directory is used as a local repository.
bazel-*

# integrations have separate WORKSPACE files
integrations/
38 changes: 3 additions & 35 deletions build_tools/bazel/iree.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ build --experimental_guard_against_concurrent_changes
# Default to optimized builds
# Override via: "-c dbg" or --compilation_mode=dbg
build --compilation_mode=opt
# Used in TensorFlow, so we have to enable it here as well.
# Legacy from when we depended on TensorFlow, might not be needed in IREE.
common --experimental_repo_remote_exec
# Actually printing output on errors is... a useful default
test --test_output=errors
Expand Down Expand Up @@ -59,8 +59,6 @@ build:generic_gcc --cxxopt=-std=c++17 --host_cxxopt=-std=c++17
build:generic_gcc --copt=-Wno-unused-but-set-parameter
build:generic_gcc --copt=-Wno-comment
build:generic_gcc --copt=-Wno-attributes
# NOTE: from a TF dep: external/upb/upb/upb.c and fails on GCC 10.
build:generic_gcc --copt=-Wno-stringop-truncation

###############################################################################
# Options for "generic_clang" builds: these options should generally apply to
Expand Down Expand Up @@ -159,12 +157,10 @@ build:generic_clang --linkopt=-Wl,--fatal-warnings
###############################################################################

build:macos_clang --config=generic_clang
build:macos_clang --per_file_copt=tensorflow,iree_tf_compiler@-Wno-unused-variable
build:macos_clang --per_file_copt=tensorflow,iree_tf_compiler,utils@-Wno-range-loop-analysis
build:macos_clang --per_file_copt=utils@-Wno-range-loop-analysis

build:macos_clang_release --config=macos_clang
build:macos_clang_release --per_file_copt=tensorflow,iree_tf_compiler@-Wno-unused-variable
build:macos_clang_release --per_file_copt=tensorflow,iree_tf_compiler,utils@-Wno-range-loop-analysis
build:macos_clang_release --per_file_copt=utils@-Wno-range-loop-analysis
build:macos_clang_release --compilation_mode=opt
build:macos_clang_release --copt=-DNDEBUG

Expand Down Expand Up @@ -277,7 +273,6 @@ build:remote_cache_bazel_ci --config=_remote_cache_base
# included for clarity and so that this reference is automatically updated by
# manage_images.py
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"}'
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"}'


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

# Flags to make tensorflow build.
# Some of these are also of general use and fine to enable globally for windows.
build:_msvc_base --copt=/arch:AVX
# TensorFlow requires the "monolithic" build mode for now on Windows.
build:_msvc_base --define framework_shared_object=false

# Workaround WinGDI.h defining `ERROR`, which conflicts with logging macros.
# Note that IREE and TensorFlow both `#undef ERROR` and define their own
# separate logging constants with the same name, but IREE needs the Windows
# "graphics device interface" (GDI) for certain GUI sample projects.
build:_msvc_base --per_file_copt=tensorflow@-DNOGDI

# Disables TensorFlow eigen bloat and reduces compile times.
build:_msvc_base --define=override_eigen_strong_inline=true

# Another TensorFlow flag from their config script.
build:_msvc_base --define with_default_optimizations=true

# Separate configs for different MSVC versions as we might want slightly different options.
build:msvc2017 --config=_msvc_base
build:msvc2019 --config=_msvc_base

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

# Assume the newer version and alias to --config=windows
build:msvc --config=msvc2019
build:windows --config=msvc
1 change: 1 addition & 0 deletions build_tools/benchmarks/comparisons/setup_desktop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export CC=clang
export CXX=clang++
python3 configure_bazel.py

# TODO(mariecwhite): Use Python-based importers (no Bazel build)
cd integrations/tensorflow
bazel build -c opt --cxxopt="-Wno-deprecated-builtins" iree_tf_compiler:iree-import-tflite
./symlink_binaries.sh
Expand Down
1 change: 1 addition & 0 deletions build_tools/benchmarks/comparisons/setup_mobile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export CC=clang
export CXX=clang++
python3 configure_bazel.py

# TODO(mariecwhite): Use Python-based importers (no Bazel build)
cd integrations/tensorflow
bazel build -c opt iree_tf_compiler:iree-import-tflite
./symlink_binaries.sh
Expand Down
199 changes: 0 additions & 199 deletions build_tools/buildkite/cmake/linux/pipeline.yml

This file was deleted.

91 changes: 0 additions & 91 deletions build_tools/cmake/build_linux_benchmark.sh

This file was deleted.

Loading

0 comments on commit 9e80fb0

Please sign in to comment.