@@ -282,6 +282,46 @@ build:rbe_linux_cuda12.3_nvcc_py3.12 --python_path="/usr/local/bin/python3.12"
282
282
build:tensorflow_testing_rbe --project_id=tensorflow-testing
283
283
common:tensorflow_testing_rbe_linux --remote_instance_name=projects/tensorflow-testing/instances/default_instance
284
284
build:tensorflow_testing_rbe_linux --config=tensorflow_testing_rbe
285
+
286
+ # START CROSS-COMPILE CONFIGS
287
+
288
+ # Set execution platform to Linux x86
289
+ # Note: Lot of the "host_" flags such as "host_cpu" and "host_crosstool_top"
290
+ # flags seem to be actually used to specify the execution platform details. It
291
+ # seems it is this way because these flags are old and predate the distinction
292
+ # between host and execution platform.
293
+ build:cross_compile_base --host_cpu=k8
294
+ build:cross_compile_base --host_crosstool_top=@xla//tools/toolchains/cross_compile/cc:cross_compile_toolchain_suite
295
+ build:cross_compile_base --extra_execution_platforms=@xla//tools/toolchains/cross_compile/config:linux_x86_64
296
+
297
+ # START LINUX AARCH64 CROSS-COMPILE CONFIGS
298
+ build:cross_compile_linux_arm64 --config=cross_compile_base
299
+
300
+ # Set the target CPU to Aarch64
301
+ build:cross_compile_linux_arm64 --platforms=@xla//tools/toolchains/cross_compile/config:linux_aarch64
302
+ build:cross_compile_linux_arm64 --cpu=aarch64
303
+ build:cross_compile_linux_arm64 --crosstool_top=@xla//tools/toolchains/cross_compile/cc:cross_compile_toolchain_suite
304
+
305
+ build:rbe_cross_compile_base --config=rbe
306
+ # JAX depends on some local Python headers that are configured as Genrule. They
307
+ # are present on the local host machine but not on the remote execution machine,
308
+ # leading to build failures. To resolve the issue, the following line is added
309
+ # to make sure all Genrule targets are excuted locally.
310
+ build:rbe_cross_compile_base --strategy=Genrule=standalone
311
+ # Due to the above strategy, all Genrule commands are executed locally, but the
312
+ # following actions invoke tools (E.g `flatc`, `llvm-tblgen`, etc.) that are
313
+ # only executabe on the RBE (x86) machine, so the strategy_regexp options are
314
+ # added to override and run the actions using remote strategy.
315
+ build:rbe_cross_compile_base --strategy_regexp='Generating code from table.*=remote'
316
+ build:rbe_cross_compile_base --strategy_regexp='Generating flatbuffer files.*=remote'
317
+ build:rbe_cross_compile_base --strategy_regexp='Executing genrule @llvm-project.*=remote'
318
+
319
+ # RBE cross-compile configs for Linux Aarch64
320
+ build:rbe_cross_compile_linux_arm64 --config=cross_compile_linux_arm64
321
+ build:rbe_cross_compile_linux_arm64 --config=rbe_cross_compile_base
322
+ # END LINUX AARCH64 CROSS-COMPILE CONFIGS
323
+ # END CROSS-COMPILE CONFIGS
324
+
285
325
#############################################################################
286
326
287
327
#############################################################################
0 commit comments