Skip to content

Automatically mark all tests as cpu_only unless explicitly tagged with hardware markers - #4715

Merged
copybara-service[bot] merged 1 commit into
mainfrom
cpu_only
Aug 5, 2026
Merged

Automatically mark all tests as cpu_only unless explicitly tagged with hardware markers#4715
copybara-service[bot] merged 1 commit into
mainfrom
cpu_only

Conversation

@SurbhiJainUSC

@SurbhiJainUSC SurbhiJainUSC commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR updates Pytest collection behavior in tests/conftest.py so that all collected tests are marked as cpu_only by default unless they explicitly specify a hardware marker (tpu_only, gpu_only, or tpu_backend).
Because cpu_only is now applied automatically to tests targeting CPU execution, explicit @pytest.mark.cpu_only decorators and module-level pytestmark entries have been removed across the test suite.

Fixes: b/540415491

Tests

CI tests

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@codecov

codecov Bot commented Aug 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@SurbhiJainUSC
SurbhiJainUSC force-pushed the cpu_only branch 6 times, most recently from 330ff03 to cdd12f1 Compare August 4, 2026 21:02
@copybara-service
copybara-service Bot merged commit 2043e05 into main Aug 5, 2026
61 of 63 checks passed
@copybara-service
copybara-service Bot deleted the cpu_only branch August 5, 2026 00:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants