Spaces:
Running
Running
| # LiteRT Bazel configuration file. | |
| # This file tries to group and simplify build options for LiteRT | |
| # | |
| # ----CONFIG OPTIONS---- | |
| # Android options: | |
| # android: | |
| # android_arm: | |
| # android_arm64: | |
| # android_x86: | |
| # android_x86_64: | |
| # | |
| # iOS options: | |
| # ios: | |
| # ios_armv7: | |
| # ios_arm64: | |
| # ios_x86_64: | |
| # ios_fat: | |
| # | |
| # Macosx options | |
| # darwin_arm64: | |
| # | |
| # Compiler options: | |
| # avx_linux: Build with avx instruction set on linux. | |
| # avx_win: Build with avx instruction set on windows | |
| # | |
| # Other build options: | |
| # short_logs: Only log errors during build, skip warnings. | |
| # verbose_logs: Show all compiler warnings during build. | |
| # monolithic: Build all TF C++ code into a single shared object. | |
| # dynamic_kernels: Try to link all kernels dynamically (experimental). | |
| # dbg: Build with debug info | |
| # | |
| # TF version options; | |
| # v2: Build TF v2 | |
| # | |
| # Embedded Linux options (experimental and only tested with TFLite build yet) | |
| # elinux: General Embedded Linux options shared by all flavors. | |
| # elinux_aarch64: Embedded Linux options for aarch64 (ARM64) CPU support. | |
| # elinux_armhf: Embedded Linux options for armhf (ARMv7) CPU support. | |
| # | |
| # Default build options. These are applied first and unconditionally. | |
| # Shlibs built from the source tree should resolve symbols in the exectuable. | |
| build --define=resolve_symbols_in_exec=true | |
| # Exclude OpenCL from Linux and Windows builds. | |
| build:linux --copt=-DLITERT_DISABLE_OPENCL_SUPPORT=1 | |
| build:windows --copt=/DLITERT_DISABLE_OPENCL_SUPPORT=1 | |
| build --repo_env=USE_PYWRAP_RULES=True | |
| build --copt=-DGRPC_BAZEL_BUILD | |
| build --host_copt=-DGRPC_BAZEL_BUILD | |
| build --action_env=GRPC_BAZEL_RUNTIME=1 | |
| build --repo_env=PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb | |
| build --action_env=PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb | |
| # Some targets have the same py source file, but use different | |
| # configurations via `requires-` tags. This results in an action | |
| # conflict when precompiling. Disable to avoid that problem. | |
| # See https://github.com/bazel-contrib/rules_python/issues/2445 | |
| build --@rules_python//python/config_settings:precompile=force_disabled | |
| # Do not do this. This is how gRPC builds itself by default, but we don't want | |
| # that as it would link protobuf into its own set of dynamic libraries, which | |
| # would conflict with our protobuf linkage. | |
| #build --define=use_fast_cpp_protos=true | |
| # For projects which use TensorFlow as part of a Bazel build process, putting | |
| # nothing in a bazelrc will default to a monolithic build. The following line | |
| # opts in to modular op registration support by default. | |
| build --define framework_shared_object=true | |
| build --define tsl_protobuf_header_only=true | |
| build --define=allow_oversize_protos=true | |
| # protobuf will stop supporting MSVC. | |
| build:windows --define=protobuf_allow_msvc=true | |
| build --spawn_strategy=standalone | |
| build -c opt | |
| # Make Bazel print out all options from rc files. | |
| build --announce_rc | |
| # TODO(mihaimaruseac): Document this option or remove if no longer needed | |
| build --define=grpc_no_ares=true | |
| # See https://github.com/bazelbuild/bazel/issues/7362 for information on what | |
| # --incompatible_remove_legacy_whole_archive flag does. | |
| # This flag is set to true in Bazel 1.0 and newer versions. We tried to migrate | |
| # Tensorflow to the default, however test coverage wasn't enough to catch the | |
| # errors. | |
| # There is ongoing work on Bazel team's side to provide support for transitive | |
| # shared libraries. As part of migrating to transitive shared libraries, we | |
| # hope to provide a better mechanism for control over symbol exporting, and | |
| # then tackle this issue again. | |
| # | |
| # TODO: Remove the following two lines once TF doesn't depend on Bazel wrapping | |
| # all library archives in -whole_archive -no_whole_archive. | |
| build --noincompatible_remove_legacy_whole_archive | |
| build --features=-force_no_whole_archive | |
| build --host_features=-force_no_whole_archive | |
| # TODO(mihaimaruseac): Document this option or remove if no longer needed | |
| build --enable_platform_specific_config | |
| # Enable XLA support by default. | |
| build --define=with_xla_support=true | |
| # TODO(mihaimaruseac): Document this option or remove if no longer needed | |
| build --config=short_logs | |
| # TF now has `cc_shared_library` targets, so it needs the experimental flag | |
| # TODO(rostam): Remove when `cc_shared_library` is enabled by default | |
| build --experimental_cc_shared_library | |
| # cc_shared_library ensures no library is linked statically more than once. | |
| build --experimental_link_static_libraries_once=false | |
| # Prevent regressions on those two incompatible changes | |
| # TODO: remove those flags when they are flipped in the default Bazel version TF uses. | |
| build --incompatible_enforce_config_setting_visibility | |
| # TODO: also enable this flag after fixing the visibility violations | |
| # build --incompatible_config_setting_private_default_visibility | |
| # Disable Hermetic CC toolchains | |
| build --@rules_ml_toolchain//common:enable_hermetic_cc=False | |
| build --repo_env USE_HERMETIC_CC_TOOLCHAIN=0 | |
| # Hermetic python version | |
| build --repo_env=HERMETIC_PYTHON_VERSION=3.13 | |
| # Default options should come above this line. | |
| # Enforce clang as C/C++ compiler on Linux. | |
| build:linux --action_env=CC=clang | |
| build:linux --action_env=CXX=clang++ | |
| # Android configs. Bazel needs to have --cpu and --fat_apk_cpu both set to the | |
| # target CPU to build transient dependencies correctly. See | |
| # https://docs.bazel.build/versions/master/user-manual.html#flag--fat_apk_cpu | |
| build:android --crosstool_top=//external:android/crosstool | |
| build:android --host_crosstool_top=@bazel_tools//tools/cpp:toolchain | |
| build:android_arm --config=android | |
| build:android_arm --cpu=armeabi-v7a | |
| build:android_arm --fat_apk_cpu=armeabi-v7a | |
| build:android_arm --platforms=@org_tensorflow//tensorflow/tools/toolchains/android:armeabi-v7a | |
| build:android_arm64 --config=android | |
| build:android_arm64 --cpu=arm64-v8a | |
| build:android_arm64 --fat_apk_cpu=arm64-v8a | |
| build:android_arm64 --platforms=@org_tensorflow//tensorflow/tools/toolchains/android:arm64-v8a | |
| build:android_x86 --config=android | |
| build:android_x86 --cpu=x86 | |
| build:android_x86 --fat_apk_cpu=x86 | |
| build:android_x86 --platforms=@org_tensorflow//tensorflow/tools/toolchains/android:x86 | |
| build:android_x86_64 --config=android | |
| build:android_x86_64 --cpu=x86_64 | |
| build:android_x86_64 --fat_apk_cpu=x86_64 | |
| build:android_x86_64 --platforms=@org_tensorflow//tensorflow/tools/toolchains/android:x86_64 | |
| # Build everything statically for Android since all static libs are later | |
| # bundled together into a single .so for deployment. | |
| build:android --dynamic_mode=off | |
| # TODO(belitskiy): Remove once on Clang 20. | |
| build:android --define=xnn_enable_avxvnniint8=false | |
| # Sets the default Apple platform to macOS. | |
| build:macos --apple_platform_type=macos | |
| # gRPC on MacOS requires this #define | |
| build:macos --copt=-DGRPC_BAZEL_BUILD | |
| # Avoid hitting command line argument limit | |
| build:macos --features=archive_param_file | |
| # Bazel 7.0.0 no longer supports dynamic symbol lookup on macOS. To resolve | |
| # undefined symbol errors in macOS arm64 builds, explicitly add the necessary | |
| # linker flags until dependencies are well defined. See | |
| # https://github.com/bazelbuild/bazel/issues/19730. | |
| build:macos --linkopt=-Wl,-undefined,dynamic_lookup | |
| build:macos --host_linkopt=-Wl,-undefined,dynamic_lookup | |
| # Settings for MacOS on ARM CPUs. | |
| build:macos_arm64 --cpu=darwin_arm64 | |
| build:macos_arm64 --macos_minimum_os=11.0 | |
| build:macos_arm64 --platforms=@build_bazel_apple_support//platforms:darwin_arm64 | |
| # iOS configs for each architecture and the fat binary builds. | |
| build:ios --apple_platform_type=ios | |
| build:ios --copt=-fembed-bitcode | |
| build:ios --copt=-Wno-c++11-narrowing | |
| build:ios --ios_minimum_os=13.0 | |
| build:ios_armv7 --config=ios | |
| build:ios_armv7 --cpu=ios_armv7 | |
| build:ios_armv7 --platforms=@org_tensorflow//tensorflow/tools/toolchains/ios:ios_armv7 | |
| build:ios_arm64 --config=ios | |
| build:ios_arm64 --cpu=ios_arm64 | |
| build:ios_arm64 --platforms=@build_bazel_apple_support//platforms:ios_arm64 | |
| build:ios_arm64e --config=ios | |
| build:ios_arm64e --cpu=ios_arm64e | |
| build:ios_arm64e --platforms=@build_bazel_apple_support//platforms:ios_arm64e | |
| build:ios_sim_arm64 --config=ios | |
| build:ios_sim_arm64 --cpu=ios_sim_arm64 | |
| build:ios_sim_arm64 --platforms=@build_bazel_apple_support//platforms:ios_sim_arm64 | |
| build:ios_x86_64 --config=ios | |
| build:ios_x86_64 --cpu=ios_x86_64 | |
| build:ios_x86_64 --platforms=@build_bazel_apple_support//platforms:ios_x86_64 | |
| build:ios_fat --config=ios | |
| build:ios_fat --ios_multi_cpus=armv7,arm64,i386,x86_64 | |
| # Config to use a mostly-static build and disable modular op registration | |
| # support (this will revert to loading TensorFlow with RTLD_GLOBAL in Python). | |
| # By default, TensorFlow will build with a dependence on | |
| # //tensorflow:libtensorflow_framework.so. | |
| build:monolithic --define framework_shared_object=false | |
| build:monolithic --define tsl_protobuf_header_only=false | |
| build:monolithic --experimental_link_static_libraries_once=false # b/229868128 | |
| # Debug config | |
| build:dbg -c dbg | |
| # Only include debug info for files under tensorflow/, excluding kernels, to | |
| # reduce the size of the debug info in the binary. This is because if the debug | |
| # sections in the ELF binary are too large, errors can occur. See | |
| # https://github.com/tensorflow/tensorflow/issues/48919. | |
| # Users can still include debug info for a specific kernel, e.g. with: | |
| # --config=dbg --per_file_copt=+tensorflow/core/kernels/identity_op.*@-g | |
| # Since this .bazelrc file is synced between the tensorflow/tensorflow repo and | |
| # the openxla/xla repo, also include debug info for files under xla/. | |
| build:dbg --per_file_copt=+.*,-tensorflow.*,-xla.*@-g0 | |
| build:dbg --per_file_copt=+tensorflow/core/kernels.*@-g0 | |
| # for now, disable arm_neon. see: https://github.com/tensorflow/tensorflow/issues/33360 | |
| build:dbg --cxxopt -DTF_LITE_DISABLE_X86_NEON | |
| # AWS SDK must be compiled in release mode. see: https://github.com/tensorflow/tensorflow/issues/37498 | |
| build:dbg --copt -DDEBUG_BUILD | |
| # Options to disable default on features | |
| build:nogcp --define=no_gcp_support=true | |
| build:nonccl --define=no_nccl_support=true | |
| # Modular TF build options | |
| build:dynamic_kernels --define=dynamic_loaded_kernels=true | |
| build:dynamic_kernels --copt=-DAUTOLOAD_DYNAMIC_KERNELS | |
| # Don't trigger --config=<host platform> when cross-compiling. | |
| build:android --noenable_platform_specific_config | |
| build:ios --noenable_platform_specific_config | |
| # Suppress all C++ compiler warnings, otherwise build logs become 10s of MBs. | |
| build:android --copt=-w | |
| build:ios --copt=-w | |
| build:linux --host_copt=-w | |
| build:macos --copt=-w | |
| build:windows --copt=/W0 | |
| build:windows --host_copt=/W0 | |
| # Suppress most C++ compiler warnings to reduce log size but allow | |
| # for specific warnings to still be present. | |
| build:linux --copt="-Wno-all" | |
| build:linux --copt="-Wno-extra" | |
| build:linux --copt="-Wno-deprecated" | |
| build:linux --copt="-Wno-deprecated-declarations" | |
| build:linux --copt="-Wno-ignored-attributes" | |
| build:linux --copt="-Wno-array-bounds" | |
| # Add unused-result as an error on Linux. | |
| build:linux --copt="-Wunused-result" | |
| build:linux --copt="-Werror=unused-result" | |
| # Add switch as an error on Linux. | |
| build:linux --copt="-Wswitch" | |
| build:linux --copt="-Werror=switch" | |
| # This was added in clang-16 by https://reviews.llvm.org/D133574. | |
| # Can be removed once upb is updated, since a type definition is used within | |
| # offset of in the current version of ubp. | |
| # See https://github.com/protocolbuffers/upb/blob/9effcbcb27f0a665f9f345030188c0b291e32482/upb/upb.c#L183. | |
| build:linux --copt=-Wno-gnu-offsetof-extensions | |
| # Toolchain and CUDA options for Linux CPU builds | |
| build:release_cpu_linux --crosstool_top="@local_config_cuda//crosstool:toolchain" | |
| build:release_cpu_linux --repo_env=TF_SYSROOT="/dt9" | |
| # Linux ARM64 specific options | |
| build:linux_arm64 --copt="-mtune=generic" --copt="-march=armv8-a" --copt="-O3" | |
| # On Windows, `__cplusplus` is wrongly defined without this switch | |
| # See https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ | |
| build:windows --copt=/Zc:__cplusplus | |
| build:windows --host_copt=/Zc:__cplusplus | |
| # Tensorflow uses M_* math constants that only get defined by MSVC headers if | |
| # _USE_MATH_DEFINES is defined. | |
| build:windows --copt=/D_USE_MATH_DEFINES | |
| build:windows --host_copt=/D_USE_MATH_DEFINES | |
| # Windows has a relatively short command line limit, which TF has begun to hit. | |
| # See https://docs.bazel.build/versions/main/windows.html | |
| build:windows --features=compiler_param_file | |
| build:windows --features=archive_param_file | |
| # Speed Windows compile times. Available in VS 16.4 (we are on 16.11). See | |
| # https://groups.google.com/a/tensorflow.org/d/topic/build/SsW98Eo7l3o/discussion | |
| build:windows --copt=/d2ReducedOptimizeHugeFunctions | |
| build:windows --host_copt=/d2ReducedOptimizeHugeFunctions | |
| # Before VS 2017 15.8, the member "type" would non-conformingly have an | |
| # alignment of only alignof(max_align_t). VS 2017 15.8 was fixed to handle this | |
| # correctly, but the fix inherently changes layout and breaks binary | |
| # compatibility (*only* for uses of aligned_storage with extended alignments). | |
| build:windows --copt=-D_ENABLE_EXTENDED_ALIGNED_STORAGE | |
| build:windows --host_copt=-D_ENABLE_EXTENDED_ALIGNED_STORAGE | |
| # Enable the runfiles symlink tree on Windows. This makes it possible to build | |
| # the pip package on Windows without an intermediate data-file archive, as the | |
| # build_pip_package script in its current form (as of Aug 2023) uses the | |
| # runfiles symlink tree to decide what to put into the Python wheel. | |
| startup --windows_enable_symlinks | |
| build:windows --enable_runfiles | |
| # Default paths for TF_SYSTEM_LIBS | |
| build:linux --define=PREFIX=/usr | |
| build:linux --define=LIBDIR=$(PREFIX)/lib | |
| build:linux --define=INCLUDEDIR=$(PREFIX)/include | |
| build:linux --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include | |
| build:macos --define=PREFIX=/usr | |
| build:macos --define=LIBDIR=$(PREFIX)/lib | |
| build:macos --define=INCLUDEDIR=$(PREFIX)/include | |
| build:macos --define=PROTOBUF_INCLUDE_PATH=$(PREFIX)/include | |
| # TF_SYSTEM_LIBS do not work on windows. | |
| # By default, build TF in C++ 20 mode. | |
| build:android --cxxopt=-std=c++20 | |
| build:android --host_cxxopt=-std=c++20 | |
| build:ios --cxxopt=-std=c++20 | |
| build:ios --host_cxxopt=-std=c++20 | |
| build:linux --cxxopt=-std=c++20 | |
| build:linux --host_cxxopt=-std=c++20 | |
| build:macos --cxxopt=-std=c++20 | |
| build:macos --host_cxxopt=-std=c++20 | |
| build:windows --cxxopt=/std:c++20 | |
| build:windows --host_cxxopt=/std:c++20 | |
| # On Windows, set /std:c11 and /experimental:c11atomics for pthreadpool. | |
| build:windows --conlyopt=/std:c11 | |
| build:windows --host_conlyopt=/std:c11 | |
| build:windows --conlyopt=/experimental:c11atomics | |
| build:windows --host_conlyopt=/experimental:c11atomics | |
| build:windows --per_file_copt=external/pthreadpool/.*@-std=c11 | |
| build:windows --per_file_copt=external/pthreadpool/_*@/D_CRT_SECURE_NO_WARNINGS | |
| # On windows, we still link everything into a single DLL. | |
| build:windows --config=monolithic | |
| # On linux, we dynamically link small amount of kernels | |
| build:linux --config=dynamic_kernels | |
| # Make sure to include as little of windows.h as possible | |
| build:windows --copt=-DWIN32_LEAN_AND_MEAN | |
| build:windows --host_copt=-DWIN32_LEAN_AND_MEAN | |
| build:windows --copt=-DNOGDI | |
| build:windows --host_copt=-DNOGDI | |
| # MSVC (Windows): Standards-conformant preprocessor mode | |
| # See https://docs.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview | |
| build:windows --copt=/Zc:preprocessor | |
| build:windows --host_copt=/Zc:preprocessor | |
| # Misc build options we need for windows. | |
| build:windows --linkopt=/DEBUG | |
| build:windows --host_linkopt=/DEBUG | |
| build:windows --linkopt=/OPT:REF | |
| build:windows --host_linkopt=/OPT:REF | |
| build:windows --linkopt=/OPT:ICF | |
| build:windows --host_linkopt=/OPT:ICF | |
| # Force local execution for genrules on Windows | |
| build:windows --strategy=Genrule=local | |
| build:windows --genrule_strategy=local | |
| build:windows --spawn_strategy=local | |
| # protobuf can't find its headers on windows when built locally with bazelisk. | |
| build:windows --host_copt=/Iexternal/com_google_protobuf/src | |
| # Use Git Bash for genrules | |
| build:windows --shell_executable="C:/Program Files/Git/bin/bash.exe" | |
| # Verbose failure logs when something goes wrong | |
| build:windows --verbose_failures | |
| # Work around potential issues with large command lines on windows. | |
| # See: https://github.com/bazelbuild/bazel/issues/5163 | |
| build:windows --features=compiler_param_file | |
| # Do not risk cache corruption. See: | |
| # https://github.com/bazelbuild/bazel/issues/3360 | |
| build:linux --experimental_guard_against_concurrent_changes | |
| # Configure short or long logs | |
| build:short_logs --output_filter=DONT_MATCH_ANYTHING | |
| build:verbose_logs --output_filter= | |
| # Instruction set optimizations | |
| # TODO(gunan): Create a feature in toolchains for avx/avx2 to | |
| # avoid having to define linux/win separately. | |
| build:avx_linux --copt=-mavx | |
| build:avx_linux --host_copt=-mavx | |
| build:avx_win --copt=/arch:AVX | |
| # Assume AVX2 x86_64 platforms for linux and windows. | |
| build:linux_x86_64 --copt=-mavx2 | |
| build:windows --copt=/arch:AVX2 | |
| # Disable whole archive on Windows to avoid symbol conflicts. See b/469455895. | |
| build:windows --legacy_whole_archive=0 | |
| # Enable all targets in XLA | |
| build:cpu_cross --define=with_cross_compiler_support=true | |
| # Disable XLA on mobile. | |
| build:xla --define=with_xla_support=true # TODO: remove, it's on by default. | |
| build:android --define=with_xla_support=false | |
| build:ios --define=with_xla_support=false | |
| # Enable string absl flags on mobile which is disabled by default. | |
| build:android --copt=-DABSL_FLAGS_STRIP_NAMES=0 | |
| build:ios --copt=-DABSL_FLAGS_STRIP_NAMES=0 | |
| # Flag to enable remote config | |
| common --experimental_repo_remote_exec | |
| # Use GitHub mirror for BCR to work around bcr.bazel.build outages | |
| common --registry=https://raw.githubusercontent.com/bazelbuild/bazel-central-registry/main/ | |
| # TFLite build configs for generic embedded Linux | |
| build:elinux --crosstool_top=@local_config_embedded_arm//:toolchain | |
| build:elinux --host_crosstool_top=@bazel_tools//tools/cpp:toolchain | |
| build:elinux_aarch64 --config=elinux | |
| build:elinux_aarch64 --cpu=aarch64 | |
| build:elinux_armhf --config=elinux | |
| build:elinux_armhf --cpu=armhf | |
| build:elinux_armhf --copt -mfp16-format=ieee | |
| # Config-specific options should come above this line. | |
| # Load rc file written by ./configure. | |
| try-import %workspace%/.tf_configure.bazelrc | |
| try-import %workspace%/xla_configure.bazelrc | |
| # Load rc file with user-specific options. | |
| try-import %workspace%/.bazelrc.user | |
| # Try to load the XLA warnings config if available | |
| try-import %workspace%/warnings.bazelrc | |
| # Options to build TensorFlow 1.x or 2.x. | |
| build:v2 --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1 | |
| build --config=v2 | |
| # Options to filter filepath prefixes when generating python api's | |
| build:litert_prefixes --define=litert_prefixes="external/org_tensorflow/" | |
| build --config=litert_prefixes | |
| # Options to disable generating api v2 under tensorflow/lite/python. | |
| # This is not on by default and don't use this flag during wheel generation. | |
| # Remove the flag once tf/lite is fully separated from tf. | |
| build:disable_tf_lite_py --define=disable_tf_lite_py=true | |
| # Config to use a gcs bucket as remote cache. | |
| build:public_cache --remote_cache="https://storage.googleapis.com/litert-bazel-artifacts" --remote_upload_local_results=false | |
| # Cache pushes are limited to CI system. | |
| # WARNING: THIS OPTION WONT WORK IF YOU DO NOT HAVE PROPER AUTHENTICATION AND PERMISSIONS | |
| build:public_cache_push --config=public_cache --remote_upload_local_results=true --google_default_credentials | |
| # BEGIN LITERT REMOTE BUILD EXECUTION OPTIONS | |
| # WARNING: THESE OPTIONS WONT WORK IF YOU DO NOT HAVE PROPER AUTHENTICATION AND PERMISSIONS | |
| # Allow creation of resultstore URLs for any bazel invocation | |
| build:resultstore --google_default_credentials | |
| build:resultstore --bes_backend=buildeventservice.googleapis.com | |
| build:resultstore --bes_instance_name="tensorflow-testing" | |
| build:resultstore --bes_results_url="https://source.cloud.google.com/results/invocations" | |
| build:resultstore --bes_timeout=600s | |
| # Flag to enable remote config | |
| common --experimental_repo_remote_exec | |
| # Make Bazel not try to probe the host system for a C++ toolchain. | |
| build:rbe_base --config=resultstore | |
| build:rbe_base --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 | |
| build:rbe_base --define=EXECUTOR=remote | |
| build:rbe_base --jobs=200 | |
| build:rbe_base --remote_executor=grpcs://remotebuildexecution.googleapis.com | |
| build:rbe_base --remote_timeout=3600 | |
| build:rbe_base --spawn_strategy=remote,worker,standalone,local | |
| # Attempt to minimize the amount of data transfer between bazel and the remote | |
| # workers: | |
| build:rbe_base --remote_download_toplevel | |
| test:rbe_base --test_env=USER=anon | |
| build:rbe_linux --config=rbe_base | |
| build:rbe_linux --action_env=PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin" | |
| # Non-rbe settings we should include because we do not run configure | |
| build:rbe_linux --config=avx_linux | |
| build:rbe_linux --linkopt=-lrt | |
| build:rbe_linux --host_linkopt=-lrt | |
| build:rbe_linux --linkopt=-lm | |
| build:rbe_linux --host_linkopt=-lm | |
| build:rbe_linux_cpu --config=rbe_linux | |
| # Linux cpu and cuda builds share the same toolchain now. | |
| build:rbe_linux_cpu --host_crosstool_top="@local_config_cuda//crosstool:toolchain" | |
| build:rbe_linux_cpu --crosstool_top="@local_config_cuda//crosstool:toolchain" | |
| build:rbe_linux_cpu --extra_toolchains="@local_config_cuda//crosstool:toolchain-linux-x86_64" | |
| build:rbe_linux_cpu --repo_env=CC="/usr/lib/llvm-18/bin/clang" | |
| build:rbe_linux_cpu --extra_execution_platforms="@ml_build_config_platform//:platform" | |
| build:rbe_linux_cpu --host_platform="@ml_build_config_platform//:platform" | |
| build:rbe_linux_cpu --platforms="@ml_build_config_platform//:platform" | |
| # This is needed for all Clang17 builds but must not be present in GCC builds. | |
| build:rbe_linux_cpu --copt=-Wno-error=unused-command-line-argument | |
| # These you may need to change for your own GCP project. | |
| common:rbe_linux_cpu --remote_instance_name=projects/tensorflow-testing/instances/default_instance | |
| # END LITERT REMOTE BUILD EXECUTION OPTIONS | |
| # Filters used when building in bulk in cpu. | |
| build:bulk_build_cpu --build_tag_filters=-no_oss,-oss_serial,-gpu,-tpu,-v1only | |
| build:bulk_test_cpu --show_timestamps | |
| build:bulk_test_cpu --experimental_ui_max_stdouterr_bytes=3145728 | |
| # Filters used when testing in bulk in cpu. | |
| test:bulk_test_cpu --config=bulk_build_cpu | |
| test:bulk_test_cpu --test_tag_filters=-no_oss,-oss_serial,-gpu,-tpu,-v1only,-benchmark-test | |
| test:bulk_test_cpu --test_summary=short | |
| test:bulk_test_cpu --test_output=errors | |
| test:bulk_test_cpu --verbose_failures=true | |
| test:bulk_test_cpu --flaky_test_attempts=3 | |
| test:bulk_test_cpu --build_tests_only | |
| # TODO: b/397625618 Enable bzlmod | |
| common --noenable_bzlmod | |
| # --- Fix for Clang 19+ and Strict Layering Checks --- | |
| build --features=-layering_check | |
| build --host_features=-layering_check | |
| build --features=-header_modules | |
| build --host_features=-header_modules |