Skip to content

How to run XLA test suite in OSS builds? #36756

@samuela

Description

@samuela

Description

I'm trying to run the XLA test suite as part of packaging XLA for Nixpkgs, but I'm unable to get most tests to execute.

Environment

  • OS: Linux (NixOS)
  • Bazel version: 7.x
  • Compiler: Clang 18
  • XLA commit: e8247c3
  • Backend: CPU only (./configure.py --backend=CPU)

What I Tried

Attempt 1: Default configuration

After running ./configure.py --backend=CPU, the generated xla_configure.bazelrc includes:

--test_tag_filters -no_oss,-gpu

Running bazel test //xla/service:all //xla/client:all //xla/pjrt:all results in:

Executed 0 out of 186 tests: 186 were skipped.

All tests show "NO STATUS" - they are compiled but not executed.

Attempt 2: Clear test_tag_filters

I tried overriding with --test_tag_filters= (empty) to remove the filters:

Executed 0 out of 186 tests: 186 were skipped.

Same result.

Attempt 3: Filter only GPU tests

I tried --test_tag_filters=-gpu,-requires-gpu-nvidia,-requires-gpu-amd,-requires-gpu (removing -no_oss):

Executed 1 out of 190 tests: 1 test passes and 189 were skipped.
There were tests whose specified size is too big.

Only generate_test_hlo_checks_test passed.

Attempt 4: Allow all test sizes

I added --test_size_filters=small,medium,large,enormous:

Executed 2 out of 190 tests: 2 tests pass, 1 fails to build and 187 were skipped.

Tests that passed:

  • //xla/service:custom_call_target_registry_test (0.2s)
  • //xla/service:generate_test_hlo_checks_test (1.3s)

Test that failed to build:

  • //xla/service:hlo_module_config_test

187 tests still skipped.

Questions

  1. What is the intended way to run XLA tests in an OSS build environment?
  2. Are most XLA tests designed only for Google's internal CI infrastructure?
  3. Is there a specific set of test targets that are expected to work in OSS builds?
  4. What tags/filters should be used to run the CPU test suite?

Metadata

Metadata

Labels

CPURelated to XLA on CPUquestionFurther information is requestedstat:awaiting openxla-engAwaiting response from openxla-eng

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions