Skip to content

[models] Let the attn_gym facade defer missing-backend import errors - #5467

Merged
tianyu-l merged 2 commits into
pytorch:mainfrom
mkhilari:attn-gym-defer-backend-errors
Oct 18, 2026
Merged

tianyu-l merged 2 commits into
pytorch:mainfrom
mkhilari:attn-gym-defer-backend-errors

Conversation

@mkhilari

Copy link
Copy Markdown
Contributor

Summary

#5231 made the models importable when attn_gym is absent. On a machine where attn_gym is installed but one of its kernel backends is not (cutlass and triton have no macOS wheels, the same happens on any non CUDA box without them), attn_gym itself imports fine and its submodules raise ModuleNotFoundError(name="cutlass") / (name="triton") at import time. The facade's _load_module only tolerates error.name == "attn_gym", so the error escapes, torchtitan.models.common fails to import, and none of tests/unit_tests/cpu can collect.

This keeps the existing contract from #5231 and extends it to that case:

  • _load_module records a ModuleNotFoundError raised from inside an attn_gym.* import (keyed by module) and resolves the export to _MissingKernel, so the identity checks in kda.py / gdn.py / linear_attention.py / cp_linear_attention.py still skip SPMD registration.
  • _raise_missing re-raises the recorded backend error (same name and message) when a placeholder kernel is called, and require_attn_gym() raises it when a kernel is built. The existing test_linear_attention_reports_missing_dependency[cutlass-*] cases therefore still see error.name == "cutlass".
  • No change when attn_gym is missing, and no change when every backend imports.
  • require_attn_gym() is deliberately coarse, any recorded backend failure makes it raise, which matches the previous behaviour where the module import itself failed. Per kernel granularity can come later if a backend mix (e.g. cuDNN present, cutlass absent) turns out to matter.

Related: #5181 (@githubsgi) handles the same symptom for the KDA import in attention/__init__.py, this does it once at the facade for every export, including the linear_attention.py import that still fails without it.

Test plan

New test_common_attention_imports_with_broken_attention_gym_backend[cutlass|triton] in tests/unit_tests/cpu/models/common/test_optional_imports.py: an installed attn_gym whose submodules all fail on the backend import, the common package and every model debug config still import/build, _MissingKernel is not registered with SPMD, and calling a kernel, require_attn_gym(), or building KDAKernel / GDNKernel raises the backend's own ModuleNotFoundError.

On macOS 15 (Apple Silicon, torch 2.16.0.dev20261014+cpu, attn-gym 0.0.17 without cutlass/triton):

  • before: pytest tests/unit_tests/cpu/components/checkpointer → 2 errors during collection (No module named 'cutlass', then 'triton')
  • after: tests/unit_tests/cpu/models/common/test_optional_imports.py 11 passed; tests/unit_tests/cpu/components/checkpointer 120 passed, 2 failed (unrelated: torch_checkpointing uses os.O_DIRECT, reported separately); torchtitan/experiments/torchft/tests 26 passed
  • pre-commit run --files on both files: all hooks pass (flake8, µfmt, pydoclint, codespell, pyrefly)

…The attn_gym facade treats only a missing attn_gym package as optional. When attn_gym is installed but one of the kernel backends it imports at module import time (cutlass, triton) has no wheel on the platform, the ModuleNotFoundError escaped from the facade and importing torchtitan.models.common failed, so no CPU unit test could collect on macOS. Record such errors per attn_gym module, resolve the export to _MissingKernel as for a missing package, and re raise the recorded backend error (same name and message) when a kernel is built or require_attn_gym() is called.
@pytorch-bot pytorch-bot Bot added ciflow/fake-pg Run 1-GPU Fake PG integration tests ciflow/rl labels Oct 17, 2026
@meta-cla

meta-cla Bot commented Oct 17, 2026

Copy link
Copy Markdown

Hi @mkhilari!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@pytorch-bot

pytorch-bot Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Workflows were awaiting approval. CI has now been triggered for the ciflow labels on this PR.

@pytorch-bot

pytorch-bot Bot commented Oct 17, 2026

Copy link
Copy Markdown

The following ciflow label(s) have been added but CI has not been triggered yet because the workflows are awaiting approval:

  • ciflow/rl
  • ciflow/fake-pg

Once a maintainer approves the workflows (scroll to the bottom of the PR page), the corresponding CI jobs will be triggered automatically. Please ping one of the reviewers if you do not have access to approve and run workflows.

@meta-cla

meta-cla Bot commented Oct 17, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 17, 2026
@meta-cla

meta-cla Bot commented Oct 17, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@tianyu-l

Copy link
Copy Markdown
Contributor

@claude review

@claude

claude Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @tianyu-l's task in 1m 9s —— View job


Review: attn_gym facade deferring missing-backend import errors

  • Gather diff and context
  • Review facade changes (torchtitan/models/common/attn_gym.py)
  • Review tests
  • Run tests (couldn't: this runner needs approval for pytest, so I didn't run anything)
  • Post review

Summary: The approach is sound. It fixes the problem once in the facade instead of patching each call site (#5181 does the latter). It keeps the _MissingKernel identity checks working, so SPMD registration is still skipped. And error.name matches the backend, so the existing [cutlass-*] tests keep their meaning. One real concern and a few small ones.

1. The new catch also hides real errors inside attn_gym (main concern)

attn_gym.py:155

if name.split(".")[0] != "attn_gym":
    raise
_BACKEND_ERRORS.setdefault(name, error)
return None

This checks the module being imported (name). It doesn't check what failed (error.name), so every ModuleNotFoundError raised under attn_gym.* is now deferred. That includes errors that aren't a missing optional backend:

  • Version mismatch / wrong _EXPORTS path. If an attn_gym release moves attn_gym.linear.gdn.impl.cudnn, importing it raises ModuleNotFoundError(name="attn_gym.linear.gdn.impl.cudnn"). Today that fails loudly when torchtitan.models.common is imported. After this PR it quietly becomes _MissingKernel on a CUDA box with every backend installed, and only shows up when a kernel is built. The same goes for a typo in _EXPORTS.

Narrowing the check to failures outside the attn_gym namespace keeps the intended behaviour (cutlass/triton/cudnn missing) and still raises on internal breakage:

except ModuleNotFoundError as error:
    if error.name == "attn_gym":
        return None
    if error.name is None or error.name.split(".")[0] == "attn_gym":
        raise
    # attn_gym is installed but this module needs a backend that is not ...
    _BACKEND_ERRORS.setdefault(name, error)
    return None

(name always starts with attn_gym here, because _load_module is only called with _EXPORTS values or "attn_gym". The existing check therefore never re-raises anything, so it's effectively dead code.)

Fix this →

2. The error reported depends on which modules failed first, not on the kernel called

_raise_missing always raises the first recorded error, and require_attn_gym() raises if any error was recorded. The PR description already calls require_attn_gym() coarse on purpose, and that's fine as a first step. Two things to know about it:

  • Suppose attn_gym.sparse (DSv4 lightning_indexer / gather_attn) fails on cutlass while the cuDNN-backed GDN/KDA modules import fine. Then GDNKernel.Config().build() raises the cutlass error even though GDN would work. This setup was already broken before the PR (the import failed), so it's not a regression. But it makes the error message misleading for that case.
  • _BACKEND_ERRORS fills in lazily, as exports are first accessed. So require_attn_gym()'s result depends on which model modules happen to be imported already. Today kda.py/gdn.py look up their exports when the module is imported, so it works in practice. Still, that's a hidden ordering dependency.

A cheap improvement is to give _MissingKernel placeholders the module they came from, so calling a placeholder re-raises its own module's error. That fixes the wrong-message case without making require_attn_gym() per-kernel. It's fine as a follow-up; at minimum, a TODO next to require_attn_gym would be good.

3. Nits

  • attn_gym.py:130: a for ...: raise loop that only ever runs once reads oddly. Clearer:
    error = next(iter(_BACKEND_ERRORS.values()), None)
    if error is not None:
        raise ModuleNotFoundError(str(error), name=error.name, path=error.path) from error
    Building a new exception (rather than raise error) is the right call, since it stops tracebacks piling up on one shared exception object. Worth a short comment saying so.
  • The module docstring on line 7 still says "placeholders when the package is missing". It should also mention a missing backend.

4. Tests

  • The MetaPathFinder raises from find_spec for every attn_gym.* module. That means the error comes during module lookup, not partway through running the submodule's own imports (which is what happens on macOS). Both reach the same except, so this is fine for checking the facade logic.
  • Missing coverage:
    • Mixed case: some submodules import and others fail. It would check that the exports that loaded are real objects and still get registered with SPMD.
    • Negative case for Add profiler #1: a ModuleNotFoundError(name="attn_gym.<something>") should still raise when imported.
  • The model list matches the existing test at line 62 (both leave out kimi_k2_7, qwen3_6, qwen3_8, flux), so it's consistent. Adding kimi_k2_7 to both would cover the other KDA user.

Verdict

Looks good once #1 is fixed. That change is small and keeps today's "fail loudly on real breakage" behaviour on the main CUDA path. #2 can be a follow-up.

@tianyu-l

Copy link
Copy Markdown
Contributor

@mkhilari please fix

Review follow up for pytorch#5467.

_load_module deferred every ModuleNotFoundError raised while importing an
attn_gym module, so a moved attn_gym submodule or a typo in _EXPORTS
would have become a placeholder kernel instead of failing at import.
Decide on error.name instead, a missing attn_gym module still raises,
only a missing backend (cutlass, triton, ...) is recorded.

Also: simplify _raise_missing, document why it builds a fresh exception,
note the coarseness of require_attn_gym(), update the module docstring,
and add tests for the mixed case (available exports stay real and are
registered with SPMD, failing ones defer) and for the internal-module
case. kimi_k2_7 joins the model lists of both import tests.
@mkhilari
mkhilari force-pushed the attn-gym-defer-backend-errors branch from 80ef21a to 44aaca5 Compare October 17, 2026 23:42
@mkhilari

Copy link
Copy Markdown
Contributor Author

@mkhilari please fix

Thanks @tianyu-l for the review. Pushed a follow up commit addressing it:

  1. Namespace check — fixed as suggested: _load_module now decides on error.name. A missing attn_gym module (moved in a release, typo in _EXPORTS) raises at import as before; only a failure outside the attn_gym namespace (cutlass, triton, …) is recorded and deferred. You were right that the previous check was dead code.
  2. Coarse require_attn_gym() / first recorded error, left as is for this PR, with a TODO next to require_attn_gym() describing the per placeholder follow up. The placeholders have to stay _MissingKernel itself for the identity checks in kda.py / gdn.py / linear_attention.py / cp_linear_attention.py, so per kernel errors need a small change at those call sites too, happy to do that as a separate PR.
  3. Nits — _raise_missing uses next(iter(...), None) with a comment on why it builds a fresh exception; module docstring mentions a missing backend.
  4. Tests — added the mixed case (attn_gym.linear.short_conv.cute and attn_gym.linear import, …l2norm_fwd fails on triton: the real kernels are registered with SPMD, _L2Norm is _MissingKernel, calling it raises the triton error) and the negative case (ModuleNotFoundError(name="attn_gym.…") still raises on import). The negative case fails against the first revision and passes now; the mixed case is new coverage. kimi_k2_7 added to the model lists of both import tests.

On macOS without cutlass/triton: test_optional_imports.py 13 passed, tests/unit_tests/cpu/components/checkpointer 120 passed (the 2 failures are meta-pytorch/torch_checkpointing#9), pre commit all hooks pass. Please let me know if the workflows can be approved. Thanks.

@tianyu-l

Copy link
Copy Markdown
Contributor

@claude review again

@claude

claude Bot commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @tianyu-l's task in 1m 2s —— View job


Re-review: attn_gym facade deferring missing-backend import errors

  • Gather the diff (with the follow-up commit 44aaca5)
  • Check fixes for the previous review (namespace check, TODO, nits, tests)
  • Look for new issues
  • Run tests: not done. This runner needs approval to run pytest, so nothing was executed here.
  • Post review

Summary: Every point from the last review is fixed or tracked with a TODO. I found no new blocking issues. LGTM once CI is green.

Previous findings

# Finding Status
1 The catch also hid real attn_gym breakage ✅ Fixed. See below.
2 Coarse require_attn_gym() reports the first recorded error ✅ Left as is on purpose. The TODO at attn_gym.py:179 describes the problem and the fix.
3 Nits (next(iter(...)), comment on the fresh exception, docstring) ✅ All done.
4 Tests: mixed case, negative case, kimi_k2_7 ✅ All added.

#1 in detail (attn_gym.py:156-166): _load_module now decides based on error.name. In order:

So a submodule moved in a new attn_gym release, or a typo in _EXPORTS, still fails at import time on a CUDA box with every backend installed. Tracing the negative test: linear_attention first looks up _ConfiguredShortConv, which reads from attn_gym.linear.short_conv.cute. The finder raises with name="attn_gym.linear", and that error propagates. That matches the claim that this test fails against the first revision and passes now.

New observations (none blocking)

  1. Only ModuleNotFoundError is deferred. A backend that is installed but can't load raises a different exception type. Examples: triton present but incompatible (ImportError from from triton import X), or cutlass-dsl failing to find libcuda (OSError/RuntimeError). Those errors stay loud, the same as before this PR. I think that's the right default, since those are broken environments rather than unsupported platforms. Just noting it's out of scope here.

  2. The error.name is None case is raised. Some packages raise ModuleNotFoundError("...") by hand without setting name. Those will fail at import rather than being deferred. That's the conservative choice and fine, but if a macOS report like that shows up, this is where to look.

  3. The mixed-backend test (test_optional_imports.py:301) monkeypatches facade.import_module. That works because _load_module looks up the module-level import_module each time it's called. It also replaces spmd.register_local_autograd_function, which works because linear_attention.py:33 calls it through the spmd. attribute. Both run in a subprocess, so nothing leaks to other tests. One fragile spot: if either module switches to a from ... import, the test will start failing for a misleading reason. A one-line comment in the script would help, but it's optional.

  4. Fresh exception in _raise_missing (attn_gym.py:134-136). It keeps name, the message and path, and chains the original error with from error. So callers that check error.name == "cutlass" (the existing [cutlass-*] cases) still pass, and the original traceback is still available. 👍

  5. Not this PR: the install hint at attn_gym.py:139 still pins attn-gym==0.0.16, while the PR description tested with 0.0.17. If the pin is out of date, fix it in a separate change.

Verdict

Approve-ready from my side. The design keeps the "fail loudly on real breakage" behaviour on the main CUDA path and fixes test collection on platforms without cutlass/triton wheels. The per-placeholder error reporting (#2) is a reasonable follow-up PR, since it needs changes at the _MissingKernel identity-check call sites in kda.py, gdn.py, linear_attention.py and cp_linear_attention.py.

@tianyu-l
tianyu-l merged commit e61df55 into pytorch:main Oct 18, 2026
tianyu-l pushed a commit that referenced this pull request Oct 19, 2026
## Summary

Follow up to #5467 (review point 2 there). The facade recorded backend
import errors per attn_gym module, but every placeholder raised the
first recorded error, so with, say, `attn_gym.sparse` failing on cutlass
and the GDN modules importing fine, `GDNKernel.Config().build()`
reported cutlass although GDN would have worked.

- Exports of a module whose backend is missing now resolve to a
`_MissingKernel` subclass carrying that module's error (one subclass per
module, cached, named `_MissingKernel[<attn_gym module>]`). Calling it,
`.apply`, or `.from_fragments` raises a fresh `ModuleNotFoundError` with
that backend's name and message.
- `is_missing_kernel()` (a `TypeGuard`) replaces the `is not
_MissingKernel` identity checks in `kda.py`, `gdn.py`,
`linear_attention.py` and `cp_linear_attention.py`, so the subclasses
are also kept out of SPMD registration.
- `require_attn_gym(kernel, *kernels)` checks the given exports and each
module calls it from `__init__` with every export it uses, so a build
error names the backend that module needs: `KDAKernel` (`chunk_kda`,
`bound_gate`, `l2norm`), `GDNKernel` (`chunk_gdn`, `recurrent_gdn`,
`l2norm`), `InnerKDA` / `InnerGDN` (`causal_conv1d`),
`ContextParallelInnerKDA` / `ContextParallelInnerGDN`
(`context_parallel_kda` / `context_parallel_gdn`,
`context_parallel_conv_history`, `ContextParallelRouting`, and `l2norm`
for GDN). The zero argument form from #5467, which raised on any error
recorded so far, is gone.
- No change when `attn_gym` is missing (the placeholders are the base
class and raise the install hint) or when every backend imports.

Not in this PR: attn_gym resolves `causal_conv1d` and the other
`attn_gym.linear.short_conv` exports lazily (`attn_gym.linear._lazy`)
and raises a plain `ImportError` at attribute access, which
`_load_module` never sees, so on a machine without cutlass `gdn.py` /
`kda.py` still fail to import and 18 CPU test modules do not collect. I
have that fixed on top of this branch and will open it next, the
`causal_conv1d` checks here are what make it fail at build rather than
at the first forward.

## Test plan

`tests/unit_tests/cpu/models/common/test_optional_imports.py`:
- new `test_attention_modules_report_their_own_backend_at_build`: a fake
attn_gym whose modules all import except the broken ones. With
`attn_gym.linear.short_conv` failing on cutlass, `KDAKernel` /
`GDNKernel` build and `InnerKDA`, `InnerGDN` and their CP variants fail
at build with cutlass, with the three context parallel modules failing
on triton, the inner modules build and the CP variants fail with triton.
Fails without the `__init__` checks.
- mixed case extended: `…l2norm_fwd` fails on triton and
`attn_gym.linear.kda.impl.fused` on cutlass in one process, `_L2Norm()`
raises triton, `_ChunkKDA()` / `.apply` raise cutlass,
`require_attn_gym(_ChunkKDA)` raises cutlass, `require_attn_gym(real,
_L2Norm)` raises triton, `require_attn_gym(real, real)` passes, the
placeholder is named after its module.
- broken backend case asserts the placeholders are subclasses and that
none reached the SPMD registry.
- existing `[cutlass-*]` build cases now go through
`require_attn_gym(kernels)` and still see `error.name == "cutlass"`.

On macOS without cutlass/triton, rebased on e61df55, 15 passed,
`tests/unit_tests/cpu/components/checkpointer` 123 passed (2 known,
meta-pytorch/torch_checkpointing#9), pre commit on all files passes
every hook except pyrefly, which reports the same pre existing
diagnostics as main in files this PR does not touch.
tianyu-l pushed a commit that referenced this pull request Oct 24, 2026
…#5565)

## Summary

Follow up to #5467 and #5500. attn_gym resolves its backend backed
exports on first attribute access (`attn_gym.linear._lazy`),
`causal_conv1d`, `causal_conv1d_decode` and `paged_causal_conv1d` come
from `attn_gym.linear.short_conv`, which imports fine, only the
`getattr` imports `attn_gym.linear.short_conv.cute` and raises
`ImportError("causal_conv1d requires the optional CuTeDSL backend:
...")` chained from `ModuleNotFoundError(name="cutlass")`. #5467 only
deferred a `ModuleNotFoundError` raised by the module import itself, so
`gdn.py` / `kda.py` still failed to import on a machine without cutlass,
and with them everything that imports `torchtitan.models.common`, 18 of
the CPU test modules did not collect on macOS.

- `__getattr__` resolves exports through `_load_export`, an
`ImportError` whose cause is a backend's `ModuleNotFoundError` is
recorded under `"<module>.<export>"` and the export becomes a
placeholder carrying that error, exactly like an export of a module that
failed to import. A missing attn_gym module, or an `ImportError` that is
not a missing module, still raises at import.
- The install hint now names attn gym 0.0.17, the version
`.ci/docker/requirements.txt` pins (noted in the #5467 review).
- No change when every backend imports, `getattr` succeeds and nothing
is recorded.

On a machine without cutlass the models now import, `causal_conv1d` is a
placeholder, so `InnerKDA` / `InnerGDN` (which check it in `__init__`
since #5500) fail at build with the cutlass error instead of at the
first forward, and `KDAKernel` / `GDNKernel` still build when their own
backends import.

Also takes the optional note from the #5500 re review, the build test
now breaks one thing per case, so each entry of the `require_attn_gym`
lists is load bearing.

## Test plan

`tests/unit_tests/cpu/models/common/test_optional_imports.py`:

- New `test_attention_gym_lazy_exports_with_missing_backend`, a fake
`attn_gym.linear.short_conv` resolves `causal_conv1d` lazily and fails
on cutlass. `gdn` imports, `gdn.causal_conv1d` is a placeholder (not
`_MissingKernel` itself), calling it and
`require_attn_gym(causal_conv1d)` raise
`ModuleNotFoundError(name="cutlass")`, an `ImportError` chained from a
missing attn_gym module, and one that is not a missing module, still
raise and leave no placeholder. Fails without the facade change (the
`ImportError` escapes at import), passes with it.
- `test_attention_modules_report_their_own_backend_at_build` is
reparametrized over 11 cases, each breaking exactly one thing on a
backend of its own, the `attn_gym.linear.short_conv` module, or one of
the 10 exports the `require_attn_gym` lists name (`causal_conv1d`,
`chunk_kda`, `bound_gate`, `l2norm`, `chunk_gdn`, `recurrent_gdn`,
`context_parallel_kda`, `context_parallel_gdn`,
`context_parallel_conv_history`, `ContextParallelRouting`), broken
through the lazy export path. Each case asserts the placeholder is named
after what failed and exactly which of `KDAKernel`, `GDNKernel`,
`InnerKDA`, `InnerGDN`, `ContextParallelInnerKDA`,
`ContextParallelInnerGDN` fail at build. Dropping
`ContextParallelRouting` from the `cp_kda.py` list fails only the
`[ContextParallelRouting]` case, without the facade change the 10 export
cases fail and the module case passes.
- The two install hint asserts updated to 0.0.17.

On macOS 15 (attn-gym 0.0.17, no cutlass/triton), rebased on a4a62b3,
`pytest tests/unit_tests/cpu --collect-only` goes from 1371 tests
collected / 23 errors to 1640 / 5. The 18 errors fixed were all the
`causal_conv1d` `ImportError`, the 5 that remain are
`experiments/graph_trainer/paged_stash_memory_policy.py` importing
triton at module level (3) and an older `renderers` in my env (2),
neither touched here. Of the 18 modules, 16 run standalone, 210 passed,
2 fail for platform reasons (`qwen3_8` builds a model whose inner
modules need cutlass and gets the deferred cutlass error at build,
`test_lora_forward` runs torch.compile on CPU), the other 2
(`kimi_k3/test_kimi_k3_config.py`,
`recipes/test_debug_config_defaults.py`) hit the graph_trainer triton
import when run on their own. `test_optional_imports.py` 25 passed, pre
commit on both files passes every hook except pyrefly, which reports the
same pre existing diagnostics as main.
meta-codesync Bot pushed a commit to meta-pytorch/torch_checkpointing that referenced this pull request Nov 13, 2026
Test Plan:
tests/test_filesystem_storage_direct_io.py patches _O_DIRECT to None and checks that the writer falls back, that a storage write/read round trip works, and that a ReadArgs(direct_io=True) read is served by a plain buffered file.

On macOS 15 (Apple Silicon, torch 2.16 nightly CPU) tests/test_checkpoint_writer.py tests/test_checkpoint_reader.py tests/test_checkpoint_manager.py go from 12 failed to 2 failed / 68 passed, the two left fail on torch.mps lacking current_device under torch.accelerator.current_stream() in staging.py, which is separate. torchtitan's tests/unit_tests/cpu/components/checkpointer goes from 2 failed to 125 passed (torchtitan pins dcbb3a5, see pytorch/torchtitan#5467).

Internal (added on import): a `genai_uv_test` target for the new test file in `torch_checkpointing/tests/BUCK`, which fixes the `buck_verification` orphan-file failure. `BUCK` is stripped on export, so the exported commit contains only the PR's two files.
`buck2 test fbsource//genai/msl/checkpointing/torch_checkpointing/tests:test_filesystem_storage_direct_io fbsource//genai/msl/checkpointing/torch_checkpointing/tests:test_local_filesystem fbsource//genai/msl/checkpointing:torch_checkpointing-static-type-checking fbsource//genai/msl/checkpointing:buck_verification`: Pass 125, Fail 0, including both new tests and `__orphan_files__`. https://www.internalfb.com/intern/testinfra/testrun/28991922656875489

fbshipit-source-id: 024e146ce3802dc90b48eb61d606ba21751f813b
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 ciflow/rl 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