@@ -415,6 +415,38 @@ build:cross_compile_darwin_x86_64 --platform_mappings=platform_mappings
415415build:rbe_cross_compile_darwin_x86_64 --config=cross_compile_darwin_x86_64
416416build:rbe_cross_compile_darwin_x86_64 --config=rbe_cross_compile_base
417417
418+ # #############################################################################
419+ # Test specific config options below. These are used when `bazel test` is run.
420+ # #############################################################################
421+ test --test_output=errors
422+
423+ # Common configs for for running GPU tests.
424+ test:gpu --test_env=TF_CPP_MIN_LOG_LEVEL=0 --test_env=XLA_PYTHON_CLIENT_ALLOCATOR=platform
425+
426+ # Non-multiaccelerator tests with one GPU apiece. These tests are run on RBE
427+ # and locally.
428+ test:non_multiaccelerator --config=gpu
429+ test:non_multiaccelerator --test_env=JAX_EXCLUDE_TEST_TARGETS=PmapTest.testSizeOverflow
430+ test:non_multiaccelerator --test_tag_filters=-multiaccelerator
431+
432+ # Configs for running non-multiaccelerator tests locally
433+ test:non_multiaccelerator_local --config=non_multiaccelerator
434+ # Disable building jaxlib. Instead we depend on the local wheel.
435+ test:non_multiaccelerator_local --//jax:build_jaxlib=false
436+
437+ # `JAX_ACCELERATOR_COUNT` needs to match the number of GPUs in the VM.
438+ test:non_multiaccelerator_local --test_env=JAX_TESTS_PER_ACCELERATOR=12 --test_env=JAX_ACCELERATOR_COUNT=4
439+
440+ # The product of the `JAX_ACCELERATOR_COUNT`` and `JAX_TESTS_PER_ACCELERATOR`
441+ # should match the VM's CPU core count (set in `--local_test_jobs`).
442+ test:non_multiaccelerator_local --local_test_jobs=48
443+
444+ # Multiaccelerator tests with all GPUs. These tests are only run locally
445+ # Disable building jaxlib. Instead we depend on the local wheel.
446+ test:multiaccelerator_local --config=gpu
447+ test:multiaccelerator_local --//jax:build_jaxlib=false
448+ test:multiaccelerator_local --jobs=8 --test_tag_filters=multiaccelerator
449+
418450#############################################################################
419451# Some configs to make getting some forms of debug builds. In general, the
420452# codebase is only regularly built with optimizations. Use 'debug_symbols' to
0 commit comments