Skip to content

[CI Fix] Fix private Linear function import in GPU tests - #5421

Merged
acisseJZhong merged 1 commit into
mainfrom
codex/fix-linear-test-import
Oct 15, 2026
Merged

acisseJZhong merged 1 commit into
mainfrom
codex/fix-linear-test-import

Conversation

@acisseJZhong

Copy link
Copy Markdown
Contributor

Fix collection of test_linear_inplace_wgrad_accum.py, which currently aborts both the single- and multi-GPU unit-test jobs on main. The test added in #5399 imports _LinearFunction from the public package, but that private implementation is defined in torchtitan.models.common.linear.linear and is not re-exported.

Import the private function from its defining module and keep Linear on the public import path.

Validation:

  • All five tests collected; four single-GPU cases passed locally.
  • The multi-GPU case failed its existing addmm-call assertion under local PyTorch 2.14.0. The pre-[Linear] Produce the first WGRAD in the weight's grad_dtype #5399 version of that test reproduces the same failure; CI uses PyTorch 2.16 nightly.
  • All non-Pyrefly pre-commit hooks passed. Full-tree Pyrefly reported 54 existing local dependency/type errors; unrelated automatic edits were reverted.

Fixes the collection error in main GPU CI.

@pytorch-bot pytorch-bot Bot added the ciflow/fake-pg Run 1-GPU Fake PG integration tests label Oct 15, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 15, 2026
@acisseJZhong acisseJZhong changed the title [tests] Fix private Linear function import in GPU tests [CI Fix] Fix private Linear function import in GPU tests Oct 15, 2026
@acisseJZhong
acisseJZhong merged commit 44f367b into main Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/fake-pg Run 1-GPU Fake PG integration tests CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants