P

PyTorch

P
PyTorch AI

viable/strict/1785584542: Name the test that timed out in run_test.py logs (#191754)

When a test times out, CI logs today contain no way to tell what timed out on a line that also says it timed out. retry_shell prints Command took >30min, returning 124 which names nothing, so the log classifier -- which picks a single line and uses its capture as the HUD grouping key -- collapses every timeout in the fleet into one bucket. A single test file that starts hanging is invisible; it lo…

P
PyTorch AI

viable/strict/1785574758: Add largeMPSBufferTest for MPS maxBufferLength gating (#191751)

test_reductions_large_half_tensors was failing on the trunk macos-py3-arm64 default shard in a way that looked commit-induced (two adjacent SHAs red, then green) but is really a flaky skip gate. Root cause: the test is gated by largeTensorTest("8GB"), which on MPS reduces to psutil.virtual_memory().available >= 8GiB. On a 16GB m1-stable runner that sits right at the threshold, so the skip fires or…

P
PyTorch AI

trunk/2264afc35b2a313e9d20a18430a50a6a3e5991fd: Add overload of isFwGradDefined to avoid optional ctor (#191813)

isFwGradDefined is called a lot in torch/csrc/autograd/generated/VariableType*.cpp. Many of these calls pass a Tensor into the function. The original implementation of this function only accepted an optional. This forced a call to the optional constructor every time that function is called and an unnecessary call to optional::has_value() later. This commit adds an overload that accepts Tensor. I g…

P
PyTorch AI

trunk/b01be4f06bd0ebaaea0a5ca5c2bca5783e8209bb: [dynamo] Wrap module.compile leaf module call frames (#185722)

module.compile() installs torch.compile(self._call_impl). For built-in leaf modules such as Conv2d, both Module._call_impl and the module forward live in skip-rule files. The torch.compile(module) path already handles this by wrapping modules whose forward has a skip rule in wrap_inline, but module.compile() excluded _call_impl from top-level wrapping. This left no capturable frame, so a custom ba…

P
PyTorch AI

trunk/46b20026392d0c98b45a0a1c96d75bd823353169: [c10d] Validate all-to-all split sizes (#191511)

The nccl2 all-to-all path cast split sizes directly to unsigned values and only normalized the case where both split lists were empty. Negative values wrapped and malformed lists reached NCCL. Gloo and stock NCCL also bypassed leading-dimension validation when both lists were empty, allowing equal splits that did not divide the tensor along dimension zero. Apply the shared c10d split checks to eve…

P
PyTorch AI

trunk/1edebe6d2f83b6d319609e1c211abdd3936c3488: [CI] Pin apache-tvm-ffi to fix TVM docker image build (#191710)

To unblock #190927, which sees Docker builds for the TVM-enabled images (pytorch-linux-jammy-py3.{11,12,13}-clang21) started failing today with: OSError: .../tvm/lib/libtvm_runtime.so: undefined symbol: _ZN3tvm3ffi4json9StringifyERKNS0_3AnyENS0_8OptionalIivEE Root cause is a transitive dependency that was left free to float. #190799 pinned apache-tvm==0.25.0.post1, but that package declares apache…

P
PyTorch AI

ciflow/slow/191816: Skip test_vec_compare_op_cpu_only on GPU CI runners

This test is pure CPU vectorized codegen - it compiles comparison ops over a 2x9 CPU tensor and asserts on generated_cpp_vec_kernel_count. No CUDA kernel is ever launched. It nonetheless runs on the CUDA sm86 slow shards, where it takes ~57 minutes (measured 3429s and 3489s) with the a10g GPU idle throughout, because test selection in CI is per build config rather than per device: TEST_CONFIG=slow…

P
PyTorch AI

trunk/70147dd482f51f736c227969bf0e5b147c893b22: Route only TorchComms-owned backends through comms (#189069)

Summary: Add _torchcomms_handles_backend() and gate the TorchComms path (in init_process_group backend auto-qualification and _new_process_group_helper) on it. Backends TorchComms does not own -- custom c10d plugins such as mooncake -- then keep their native c10d creation path instead of being forced through new_comm. Built-in backends report via is_backend_built; dynamically registered adapters r…