Selected changesmerged Oct 23, 2026 – Oct 29, 2026
feat(common): add build_module for configurable sub-module blocksPython · 87 + / 2 −
Introduces 6 new declarations in nemo/collections/common/parts/utils.py.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
nemo/collections/common/parts/utils.py ↗ · 2 files
@@ -35,8 +47,81 @@ "swish": nn.SiLU, "silu": nn.SiLU, "gelu": nn.GELU,+ "squared_relu": SquaredReLU, } +ModuleBlock = Callable[..., nn.Module] | functools.partial | Mapping+++def build_module(block: ModuleBlock, **defaults: Any) -> nn.Module:+ """Instantiate a configurable sub-module of a parent module.++ Args:+ block: what builds the module:+ a class or callable returning it,+ a ``functools.partial`` of one+ (what Hydra creates for a config section with ``_target_`` and ``_partial_: true``),+ or such a config section itself, resolved through ``safe_instantiate``.+ defaults: the arguments the parent supplies, such as sizes and dropout rates;+ arguments bound in the partial or the section take precedence, by keyword or by position,+ so a section only names what deviates from the parent's defaults.++ Returns:+ The instantiated module.+ """+ if isinstance(block, Mapping):+ block = _section_partial(block)+ if isinstance(block, functools.partial):+ positional = _positional_names(block)+ keywords = {name: value for name, value in defaults.items() if name not in positional}+ keywords.update(block.keywords)+ return block.func(*block.args, **keywords)+ return block(**defaults)
Train adapters on top of FP8 weightsPython · 78 + / 43 −
Introduces 7 new declarations in src/transformers/integrations/finegrained_fp8.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
src/transformers/integrations/finegrained_fp8.py ↗ · 3 files
@@ -282,6 +282,63 @@ def fp8_linear( return finegrained_fp8_linear(input, weight, weight_scale_inv, block_size, bias, activation_scale) +def _dequantize_fp8_weight(+ weight: torch.Tensor, weight_scale_inv: torch.Tensor, block_size: list[int] | None, dtype: torch.dtype+) -> torch.Tensor:+ """Dequantize `(..., N, K)` FP8 weights with their per-block (or per-tensor) scales, for the backward pass."""+ if weight.dtype == torch.int8:+ raise NotImplementedError("Backward through FP4 weights is not supported.")+ scale = weight_scale_inv.to(dtype)+ if block_size is not None:+ rows, cols = weight.shape[-2:]+ scale = scale.repeat_interleave(block_size[0], dim=-2)[..., :rows, :]+ scale = scale.repeat_interleave(block_size[1], dim=-1)[..., :cols]+ return weight.to(dtype).mul_(scale)+++class FP8LinearFunction(torch.autograd.Function):+ """+ `fp8_linear` with a backward for the input, so adapters (e.g. LoRA) can train on top of FP8 layers. The FP8 weights+ are frozen: the input gradient goes through the dequantized weight, and the weight, scales and bias get none.+ """++ @staticmethod+ def forward(ctx, input, weight, weight_scale_inv, block_size, bias, activation_scale, allow_deepgemm):+ ctx.save_for_backward(weight, weight_scale_inv)+ ctx.block_size = block_size+ return fp8_linear(input, weight, weight_scale_inv, block_size, bias, activation_scale, allow_deepgemm)++ @staticmethod+ def backward(ctx, grad_output):+ weight, weight_scale_inv = ctx.saved_tensors+ weight = _dequantize_fp8_weight(weight, weight_scale_inv, ctx.block_size, grad_output.dtype)
ENH: Add `np.ma.assert_array_equal`Python · 125 + / 1 −
Introduces 3 new declarations in numpy/ma/core.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
numpy/ma/core.py ↗ · 7 files
@@ -8744,6 +8745,129 @@ def allclose(a, b, masked_equal=True, rtol=1e-5, atol=1e-8): return np.all(d) +def assert_array_equal(actual, desired, err_msg='', verbose=True, *,+ strict=False):+ """+ Raises an AssertionError if two masked arrays are not equal.++ Given two array_like objects, check that their masks are equal and that+ their data is equal wherever it is not masked. Unlike+ `numpy.testing.assert_array_equal`, which ignores masked values, a value+ that is masked in only one of the objects is reported as a mismatch.+ Objects that are not masked arrays are treated as having no masked+ values. As in `numpy.testing.assert_array_equal`, NaNs in the same+ unmasked positions are considered equal, and a scalar is compared with+ every element of an array unless `strict` is set.++ .. versionadded:: 2.6.0++ Parameters+ ----------+ actual : array_like+ The actual object to check.+ desired : array_like+ The desired, expected object.+ err_msg : str, optional+ The error message to be printed in case of failure.+ verbose : bool, optional+ If True, the conflicting values are appended to the error message.+ strict : bool, optional+ If True, raise an AssertionError when either the shape or the data+ type of the array_like objects does not match, and disable the+ special handling of scalars.
ENH: implement ExtensionArray.__array_function__ (GH#26380)Python · 80 + / 0 −
Introduces 4 new declarations in pandas/core/arrays/base.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
pandas/core/arrays/base.py ↗ · 5 files
@@ -3235,6 +3268,53 @@ def _groupby_first_last( return self.take(result_indices, allow_fill=True) +# -----------------------------------------------------------------------------+# __array_function__ helpers++# True while ExtensionArray.__array_function__ is handling a call+_IN_ARRAY_FUNCTION = contextvars.ContextVar("_IN_ARRAY_FUNCTION", default=False)+++# Overrides so these keep the extension dtype. Returning NotImplemented falls+# back to numpy's implementation.+++def _delete(arr, obj, axis=None):+ # the ExtensionArray may be obj rather than arr+ if (+ not isinstance(arr, ExtensionArray)+ or arr.ndim != 1+ or axis not in (None, 0, -1)+ ):+ return NotImplemented+ return arr.delete(obj)+++def _concatenate(arrays, axis=0, out=None, dtype=None, casting="same_kind"):+ if (+ not isinstance(arrays, (list, tuple))+ or not arrays+ or axis not in (None, 0, -1)+ or out is not None+ or dtype is not None+ or casting != "same_kind"
Turbopack: fix trailing-slash package root resolutionRust · 118 + / 10 −
Introduces 3 new declarations in turbopack/crates/turbopack-core/src/resolve/mod.rs.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
turbopack/crates/turbopack-core/src/resolve/mod.rs ↗ · 6 files
@@ -3908,6 +3914,108 @@ mod tests { .await; } + #[rstest::rstest]+ #[case::main(rcstr!("package").into(), r#"{"main":"./main.js"}"#, vec![("package", "main.js")])]+ #[case::main_trailing_slash(rcstr!("package/").into(), r#"{"main":"./main.js"}"#, vec![("package/", "main.js")])]+ #[case::index(rcstr!("package").into(), "{}", vec![("package", "index.js")])]+ #[case::index_trailing_slash(rcstr!("package/").into(), "{}", vec![("package/", "index.js")])]+ #[case::exports(rcstr!("package").into(), r#"{"exports":"./main.js"}"#, vec![("package", "main.js")])]+ #[case::exports_trailing_slash(rcstr!("package/").into(), r#"{"exports":"./main.js"}"#, vec![])]+ #[case::exports_subpath(rcstr!("package/subpath.js").into(), r#"{"exports":{"./subpath.js":"./main.js"}}"#, vec![("package/subpath.js", "main.js")])]+ #[case::dynamic_subpath(+ Pattern::concat([rcstr!("package/").into(), Pattern::Dynamic, rcstr!(".js").into()]),+ r#"{"main":"./main.js"}"#,+ vec![("package/index.js", "index.js"), ("package/main.js", "main.js"), ("package/subpath.js", "subpath.js")]+ )]+ #[case::dynamic_trailing_slash(+ Pattern::concat([rcstr!("package/").into(), Pattern::Dynamic]),+ r#"{"main":"./main.js"}"#,+ vec![+ ("package/", "main.js"),+ ("package/index", "index.js"), ("package/index.js", "index.js"),+ ("package/main", "main.js"), ("package/main.js", "main.js"),+ ("package/package", "package.json"), ("package/package.json", "package.json"),+ ("package/subpath", "subpath.js"), ("package/subpath.js", "subpath.js")+ ]+ )]+ #[case::dynamic_roots(+ Pattern::Alternatives(vec![+ rcstr!("package").into(),+ Pattern::concat([rcstr!("package/").into(), Pattern::Dynamic]),+ ]),+ r#"{"main":"./main.js"}"#,
[Fix] Fix NUMA and cpuset detection in CBPython · 80 + / 9 −
Introduces 3 new declarations in src/transformers/generation/continuous_batching/utils.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
src/transformers/generation/continuous_batching/utils.py ↗ · 2 files
@@ -319,6 +325,73 @@ def memory_pool_context(mem_pool: Any) -> AbstractContextManager: # --------------------------------------------------- MEMORY UTILS --------------------------------------------------- # +def _parse_numa_node_list(node_list: str) -> set[int]:+ """Parses a node list in the kernel format, e.g. "0-1,3" -> {0, 1, 3}."""+ nodes = set()+ for node_range in node_list.split(","):+ first_node, _, last_node = node_range.partition("-")+ nodes.update(range(int(first_node), int(last_node or first_node) + 1))+ return nodes+++def _get_allowed_numa_nodes() -> set[int]:+ """Returns the NUMA nodes the process can allocate memory from, i.e. the nodes allowed both by its cpuset (cgroups,+ `docker --cpuset-mems`, ...) and by its memory policy (`numactl --membind`, ...). Returns an empty set if they+ cannot be read, e.g. if we are not on Linux or there is no NUMA support."""+ allowed_sets: list[set[int]] = []++ # Retrieve the allowed nodes from the cpuset+ mems_allowed = None+ try:+ # The cpuset restricts memory to the nodes in "Mems_allowed_list: <nodes>"+ with open("/proc/self/status", encoding="utf-8", errors="replace") as f:+ for line in f:+ if line.startswith("Mems_allowed_list:"):+ mems_allowed = line.split(":")[1].strip()+ break+ except OSError:+ pass++ if mems_allowed is not None:+ allowed_sets.append(_parse_numa_node_list(mems_allowed))+
Pass initial events through input channel preparing for moving the initial event fetching to separate goroutineGo · 69 + / 34 −
Introduces 3 new declarations in staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher.go.
Adds new systems design rather than adjusting what was there. Tests changed with it, with code of their own.
staging/src/k8s.io/apiserver/pkg/storage/cacher/cache_watcher.go ↗ · 3 files
@@ -466,22 +472,60 @@ func (c *cacheWatcher) sendWatchCacheEvent(event *watchCacheEvent) (builtAt, sen return builtAt, sentAt } -func (c *cacheWatcher) process(ctx context.Context, cacheInterval *watchCacheInterval) {+func (c *cacheWatcher) process(ctx context.Context) { defer utilruntime.HandleCrashWithContext(ctx) defer close(c.result) defer c.Stop()+ initialized := false+ var resourceVersion uint64 - if err := c.processInitialEvents(cacheInterval); err != nil {- return+ for {+ select {+ case item, ok := <-c.input:+ if !ok {+ return+ }+ switch {+ case item.interval != nil:+ if initialized {+ klog.ErrorS(nil, "Unexpected interval after watch was already initialized", "resource", c.groupResource, "identifier", c.identifier)+ if consistency.PanicOnCacheInconsistency {+ panic(fmt.Sprintf("Unexpected interval after watch was already initialized, resource: %q, identifier: %q", c.groupResource, c.identifier))+ }+ return+ }+ if err := c.processInitialEvents(item.interval); err != nil {+ return+ }+ resourceVersion = item.interval.resourceVersion+ // At this point we already start processing incoming watch events.
zlib: skip the stream in sync convenience calls without optionsJavaScript · 162 + / 19 −
Introduces 8 new declarations in lib/zlib.js.
Adds new runtime rather than adjusting what was there. Tests changed with it, with code of their own.
lib/zlib.js ↗ · 2 files
@@ -176,43 +177,128 @@ function zlibBufferOnEnd() { this.cb(null, buf); } -function zlibBufferSync(engine, buffer) {+function toSyncInput(buffer) { if (typeof buffer === 'string') {- buffer = Buffer.from(buffer);- } else if (!isArrayBufferView(buffer)) {+ return Buffer.from(buffer);+ }+ if (!isArrayBufferView(buffer)) { if (isAnyArrayBuffer(buffer)) {- buffer = Buffer.from(buffer);- } else {- throw new ERR_INVALID_ARG_TYPE(- 'buffer',- ['string', 'Buffer', 'TypedArray', 'DataView', 'ArrayBuffer'],- buffer,- );+ return Buffer.from(buffer); }+ throw new ERR_INVALID_ARG_TYPE(+ 'buffer',+ ['string', 'Buffer', 'TypedArray', 'DataView', 'ArrayBuffer'],+ buffer,+ ); }+ return buffer;+}++function zlibBufferSync(engine, buffer) {+ buffer = toSyncInput(buffer); buffer = processChunkSync(engine, buffer, engine._finishFlushFlag);
parse inline and rustc_force_inline with same parserRust · 136 + / 106 −
Introduces 4 new declarations in compiler/rustc_attr_parsing/src/attributes/inline.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_attr_parsing/src/attributes/inline.rs ↗ · 3 files
@@ -3,125 +3,156 @@ use rustc_feature::AttributeStability; use rustc_lint_defs::builtin::{ILL_FORMED_ATTRIBUTE_INPUT, UNUSED_ATTRIBUTES}; use super::prelude::*;-use crate::diagnostics::{InlineForceInlineConflict, InlineIgnoredForExported};+use crate::diagnostics::{InlineForceInlineConflict, InlineIgnoredForExported, UnusedMultiple}; -pub(crate) struct InlineParser;+#[derive(Default)]+pub(crate) struct InlineParser(Option<(InlineAttr, Span)>); -impl SingleAttributeParser for InlineParser {- const PATH: &[Symbol] = &[sym::inline];- const ON_DUPLICATE: OnDuplicate = OnDuplicate::WarnButFutureError;- const ALLOWED_TARGETS: AllowedTargets<'_> = AllowedTargets::AllowList(&[- Allow(Target::Fn),- Allow(Target::Method(MethodKind::Inherent)),- Allow(Target::Method(MethodKind::Trait { body: true })),- Allow(Target::Method(MethodKind::TraitImpl)),- Allow(Target::Closure),- Allow(Target::Delegation { mac: false }),- Warn(Target::Method(MethodKind::Trait { body: false })),- Warn(Target::ForeignFn),- Warn(Target::Field),- Warn(Target::MacroDef),- Warn(Target::Arm),- Warn(Target::AssocConst(AssocCtxt::Impl { of_trait: false })),- Warn(Target::AssocConst(AssocCtxt::Trait)),- Warn(Target::AssocConst(AssocCtxt::Impl { of_trait: true })),- Warn(Target::MacroCall),- ]);- const TEMPLATE: AttributeTemplate = template!(- Word,- List: &["always", "never"],
suggest named lifetimes instead of `'_` in `use<...>` for E0700Rust · 247 + / 69 −
Introduces 13 new declarations in compiler/rustc_trait_selection/src/error_reporting/infer/region.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
compiler/rustc_trait_selection/src/error_reporting/infer/region.rs ↗ · 8 files
@@ -1169,6 +1110,101 @@ pub(super) fn note_and_explain_region<'tcx>( emit_msg_span(err, prefix, description, span, suffix); } +fn suggest_name_regions<'tcx>(+ tcx: TyCtxt<'tcx>,+ generic_param_scope: LocalDefId,+ lifetimes: &[Region<'tcx>],+ add_lt_suggs: &mut Vec<(Span, String)>,+) -> Option<Vec<String>> {+ struct LifetimeReplaceVisitor<'a> {+ new_lts: &'a [(LocalDefId, String)],+ add_lt_suggs: &'a mut Vec<(Span, String)>,+ }++ impl<'hir> hir::intravisit::Visitor<'hir> for LifetimeReplaceVisitor<'_> {+ fn visit_lifetime(&mut self, lt: &'hir hir::Lifetime) {+ if let hir::LifetimeKind::Param(def_id) = lt.kind+ && let Some((_, new_lt)) = self.new_lts.iter().find(|(id, _)| *id == def_id)+ {+ self.add_lt_suggs.push(lt.suggestion(new_lt));+ }+ }+ }++ let mut lifetime_scope = None;+ let mut used_names = vec![];+ let mut new_lts: Vec<(LocalDefId, String)> = vec![];+ let names: Vec<_> = lifetimes+ .iter()+ .map(|&lifetime| {+ let (lifetime_def_id, scope) =+ match tcx.is_suitable_region(generic_param_scope, lifetime) {+ Some(info) if !lifetime.is_named(tcx) => {
Add a CLI for reviewing agent feedbackTypeScript · 256 + / 0 −
Introduces 9 new declarations in packages/next/src/cli/internal/agent-feedback.ts.
Adds new framework internals rather than adjusting what was there. Tests changed with it, with code of their own.
packages/next/src/cli/internal/agent-feedback.ts ↗ · 7 files
@@ -0,0 +1,243 @@+import type { ChildProcess, SpawnOptions } from 'child_process'+import { addAbortSignal, type Readable } from 'stream'++import spawn from 'next/dist/compiled/cross-spawn'+import { z } from 'next/dist/compiled/zod'++const AGENT_FEEDBACK_REVIEW_URL = 'https://nextjs.org/agent-feedback#report='+const MAX_AGENT_FEEDBACK_INPUT_BYTES = 16 * 1024+const AGENT_FEEDBACK_INPUT_TIMEOUT_MS = 5_000++type SpawnReviewForm = (+ command: string,+ args: string[],+ options: SpawnOptions+) => ChildProcess++type FeedbackInput = Readable & {+ isTTY?: boolean+}++export type NextFeedbackOptions = {+ dryRun?: boolean+}++const agentFeedbackReportFields = {+ triggerReason: z.enum([+ 'unexpected-behavior',+ 'documentation-mismatch',+ 'misleading-error',+ 'repeated-failed-approach',+ 'non-obvious-workaround',+ ]),+ title: z.string().min(1).max(100),
feat(asr): native CTC loss kernel over sequence-packed log probabilitiesPython · 377 + / 4 −
Introduces 11 new declarations in nemo/collections/asr/parts/triton/ctc_loss.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
nemo/collections/asr/parts/triton/ctc_loss.py ↗ · 3 files
@@ -0,0 +1,337 @@+# Copyright (c) 2026, NVIDIA CORPORATION. All rights reserved.+#+# Licensed under the Apache License, Version 2.0 (the "License");+# you may not use this file except in compliance with the License.+# You may obtain a copy of the License at+#+# http://www.apache.org/licenses/LICENSE-2.0+#+# Unless required by applicable law or agreed to in writing, software+# distributed under the License is distributed on an "AS IS" BASIS,+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.+# See the License for the specific language governing permissions and+# limitations under the License.++"""CTC loss over sequence-packed log probabilities.++The log probabilities of a packed batch are one token-flat ``(T_total, D)`` buffer,+utterance ``b`` at the rows ``[cu_seqlens[b], cu_seqlens[b + 1])``.+The kernels read that buffer and write the gradient in the same layout,+so the loss needs neither the padded ``(B, T, D)`` copy that ``torch.nn.functional.ctc_loss`` takes+nor its padded gradient.++One program per utterance walks the utterance's frames.+The forward program runs the alpha recursion over the extended label sequence+``blank, l_1, blank, l_2, ..., l_U, blank`` (``S = 2 U + 1`` states, one lane per state)+and stores every alpha row into ``(T_total, S_max)``, as the padded kernel stores its ``(B, T, S)`` alphas.+The backward program runs the beta recursion from the last frame,+forms the state posteriors from the stored alphas,+and writes each frame's gradient row into the token-flat gradient:+``exp(log_probs) - posterior`` summed per class,+which is the gradient of the padded kernel+(the gradient with respect to the logits when ``log_probs`` is a ``log_softmax`` output).+The posteriors of the blank states are reduced in registers;