Skip to content

Make Generator an Opaque Object - #179661

Closed
yushangdi wants to merge 22 commits into
gh/yushangdi/23/basefrom
gh/yushangdi/23/head
Closed

yushangdi wants to merge 22 commits into
gh/yushangdi/23/basefrom
gh/yushangdi/23/head

Conversation

@yushangdi

@yushangdi yushangdi commented Apr 8, 2026 •

Copy link
Copy Markdown
Contributor

Stack from ghstack (oldest at bottom):

Summary

Replaces the OpaqueGenerator Python wrapper from #179658 by making
torch._C.Generator itself a proper opaque reference type. This eliminates the
wrapper class entirely.

C++ changes to THPGenerator:

  • Set OpaqueBaseMeta as the metaclass (same pattern as ProcessGroup)
  • Add weakref support (tp_weaklistoffset + weakreflist field)
  • Add tp_richcompare (identity-based __eq__/__ne__)
  • Add tp_hash (identity-based)
  • Add __fx_repr__ method for FX codegen

Also fixes THPModule_addDocStr to use PyType_Check(obj) instead of
Py_TYPE(obj) == &PyType_Type, since Generator's metaclass is now
OpaqueBaseMeta rather than type.

With these changes, torch._C.Generator is registered directly via
register_opaque_type(torch._C.Generator, typ="value") and flows through
make_fx, FX codegen, and the repro infrastructure without any wrapper.

Authored with Claude.

Test plan

  • python test/dynamo/test_after_aot.py (all 6 tests)
  • python test/inductor/test_torchinductor.py -k test_randn_generator_cuda
  • python test/test_opaque_obj_v2.py TestOpaqueGenerator (make_fx + correctness)
  • python test/test_torch.py -k test_pickle_generator (generator can be pickled)
  • python test/dynamo/test_dynamic_shapes.py -k test_user_getattr1_dynamic_shapes
  • python agent_space/repro.py (end-to-end repro)
  • python test/test_fx.py -k test_impure_random (Generator is a C type, it has init without code)
  • python test/dynamo/test_misc.py -k test_torch_generator_initial_seed

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @kadeng @muchulee8 @amjames @chauhang @aakhundov @coconutruben @jataylo @Lucaskabela @azahed98

@pytorch-bot

pytorch-bot Bot commented Apr 8, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/179661

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 10 New Failures, 179 Pending, 2 Unrelated Failures

As of commit f533214 with merge base f11ab64 (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

BROKEN TRUNK - The following job failed but was present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

UNSTABLE - The following jobs are marked as unstable, possibly due to flakiness on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

yushangdi added a commit that referenced this pull request Apr 8, 2026
ghstack-source-id: 55496c1
Pull Request resolved: #179661
@pytorch-bot

pytorch-bot Bot commented Apr 8, 2026

Copy link
Copy Markdown

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@yushangdi
yushangdi requested a review from angelayi April 8, 2026 03:35
Comment thread torch/csrc/Generator.cpp Outdated
auto& gen = (reinterpret_cast<THPGenerator*>(_self))->cdata;
auto device = gen.device();
auto repr = fmt::format(
"torch.cuda.default_generators[{}].clone_state()", device.index());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it seems like generators can support any device. wouldnt this hardcode cuda?

Comment thread torch/_prims/rng_prims.py Resolved
yushangdi added a commit that referenced this pull request Apr 8, 2026
ghstack-source-id: 55496c1
Pull Request resolved: #179661
### Summary

Replaces the `OpaqueGenerator` Python wrapper from  #179658 by making
`torch._C.Generator` itself a proper opaque value type. This eliminates the
wrapper class entirely.

C++ changes to `THPGenerator`:
- Set `OpaqueBaseMeta` as the metaclass (same pattern as `ProcessGroup`)
- Add weakref support (`tp_weaklistoffset` + `weakreflist` field)
- Add `tp_richcompare` (identity-based `__eq__`/`__ne__`)
- Add `tp_hash` (identity-based)
- Add `__fx_repr__` method for FX codegen

Also fixes `THPModule_addDocStr` to use `PyType_Check(obj)` instead of
`Py_TYPE(obj) == &PyType_Type`, since Generator's metaclass is now
`OpaqueBaseMeta` rather than `type`.

With these changes, `torch._C.Generator` is registered directly via
`register_opaque_type(torch._C.Generator, typ="value")` and flows through
`make_fx`, FX codegen, and the repro infrastructure without any wrapper.

Authored with Claude.

### Test plan

- `python test/dynamo/test_after_aot.py` (all 6 tests)
- `python test/inductor/test_torchinductor.py -k test_randn_generator_cuda`
- `python test/test_opaque_obj_v2.py TestOpaqueGenerator` (make_fx + correctness)
- `python agent_space/repro.py` (end-to-end repro)


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo Lucaskabela azahed98

[ghstack-poisoned]
yushangdi added a commit that referenced this pull request Apr 8, 2026
ghstack-source-id: 3c114cd
Pull Request resolved: #179661
Comment thread torch/_dynamo/variables/builder.py Outdated
value,
source=self.source,
)
elif isinstance(value, torch._C.Generator):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the issues with going through the TorchScriptObjectVariable? or you just want to leave this as a TODO for later? If so can you leave a comment?

@yushangdi yushangdi Apr 8, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TorchScriptObjectVariable path assumes the object can be converted to a FakeScriptObject via
maybe_to_fake_obj (line 1613 in builder.py), which doesn't work for Generator yet, and cause a segfault. Probably because MemberType.USE_REAL and MemberType.INLINED are not properly setup. For now I don't need it to work with dynamo, so I just error out. I can add a TODO.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tried to fix that, but then there is another issue:

fake tensor execution can't use a
FakeScriptObject as a real generator — ops like torch.randn(generator=...) actually invoke the
generator during tracing. Fixing that would require teaching the fake tensor layer to pass
through the real generator (from FakeScriptObject.real_obj) when it sees an opaque Generator,
which is a larger follow-up.

@yushangdi
yushangdi requested a review from angelayi April 8, 2026 20:18
### Summary

Replaces the `OpaqueGenerator` Python wrapper from  #179658 by making
`torch._C.Generator` itself a proper opaque value type. This eliminates the
wrapper class entirely.

C++ changes to `THPGenerator`:
- Set `OpaqueBaseMeta` as the metaclass (same pattern as `ProcessGroup`)
- Add weakref support (`tp_weaklistoffset` + `weakreflist` field)
- Add `tp_richcompare` (identity-based `__eq__`/`__ne__`)
- Add `tp_hash` (identity-based)
- Add `__fx_repr__` method for FX codegen

Also fixes `THPModule_addDocStr` to use `PyType_Check(obj)` instead of
`Py_TYPE(obj) == &PyType_Type`, since Generator's metaclass is now
`OpaqueBaseMeta` rather than `type`.

With these changes, `torch._C.Generator` is registered directly via
`register_opaque_type(torch._C.Generator, typ="value")` and flows through
`make_fx`, FX codegen, and the repro infrastructure without any wrapper.

Authored with Claude.

### Test plan

- `python test/dynamo/test_after_aot.py` (all 6 tests)
- `python test/inductor/test_torchinductor.py -k test_randn_generator_cuda`
- `python test/test_opaque_obj_v2.py TestOpaqueGenerator` (make_fx + correctness)
- ` python test/test_torch.py -k test_pickle_generator` (generator can be pickled)
- `python test/dynamo/test_dynamic_shapes.py -k test_user_getattr1_dynamic_shapes`
- `python agent_space/repro.py` (end-to-end repro)


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo Lucaskabela azahed98

[ghstack-poisoned]
yushangdi added a commit that referenced this pull request Apr 8, 2026
ghstack-source-id: 2449d7d
Pull Request resolved: #179661

@colesbury colesbury left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few drive-by comments

Comment thread torch/csrc/Generator.cpp Resolved
Comment thread torch/csrc/Generator.cpp Resolved
Comment thread torch/csrc/Generator.cpp Resolved
Comment thread torch/csrc/Generator.cpp Outdated
PyObject* module_name = PyUnicode_FromString("torch._C");
if (!module_name)
return false;
PyDict_SetItemString(THPGeneratorType.tp_dict, "__module__", module_name);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably check the return value of PyDict_SetItemString for errors here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to

  if (PyDict_SetItemString(
          THPGeneratorType.tp_dict, "__module__", module_name) < 0)
    return false;

Comment thread torch/csrc/Generator.cpp Resolved
Comment thread torch/csrc/Module.cpp Outdated

// force ATen to initialize because it handles
// setting up TH Errors so that they throw C++ exceptions
// setting up TH Errors so that they throw C++ exceptions // @allow-raw-throw

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the linter forcing this? :-(

cc @albanD

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is actually a false positive, removed.

I do see the following error when the other raw-throw are not marked, but if I mark the other two, this one does not need to be marked.

  Error (RAWTHROW) raw throw statement
    Do not use raw `throw` in C++ code. Use TORCH_CHECK, TORCH_CHECK_WITH,
    C10_THROW_ERROR, or other error-reporting macros instead. See c10/
    util/Exception.h for available macros. If this is a re-throw (throw;),
    restructure the code to avoid try/catch/throw or add the file to the
    RAWTHROW exclude list in .lintrunner.toml with justification.

        2382  |  ASSERT_TRUE(set_module_attr("has_spectral", has_spectral));
        2383  |
        2384  |  // force ATen to initialize because it handles
    >>> 2385  |  // setting up TH Errors so that they throw C++ exceptions
        2386  |  at::init();
        2387  |
        2388  |  // Automatically translate errors thrown from pybind11 functions

Comment thread torch/csrc/Generator.cpp Outdated
bool THPGenerator_init(PyObject* module) {
// Set OpaqueBaseMeta as the metaclass so Generator can be registered as an
// opaque type for FX tracing (same pattern as ProcessGroup).
PyObject* opaque_module = PyImport_ImportModule("torch._opaque_base");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This leaks on errors/exceptions below. You can avoid it with THPObjectPtr or similar.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to below:

  auto opaque_module =
      THPObjectPtr(PyImport_ImportModule("torch._opaque_base"));
  TORCH_CHECK(opaque_module, "Failed to import torch._opaque_base");
  auto opaque_base_meta =
      THPObjectPtr(PyObject_GetAttrString(opaque_module, "OpaqueBaseMeta"));
  TORCH_CHECK(opaque_base_meta, "Failed to get OpaqueBaseMeta");
  Py_SET_TYPE(&THPGeneratorType, (PyTypeObject*)opaque_base_meta.get());
  // Prevent THPObjectPtr from decref-ing; the ref is now owned by ob_type.
  opaque_base_meta.release();

@yushangdi yushangdi added the ciflow/trunk Trigger trunk jobs on your pull request label Apr 8, 2026
### Summary

Replaces the `OpaqueGenerator` Python wrapper from  #179658 by making
`torch._C.Generator` itself a proper opaque value type. This eliminates the
wrapper class entirely.

C++ changes to `THPGenerator`:
- Set `OpaqueBaseMeta` as the metaclass (same pattern as `ProcessGroup`)
- Add weakref support (`tp_weaklistoffset` + `weakreflist` field)
- Add `tp_richcompare` (identity-based `__eq__`/`__ne__`)
- Add `tp_hash` (identity-based)
- Add `__fx_repr__` method for FX codegen

Also fixes `THPModule_addDocStr` to use `PyType_Check(obj)` instead of
`Py_TYPE(obj) == &PyType_Type`, since Generator's metaclass is now
`OpaqueBaseMeta` rather than `type`.

With these changes, `torch._C.Generator` is registered directly via
`register_opaque_type(torch._C.Generator, typ="value")` and flows through
`make_fx`, FX codegen, and the repro infrastructure without any wrapper.

Authored with Claude.

### Test plan

- `python test/dynamo/test_after_aot.py` (all 6 tests)
- `python test/inductor/test_torchinductor.py -k test_randn_generator_cuda`
- `python test/test_opaque_obj_v2.py TestOpaqueGenerator` (make_fx + correctness)
- ` python test/test_torch.py -k test_pickle_generator` (generator can be pickled)
- `python test/dynamo/test_dynamic_shapes.py -k test_user_getattr1_dynamic_shapes`
- `python agent_space/repro.py` (end-to-end repro)


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo Lucaskabela azahed98

[ghstack-poisoned]
yushangdi added a commit that referenced this pull request Apr 8, 2026
ghstack-source-id: 8dde227
Pull Request resolved: #179661
@yushangdi
yushangdi requested a review from colesbury April 8, 2026 21:55
### Summary

Replaces the `OpaqueGenerator` Python wrapper from  #179658 by making
`torch._C.Generator` itself a proper opaque value type. This eliminates the
wrapper class entirely.

C++ changes to `THPGenerator`:
- Set `OpaqueBaseMeta` as the metaclass (same pattern as `ProcessGroup`)
- Add weakref support (`tp_weaklistoffset` + `weakreflist` field)
- Add `tp_richcompare` (identity-based `__eq__`/`__ne__`)
- Add `tp_hash` (identity-based)
- Add `__fx_repr__` method for FX codegen

Also fixes `THPModule_addDocStr` to use `PyType_Check(obj)` instead of
`Py_TYPE(obj) == &PyType_Type`, since Generator's metaclass is now
`OpaqueBaseMeta` rather than `type`.

With these changes, `torch._C.Generator` is registered directly via
`register_opaque_type(torch._C.Generator, typ="value")` and flows through
`make_fx`, FX codegen, and the repro infrastructure without any wrapper.

Authored with Claude.

### Test plan

- `python test/dynamo/test_after_aot.py` (all 6 tests)
- `python test/inductor/test_torchinductor.py -k test_randn_generator_cuda`
- `python test/test_opaque_obj_v2.py TestOpaqueGenerator` (make_fx + correctness)
- ` python test/test_torch.py -k test_pickle_generator` (generator can be pickled)
- `python test/dynamo/test_dynamic_shapes.py -k test_user_getattr1_dynamic_shapes`
- `python agent_space/repro.py` (end-to-end repro)


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo Lucaskabela azahed98

[ghstack-poisoned]
yushangdi added a commit that referenced this pull request Apr 8, 2026
ghstack-source-id: 8005de9
Pull Request resolved: #179661
Comment thread torch/csrc/Generator.cpp Outdated
Comment on lines +367 to +369
Py_SET_TYPE(&THPGeneratorType, (PyTypeObject*)opaque_base_meta.get());
// Prevent THPObjectPtr from decref-ing; the ref is now owned by ob_type.
opaque_base_meta.release();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's usually good practice to combine "release()" with the thing that takes ownership, i.e.:

Py_SET_TYPE(&THPGeneratorType, (PyTypeObject*)opaque_base_meta.release());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the above minor comment, all the Python C API stuff looks good to me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks! updated.

### Summary

Replaces the `OpaqueGenerator` Python wrapper from  #179658 by making
`torch._C.Generator` itself a proper opaque reference type. This eliminates the
wrapper class entirely.

C++ changes to `THPGenerator`:
- Set `OpaqueBaseMeta` as the metaclass (same pattern as `ProcessGroup`)
- Add weakref support (`tp_weaklistoffset` + `weakreflist` field)
- Add `tp_richcompare` (identity-based `__eq__`/`__ne__`)
- Add `tp_hash` (identity-based)
- Add `__fx_repr__` method for FX codegen

Also fixes `THPModule_addDocStr` to use `PyType_Check(obj)` instead of
`Py_TYPE(obj) == &PyType_Type`, since Generator's metaclass is now
`OpaqueBaseMeta` rather than `type`.

With these changes, `torch._C.Generator` is registered directly via
`register_opaque_type(torch._C.Generator, typ="value")` and flows through
`make_fx`, FX codegen, and the repro infrastructure without any wrapper.

Authored with Claude.

### Test plan

- `python test/dynamo/test_after_aot.py` (all 6 tests)
- `python test/inductor/test_torchinductor.py -k test_randn_generator_cuda`
- `python test/test_opaque_obj_v2.py TestOpaqueGenerator` (make_fx + correctness)
- ` python test/test_torch.py -k test_pickle_generator` (generator can be pickled)
- `python test/dynamo/test_dynamic_shapes.py -k test_user_getattr1_dynamic_shapes`
- `python agent_space/repro.py` (end-to-end repro)


cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx ipiszy kadeng muchulee8 amjames chauhang aakhundov coconutruben jataylo Lucaskabela azahed98

[ghstack-poisoned]
yushangdi added a commit that referenced this pull request Apr 8, 2026
ghstack-source-id: a2a1eba
Pull Request resolved: #179661
@yushangdi yushangdi added the topic: not user facing topic category label Apr 8, 2026
[ghstack-poisoned]
yushangdi added a commit that referenced this pull request Apr 22, 2026
ghstack-source-id: 589bb1c
Pull Request resolved: #179661

Remove dependency on torch._C
[ghstack-poisoned]
yushangdi added a commit that referenced this pull request Apr 22, 2026
ghstack-source-id: ecedc88
Pull Request resolved: #179661

Remove dependency on torch._C
@atalman atalman added the ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR label Apr 22, 2026
@atalman

atalman commented Apr 22, 2026 •

Copy link
Copy Markdown
Collaborator

Hi @yushangdi please test windows wheel builds on this PR we suspect it broke these earlier today when it landed. Errors can be seen here: #181160

Claude explanation:

Error (wheel-py3_12-cpu-test, job 72585097695):
  OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failed.
  Error loading "torch\lib\torch_python.dll" or one of its dependencies.

  This is thrown during _load_dll_libraries() — Windows runs torch_python.dll's DllMain
   and it fails.

  Environment is identical across both builds — MSVC 19.42.34444.0, Python 3.12.0,
  mkl-static-2025.3.1, intel-openmp-2025.3.3, libiomp5md.lib, same 27 DLLs bundled in
  torch/lib/.

  What actually differs in torch_python.dll: diff of torch/csrc/Generator.h and
  torch/csrc/Generator.cpp between ed7320d3 (works) and dff16f08 (fails):

  // Generator.h — added field:
    PyObject* weakreflist;

  // Generator.cpp — NEW code in THPGenerator_init (runs at torch._C import):
    self_->weakreflist = nullptr;
    PyObject_ClearWeakRefs(_self);
    offsetof(THPGenerator, weakreflist), /* tp_weaklistoffset */  // was 0

    // And most importantly — changes the Generator metaclass at runtime:
    auto opaque_module = THPObjectPtr(PyImport_ImportModule("torch._opaque_base"));
    TORCH_CHECK(opaque_module, "Failed to import torch._opaque_base");
    auto opaque_base_meta = THPObjectPtr(PyObject_GetAttrString(opaque_module,
  "OpaqueBaseMeta"));
    Py_SET_TYPE(&THPGeneratorType, (PyTypeObject*)opaque_base_meta.release());

Why this breaks Windows wheel: the new init path runs at import time (not DllMain),
  but import-time code in THPGenerator_init imports torch._opaque_base during torch._C
  module init. On Windows with the specific MSVC/pybind11/Python 3.12 combination, that
   cross-module import during type registration triggers a reentrant DLL load path that
   fails. The build doesn't fail because the link is fine — the init order is.

@yushangdi

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -i

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10-mi355 / test (distributed, 1, 3, linux.rocm.gpu.gfx950.2)

Details for Dev Infra team Raised by workflow job

@yushangdi

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -i

@atalman

atalman commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

@pytorchmergebot revert -c "sorry need to revert again, not sure why windows builds where not executed"

@pytorch-bot

pytorch-bot Bot commented Apr 24, 2026

Copy link
Copy Markdown

❌ 🤖 pytorchbot command failed:

@pytorchbot revert: error: argument -c/--classification: invalid choice: 'sorry need to revert again, not sure why windows builds where not executed' (choose from 'nosignal', 'ignoredsignal', 'landrace', 'weird', 'ghfirst', 'autorevert')

usage: @pytorchbot revert -m MESSAGE -c
                          {nosignal,ignoredsignal,landrace,weird,ghfirst,autorevert}

Try @pytorchbot --help for more info.

@atalman

atalman commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

@pytorchmergebot revert -c nosignal -m "sorry need to revert again, not sure why windows builds where not executed"

@atalman

atalman commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@yushangdi your PR has been successfully reverted.

@atalman

atalman commented Apr 24, 2026

Copy link
Copy Markdown
Collaborator

@pytorchmergebot rebase -b main

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/main. Check the current status here

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Rebase failed due to

Aborting rebase because rebasing the branch resulted in the same sha as the target branch.
This usually happens because the PR has already been merged.  Please rebase locally and push.

Raised by https://github.com/pytorch/pytorch/actions/runs/24898359182

[ghstack-poisoned]
@yushangdi

Copy link
Copy Markdown
Contributor Author

@pytorchbot merge -f "reland, reverted because another PR caused windows build fail and we got confused"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@yushangdi

Copy link
Copy Markdown
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-td Do not run TD on this PR ciflow/binaries_wheel Trigger binary build and upload jobs for wheel on the PR ciflow/inductor ciflow/torchtitan Run TorchTitan integration tests ciflow/trunk Trigger trunk jobs on your pull request Merged module: dynamo module: inductor Reverted topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants