SHARE
TWEET

Untitled

a guest Dec 10th, 2019 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Android configs. Bazel needs to have --cpu and --fat_apk_cpu both set to the
  2. # target CPU to build transient dependencies correctly. See
  3. # https://docs.bazel.build/versions/master/user-manual.html#flag--fat_apk_cpu
  4. build:android --crosstool_top=//external:android/crosstool
  5. build:android --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
  6. build:android_arm --config=android
  7. build:android_arm --cpu=armeabi-v7a
  8. build:android_arm --fat_apk_cpu=armeabi-v7a
  9. build:android_arm64 --config=android
  10. build:android_arm64 --cpu=arm64-v8a
  11. build:android_arm64 --fat_apk_cpu=arm64-v8a
  12. build:android_x86 --config=android
  13. build:android_x86 --cpu=x86
  14. build:android_x86 --fat_apk_cpu=x86
  15. build:android_x86_64 --config=android
  16. build:android_x86_64 --cpu=x86_64
  17. build:android_x86_64 --fat_apk_cpu=x86_64
  18.  
  19. # Sets the default Apple platform to macOS.
  20. build --apple_platform_type=macos
  21.  
  22. # Config to use a mostly-static build and disable modular op registration
  23. # support (this will revert to loading TensorFlow with RTLD_GLOBAL in Python).
  24. # By default, TensorFlow will build with a dependence on
  25. # //tensorflow:libtensorflow_framework.so.
  26. build:monolithic --define framework_shared_object=false
  27.  
  28. # For projects which use TensorFlow as part of a Bazel build process, putting
  29. # nothing in a bazelrc will default to a monolithic build. The following line
  30. # opts in to modular op registration support by default.
  31. build --define framework_shared_object=true
  32.  
  33. # Flags for open source build, always set to be true.
  34. build --define open_source_build=true
  35. test --define open_source_build=true
  36.  
  37. # Please note that MKL on MacOS or windows is still not supported.
  38. # If you would like to use a local MKL instead of downloading, please set the
  39. # environment variable "TF_MKL_ROOT" every time before build.
  40. build:mkl --define=build_with_mkl=true --define=enable_mkl=true
  41. build:mkl --define=tensorflow_mkldnn_contraction_kernel=0
  42. build:mkl -c opt
  43.  
  44. # This config option is used to enable MKL-DNN open source library only,
  45. # without depending on MKL binary version.
  46. build:mkl_open_source_only --define=build_with_mkl_dnn_only=true
  47. build:mkl_open_source_only --define=build_with_mkl_dnn_v1_only=true
  48. build:mkl_open_source_only --define=build_with_mkl=true --define=enable_mkl=true
  49. build:mkl_open_source_only --define=tensorflow_mkldnn_contraction_kernel=0
  50.  
  51. build:download_clang --crosstool_top=@local_config_download_clang//:toolchain
  52. build:download_clang --define=using_clang=true
  53. build:download_clang --action_env TF_DOWNLOAD_CLANG=1
  54. # Instruct clang to use LLD for linking.
  55. # This only works with GPU builds currently, since Bazel sets -B/usr/bin in
  56. # auto-generated CPU crosstool, forcing /usr/bin/ld.lld to be preferred over
  57. # the downloaded one.
  58. build:download_clang_use_lld --linkopt='-fuse-ld=lld'
  59.  
  60. # This config refers to building with CUDA available. It does not necessarily
  61. # mean that we build CUDA op kernels.
  62. build:using_cuda --define=using_cuda=true
  63. build:using_cuda --action_env TF_NEED_CUDA=1
  64. build:using_cuda --crosstool_top=@local_config_cuda//crosstool:toolchain
  65.  
  66. # This config refers to building CUDA op kernels with nvcc.
  67. build:cuda --config=using_cuda
  68. build:cuda --define=using_cuda_nvcc=true
  69.  
  70. # This config refers to building CUDA op kernels with clang.
  71. build:cuda_clang --config=using_cuda
  72. build:cuda_clang --define=using_cuda_clang=true
  73. build:cuda_clang --define=using_clang=true
  74.  
  75. build:tensorrt --action_env TF_NEED_TENSORRT=1
  76.  
  77. build:rocm --crosstool_top=@local_config_rocm//crosstool:toolchain
  78. build:rocm --define=using_rocm=true --define=using_rocm_hipcc=true
  79. build:rocm --action_env TF_NEED_ROCM=1
  80.  
  81. build:sycl --crosstool_top=@local_config_sycl//crosstool:toolchain
  82. build:sycl --define=using_sycl=true
  83. build:sycl --action_env TF_NEED_OPENCL_SYCL=1
  84.  
  85. build:sycl_nodouble --config=sycl
  86. build:sycl_nodouble --cxxopt -DTENSORFLOW_SYCL_NO_DOUBLE
  87.  
  88. build:sycl_nodouble --config=sycl
  89. build:sycl_asan --copt -fno-omit-frame-pointer --copt -fsanitize-coverage=3 --copt -DGPR_NO_DIRECT_SYSCALLS --linkopt -fPIC --linkopt -fsanitize=address
  90.  
  91. build:sycl_nodouble --config=sycl
  92. build:sycl_trisycl --define=using_trisycl=true
  93.  
  94. # Options extracted from configure script
  95. build:gdr --define=with_gdr_support=true
  96. build:ngraph --define=with_ngraph_support=true
  97. build:verbs --define=with_verbs_support=true
  98. build:numa --define=with_numa_support=true
  99.  
  100. # Options to disable default on features
  101. build:noaws --define=no_aws_support=true
  102. build:nogcp --define=no_gcp_support=true
  103. build:nohdfs --define=no_hdfs_support=true
  104. build:nokafka --define=no_kafka_support=true
  105. build:noignite --define=no_ignite_support=true
  106. build:nonccl --define=no_nccl_support=true
  107.  
  108. build --define=use_fast_cpp_protos=true
  109. build --define=allow_oversize_protos=true
  110.  
  111. build --spawn_strategy=standalone
  112. build --strategy=Genrule=standalone
  113. build -c opt
  114.  
  115. # Make Bazel print out all options from rc files.
  116. build --announce_rc
  117.  
  118. # Other build flags.
  119. build --define=grpc_no_ares=true
  120.  
  121. # Modular TF build options
  122. build:dynamic_kernels --define=dynamic_loaded_kernels=true
  123. build:dynamic_kernels --copt=-DAUTOLOAD_DYNAMIC_KERNELS
  124.  
  125. # Build TF with C++ 17 features.
  126. build:c++17 --cxxopt=-std=c++1z
  127. build:c++17 --cxxopt=-stdlib=libc++
  128. build:c++1z --config=c++17
  129.  
  130. # Default paths for TF_SYSTEM_LIBS
  131. build --define=PREFIX=/usr
  132. build --define=LIBDIR=$(PREFIX)/lib
  133. build --define=INCLUDEDIR=$(PREFIX)/include
  134.  
  135. # Suppress all warning messages.
  136. build:short_logs --output_filter=DONT_MATCH_ANYTHING
  137.  
  138. # Options when using remote execution
  139. build:rbe --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
  140. build:rbe --auth_enabled=true
  141. build:rbe --auth_scope=https://www.googleapis.com/auth/cloud-source-tools
  142. build:rbe --define=EXECUTOR=remote
  143. build:rbe --flaky_test_attempts=3
  144. build:rbe --jobs=200
  145. build:rbe --remote_accept_cached=true
  146. build:rbe --remote_cache=remotebuildexecution.googleapis.com
  147. build:rbe --remote_executor=remotebuildexecution.googleapis.com
  148. build:rbe --remote_local_fallback=false
  149. build:rbe --remote_timeout=600
  150. build:rbe --spawn_strategy=remote
  151. build:rbe --strategy=Genrule=remote
  152. build:rbe --strategy=Closure=remote
  153. build:rbe --strategy=Javac=remote
  154. build:rbe --strategy=TestRunner=remote
  155. build:rbe --tls_enabled
  156. test:rbe --test_env=USER=anon
  157.  
  158. # Options to build TensorFlow 1.x or 2.x.
  159. build:v1 --define=tf_api_version=1
  160. build:v2 --define=tf_api_version=2
  161. test:v1 --test_env=TF2_BEHAVIOR=0
  162. test:v2 --test_env=TF2_BEHAVIOR=1
  163. build --config=v2
  164. test --config=v2
  165.  
  166. # Default options should come above this line
  167.  
  168. # Options from ./configure
  169. try-import %workspace%/.tf_configure.bazelrc
  170.  
  171. # Put user-specific options in .bazelrc.user
  172. try-import %workspace%/.bazelrc.user
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top