trunk/7c2c0e74f0c47de0f7458a501af087c34ec61407
[SDPA] Fix 32-bit key/value offset overflow in mem-efficient attentio…
[SDPA] Fix 32-bit key/value offset overflow in mem-efficient attentio…
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Background op_overrides / op_allowlist / set_test_configs() (#176264, #181703, #181554) let out-of-tree (PrivateUse1) backends reuse OpInfo-based test suites through pure configuration. This PR brings @modules to parity with @ops. Changes Add module_overrides / module_allowlist to DeviceTypeTestBase and apply them in the modules parametrizer; Add a generic ModuleInfo.dtypesIf dict so any backend c…
Fix ApproximateClockToUnixTimeConverter pre-calibration timestamp con…
Fixes #202777 Removing the small-input CPU fallback seems to improve performance on average, according to the following script (co-authored by Claude): Click to expand import argparse import itertools import torch import torch.utils.benchmark as benchmark SHAPES = [] for n in range(1, 112, 2): for b in range(1, 112, 10): if b * n * n < 12288: SHAPES.append((b, n, n)) DTYPES = { "float32": torch.fl…
Summary: The AVX2/AVX512 exp_u20 fast path builds 2^n by writing exponent bits, which cannot produce a subnormal, and it clamped at ln(FLT_MIN). So it returned 0 for every input whose exp is subnormal, and also for [-87.34, -86.99), where exp is still a normal float. It also turned NaN into exp(88.72). Fix the fast path instead of falling back to the scalar exp(): Split ln(2) (Cody-Waite) so the r…
Fixes #201116 The triton interpreter failed with an error when running with PDL enabled. This fixes the bug by disabling PDL when running the interpreter. Used AI assistance Pull Request resolved: #202140 Approved by: https://github.com/eellison
Summary: LLVM 24 removed the AllocTy parameter from IRBuilder::CreateMalloc. Add a >=24 branch using the new overload while preserving older LLVM behavior. Test Plan: arc lint -a AI Assistant: Authored with an AI assistant. Reviewed By: albanD Differential Revision: D127193470 Pull Request resolved: #201870 Approved by: https://github.com/albanD
Linked issue or supporting maintainer Fixes #167818 BC-breaking? No Summary (human written only) See #167818. Agent details (if applicable) Drafted by Claude (AI) for @egeboy35. RegisterMeta defines at::meta:: wrappers for unstructured inplace ops that have no Meta kernel of their own (gen_unstructured generates one). With per-operator headers, operator_headers() includes <op>_meta_dispatch.h only…
Summary (human written only) Expose Aten cudagraph and mempool interfaces in the C shim, to prepare for upcoming AOTI cudagraph support. Agent details This PR was authored with an AI assistant (Claude Code). Everything in this section is AI-generated. Adds C shim functions that wrap at::cuda::MemPool and at::cuda::CUDAGraph (create and delete a pool and a graph, capture_begin, capture_end, replay)…
Pretty straight forward, migrates weight norm forward to meteal. Aggregated stats: n min geomean max 17 0.87x 1.85x 4.67x Model shape perfs: model layer weight shape dim main us PR us speedup HiFi-GAN conv_pre (512, 80, 7) 0 53.3 12.0 4.43x HiFi-GAN resblock k=3 (256, 256, 3) 0 35.2 13.7 2.57x HiFi-GAN resblock k=11 (256, 256, 11) 0 46.4 33.0 1.41x HiFi-GAN upsample ConvTranspose1d (512, 256, 16)…
Calling SomeClass.mro() currently graph breaks in Dynamo with gb0156, while accessing SomeClass.__mro__ is already supported. This adds a fast path for classes using the default type.mro implementation. When type(cls) is type and no class in the MRO defines mro, the call returns a new list built from __mro__, with a DICT_NOT_CONTAINS("mro") guard for each MRO entry. CPython recomputes __mro__ usin…
The automated review runs offline and is shown only the diff, the checkout and /tmp/pr-comments.json (title, description, author, comments). It never sees the PR's labels, so a finding that asks for a label cannot tell whether it is already there. On #203059 it asked three times for ciflow/docker and ciflow/binaries (reviews at 20:38 and 00:02) although ciflow/docker had been added by pytorch-bot…
Part of #192126 Adds Dynamo support for bytearray.find and bytearray.rfind, the first two methods of the search-method family tracked in the issue. startswith / endswith will follow in a separate PR. Implementation Both methods live on ByteArrayVariable in torch/_dynamo/variables/lists.py and share one _bytearray_search helper, which the existing bytearray_count now uses as well: positional-only,…
Pull Request resolved: #203201 Approved by: https://github.com/malfet ghstack dependencies: #203060
Fixes #202042 Summary Formerly, the torch.compiler tracing flags were module globals, so any thread read True while any one thread compiled, and interleaved torch.compile and non-strict torch.export sessions in different threads could leave the flags stuck True. This PR moves the flags into per-thread TLS as named keys (torch.compiler.is_compiling / torch.compiler.is_exporting / torch.compiler.is_…
A broadcast producer is currently realized only if its op count exceeds realize_opcount_threshold, so a moderately expensive per-row value broadcast over a wide consumer is inlined and recomputed for every element. This PR also applies the read-count heuristic (realize_reads_threshold) once the broadcast is at least realize_broadcast_reuse_threshold (default 64) wide. On the gpt-oss MoE down proje…
A broadcast producer is currently realized only if its op count exceeds realize_opcount_threshold, so a moderately expensive per-row value broadcast over a wide consumer is inlined and recomputed for every element. This PR also applies the read-count heuristic (realize_reads_threshold) once the broadcast is at least realize_broadcast_reuse_threshold (default 64) wide. On the gpt-oss MoE down proje…
The PR intel/torch-xpu-ops#5511 was merged, so grid sampler 3D with bicubic interpolation can be fully enabled on XPU. remove check_grid_sampler_3d version that asserts bicubic is not implemented update docstring in the torch.nn.functional.grid_sample function update skips and comments in test_nn.py Pull Request resolved: #198623 Approved by: https://github.com/guangyey, https://github.com/jansel
[Testcase Refactoring] Decouple test_fsdp_checkpoint from hard-coded …
[inductor] Fuse native matmul row reductions as a rank-2 persistent r…
[inductor] Fuse native matmul row reductions as a rank-2 persistent r…
[FlexAttention] Use fast dtypes for block-size and head-dim sweeps (#…
The native caching allocator keeps separate free-block lists for different CUDA streams. Each conditional body capture records its own per-capture CUDA DAG on a fresh primary capture stream. Without special handling, parent and conditional body captures cannot reuse each other’s dead blocks. The previous commit records their relationship in the conditional capture tree. A conditional body starts a…
This PR is to upgrade XPU oneDNN from v3.13.3 to v3.14. This upgrade mainly aims to bring below features for Intel Graphics Performance improvement Improved performance on Intel GPU D-Series (formerly Crescent Island). Improved performance on future integrated GPUs based on Xe3p-LPG architecture (codename Nova Lake P). Improved performance of Scaled Dot Product Attention (SDPA) training forward an…
CUDA graph capture records GPU work and dependencies. The nodes recorded into one cudaGraph_t form a per-capture CUDA DAG. A conditional body capture records a separate DAG. One root capture and all of its conditional body captures form a conditional capture tree. The native caching allocator previously knew only how many captures were active. Add one CaptureState per CUDA capture ID. Each state r…