Selected changesmerged Oct 27, 2026 – Nov 2, 2026
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)
BUG: f2py: mask string literals in depend harvest and fix sort orderPython · 100 + / 17 −
Introduces 3 new declarations in numpy/f2py/crackfortran.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
numpy/f2py/crackfortran.py ↗ · 8 files
@@ -2129,6 +2147,49 @@ def postcrack(block, args=None, tab=''): return block +def _sort_cyclic_dependents(dep, vars):+ """Order one cyclic depend group by real dependency edges.++ ``sortvarnames`` calls this only after a cycle has been reported.+ The usual f2py cycle is an input array dimensioned by hide scalars+ that are computed from that array (``n = shape(a, ...)``,+ ``lda = MAX(1, n)``). Those array-to-hide edges are dropped so+ ``getarrdims`` can blank them, and every remaining edge is honored+ by a topological sort. An initializer therefore runs after the+ names it uses, independent of declaration order.++ A cycle that is not one of those shape back-edges is left in+ ``dep`` order. The caller has already reported it. This function+ does not recurse.+ """+ remaining = set(dep)++ def blocking(name):+ var = vars[name]+ blocked_by = []+ for dep_name in var.get('depend') or []:+ if dep_name not in remaining or dep_name == name:+ continue+ target = vars.get(dep_name, {})+ # Dimension back-edge onto a hide value or an initializer.+ if (isarray(var) and isintent_nothide(var)+ and (isintent_hide(target) or '=' in target)):+ continue+ blocked_by.append(dep_name)+ return blocked_by
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.
Implement `advance_back_by` on `Fuse`Rust · 41 + / 0 −
Introduces 4 new declarations in library/core/src/iter/adapters/fuse.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
library/core/src/iter/adapters/fuse.rs ↗ · 2 files
@@ -358,6 +366,25 @@ where and_then_or_clear(&mut self.iter, |iter| iter.next_back()) } + #[inline]+ default fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>+ where+ I: DoubleEndedIterator,+ {+ let Some(iter) = &mut self.iter else {+ return match NonZero::new(n) {+ Some(n) => Err(n),+ None => Ok(()),+ };+ };++ let res = iter.advance_back_by(n);+ if res.is_err() {+ self.iter = None;+ }+ res+ }+ #[inline] default fn nth_back(&mut self, n: usize) -> Option<<I as Iterator>::Item> where
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: Protect math from markdown emphasis parsing in Markdown panePython · 58 + / 3 −
Introduces 10 new declarations in panel/pane/markup.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
panel/pane/markup.py ↗ · 3 files
@@ -38,6 +38,54 @@ # links, definition lists) or which breaks line offsets (\r). _NON_LOCAL_SYNTAX = re.compile(r'\[\^|\]:|^ {0,3}[:~][ \t]|\r', re.MULTILINE) +def _math_plugin(md: MarkdownIt) -> None:+ """+ Keeps math delimited by $$ verbatim, since the client-side+ MathJax pass runs on the rendered HTML and would otherwise see+ markup generated from characters such as '*' inside the math.+ """+ from mdit_py_plugins.dollarmath import dollarmath_plugin+ from mdit_py_plugins.dollarmath.index import math_inline_dollar++ dollarmath_plugin(md, allow_labels=False, double_inline=True)++ # The client only typesets $$, so single $ must stay ordinary text+ # (e.g. currency) and keep its surrounding emphasis.+ inline_rule = math_inline_dollar(True, True, True)++ def double_only(state, silent):+ if state.src[state.pos:state.pos + 2] != '$$':+ return False+ return inline_rule(state, silent)++ md.inline.ruler.at('math_inline', double_only)++ def raw(delimiter, block=False):+ def render(self, tokens, idx, options, env):+ math = escape(tokens[idx].content, quote=False)+ return f'{delimiter}{math}{delimiter}\n' if block else f'{delimiter}{math}{delimiter}'+ return render++ md.add_render_rule('math_inline_double', raw('$$'))+ md.add_render_rule('math_block', raw('$$', block=True))
fix: Send updates from long running sync callbacks before they returnPython · 51 + / 2 −
Introduces 3 new declarations in panel/io/document.py.
Adds new core implementation rather than adjusting what was there. Tests changed with it, with code of their own.
panel/io/document.py ↗ · 2 files
@@ -651,6 +653,46 @@ def _suppress_property_callbacks( event.callback_invoker = None return events +async def _write_message(+ doc: Document, connections: list[ServerConnection], message: Message+) -> None:+ for conn in connections:+ lock = getattr(conn._socket, 'write_lock', None)+ with (await lock.acquire()) if lock is not None else nullcontext():+ await _await_writes(_socket_dispatcher(conn._socket)(conn, msg=message))++def _write_from_worker_thread(+ doc: Document,+ connections: Iterable[ServerConnection],+ events: list[DocumentChangedEvent]+) -> bool:+ """+ Writes events generated by a locked callback that bokeh runs on a+ worker thread right away, rather than leaving them to bokeh, which+ only writes them once the callback returns, so that a long running+ callback can still report progress.++ Only safe while bokeh has no pending writes of its own: the message+ is serialized here, while the callback holds the Document lock, and+ the write is scheduled on the event loop ahead of bokeh's, so the+ client always receives models before they are referenced.+ """+ patches = [e for e in events if isinstance(e, DocumentPatchedEvent)]+ if state._on_loop_thread or not patches or len(patches) != len(events):+ return False+ loop = state._document_loop(doc)+ asyncio_loop = t.cast(+ 'asyncio.AbstractEventLoop | None', getattr(loop, 'asyncio_loop', loop)
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);
Refactor box downcasting methodsRust · 52 + / 43 −
Introduces 6 new declarations in library/alloc/src/boxed/convert.rs.
Adds new language design rather than adjusting what was there. Tests changed with it, with code of their own.
library/alloc/src/boxed/convert.rs ↗ · 6 files
@@ -711,21 +717,24 @@ impl<'a, 'b> From<Cow<'b, str>> for Box<dyn Error + 'a> { } } +impl<T: Error + ?Sized + 'static, A: Allocator> Box<T, A> {+ fn downcast_error<Dst: 'static>(this: Self) -> Result<Box<Dst, A>, Self> {+ if core::error::error_type_id::<T>(&this) == core::any::TypeId::of::<Dst>() {+ // SAFETY: The type is correct+ Ok(unsafe { Self::cast_unchecked(this) })+ } else {+ Err(this)+ }+ }+}+ impl dyn Error { /// Attempts to downcast the box to a concrete type. #[inline] #[stable(feature = "error_downcast", since = "1.3.0")] #[rustc_allow_incoherent_impl] pub fn downcast<T: Error + 'static>(self: Box<Self>) -> Result<Box<T>, Box<dyn Error>> {- if self.is::<T>() {- // SAFETY: Check ensures the type is correct.- unsafe {- let raw: *mut dyn Error = Box::into_raw(self);- Ok(Box::from_raw(raw as *mut T))- }- } else {- Err(self)- }+ Box::downcast_error(self) } }
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"],
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;