helloadhavan/github_issues huggingface dataset:
Repository: vercel/next.js
Pull request: [test] Update snapshots

Follow-up to https://github.com/vercel/next.js/pull/73553

Changed files:
filename: test/development/app-dir/ssr-in-rsc/ssr-in-rsc.test.ts
patch: @@ -794,16 +794,16 @@ describe('react-dom/server in React Server environment', () => {
     if (isTurbopack) {
       if (isReact18) {
         expect(redbox).toMatchInlineSnapshot(`
-          {
-            "description": "Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
-            "source": "internal-pkg/server.node.js (1:1) @ {module evaluation}
+         {
+           "description": "Cannot read properties of undefined (reading 'ReactCurrentDispatcher')",
+           "source": "internal-pkg/server.node.js (1:1) @ {module evaluation}
 
-           > 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
-               | ^
-             2 | // Fine to drop once React is on ESM
-             3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'
-             4 |",
-           }
+         > 1 | import * as ReactDOMServerEdge from 'react-dom/server.node'
+             | ^
+           2 | // Fine to drop once React is on ESM
+           3 | import ReactDOMServerEdgeDefault from 'react-dom/server.node'
+           4 |",
+         }
         `)
       } else {
         expect(redbox).toMatchInlineSnapshot(`
Repository: ggml-org/llama.cpp
Pull request: rpc : check src buffer when copying tensor

Only dst buffer is guaranteed to be an RPC buffer. Add check for the src one.


Changed files:
filename: ggml/src/ggml-rpc/ggml-rpc.cpp
patch: @@ -631,23 +631,30 @@ static void ggml_backend_rpc_buffer_get_tensor(ggml_backend_buffer_t buffer, con
     RPC_STATUS_ASSERT(status);
 }
 
+static bool ggml_backend_buffer_is_rpc(ggml_backend_buffer_t buffer) {
+    return buffer->iface.free_buffer == ggml_backend_rpc_buffer_free_buffer;
+}
+
 static bool ggml_backend_rpc_buffer_cpy_tensor(ggml_backend_buffer_t buffer, const ggml_tensor * src, ggml_tensor * dst) {
-    // check if src and dst are on the same server
-    ggml_backend_buffer_t src_buffer = src->buffer;
-    ggml_backend_rpc_buffer_context * src_ctx = (ggml_backend_rpc_buffer_context *)src_buffer->context;
-    ggml_backend_buffer_t dst_buffer = dst->buffer;
-    ggml_backend_rpc_buffer_context * dst_ctx = (ggml_backend_rpc_buffer_context *)dst_buffer->context;
-    if (src_ctx->sock != dst_ctx->sock) {
-        return false;
+    if (ggml_backend_buffer_is_rpc(src->buffer)) {
+        // check if src and dst are on the same server
+        ggml_backend_buffer_t src_buffer = src->buffer;
+        ggml_backend_rpc_buffer_context * src_ctx = (ggml_backend_rpc_buffer_context *)src_buffer->context;
+        ggml_backend_buffer_t dst_buffer = dst->buffer;
+        ggml_backend_rpc_buffer_context * dst_ctx = (ggml_backend_rpc_buffer_context *)dst_buffer->context;
+        if (src_ctx->sock != dst_ctx->sock) {
+            return false;
+        }
+        ggml_backend_rpc_buffer_context * ctx = (ggml_backend_rpc_buffer_context *)buffer->context;
+        rpc_msg_copy_tensor_req request;
+        request.src = serialize_tensor(src);
+        request.dst = serialize_tensor(dst);
+        rpc_msg_copy_tensor_rsp response;
+        bool status = send_rpc_cmd(ctx->sock, RPC_CMD_COPY_TENSOR, &request, sizeof(request), &response, sizeof(response));
+        RPC_STATUS_ASSERT(status);
+        return response.result;
     }
-    ggml_backend_rpc_buffer_context * ctx = (ggml_backend_rpc_buffer_context *)buffer->context;
-    rpc_msg_copy_tensor_req request;
-    request.src = serialize_tensor(src);
-    request.dst = serialize_tensor(dst);
-    rpc_msg_copy_tensor_rsp response;
-    bool status = send_rpc_cmd(ctx->sock, RPC_CMD_COPY_TENSOR, &request, sizeof(request), &response, sizeof(response));
-    RPC_STATUS_ASSERT(status);
-    return response.result;
+    return false;
 }
 
 static void ggml_backend_rpc_buffer_clear(ggml_backend_buffer_t buffer, uint8_t value) {
Repository: ollama/ollama
Pull request: skip files in the list if we can't get the correct model path


Changed files:
filename: server/routes.go
patch: @@ -206,8 +206,8 @@ func list(c *gin.Context) {
 			mp := ParseModelPath(tag)
 			manifest, err := GetManifest(mp)
 			if err != nil {
-				log.Printf("couldn't get manifest: %v", err)
-				return err
+				log.Printf("skipping file: %s", fp)
+				return nil
 			}
 			model := api.ListResponseModel{
 				Name:       mp.GetShortTagname(),
Repository: huggingface/transformers
Pull request: fix `notification_service.py` about `time_spent`

# What does this PR do?

We extract the information from test report file like in `1 passed in 7.89s`, but at some point, we do

> ... ["time_spent"] += time_spent[1:-1]

which remove the first digit. I am not guility!

Changed files:
filename: utils/notification_service.py
patch: @@ -1225,7 +1225,7 @@ def pop_default(l: list[Any], i: int, default: Any) -> Any:
                 matrix_job_results[matrix_name]["success"] += success
                 matrix_job_results[matrix_name]["errors"] += errors
                 matrix_job_results[matrix_name]["skipped"] += skipped
-                matrix_job_results[matrix_name]["time_spent"] += time_spent[1:-1] + ", "
+                matrix_job_results[matrix_name]["time_spent"] += time_spent[:-1] + ", "
 
                 stacktraces = handle_stacktraces(artifact["failures_line"])
 
@@ -1360,7 +1360,7 @@ def pop_default(l: list[Any], i: int, default: Any) -> Any:
             additional_results[key]["success"] += success
             additional_results[key]["errors"] += errors
             additional_results[key]["skipped"] += skipped
-            additional_results[key]["time_spent"] += time_spent[1:-1] + ", "
+            additional_results[key]["time_spent"] += time_spent[:-1] + ", "
 
             if len(artifact["errors"]):
                 additional_results[key]["error"] = True
Repository: ollama/ollama
Pull request: fix mkdir blob path


Changed files:
filename: server/modelpath.go
patch: @@ -106,10 +106,10 @@ func GetBlobsPath(digest string) (string, error) {
 		return "", err
 	}
 
-	path := filepath.Join(home, ".ollama", "models", "blobs")
+	path := filepath.Join(home, ".ollama", "models", "blobs", digest)
 	if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
 		return "", err
 	}
 
-	return filepath.Join(path, digest), nil
+	return path, nil
 }
Repository: ggml-org/llama.cpp
Pull request: ci : change macos-13 to macos-15-intel

This commit updates the macos-13 runners to macos-15-intel.

The motivation for this changes is the macos-13 runners are scheduled to be retired on 2025-12-04.

Refs: https://github.blog/changelog/2025-09-19-github-actions-macos-13-runner-image-is-closing-down/


Changed files:
filename: .github/workflows/build.yml
patch: @@ -97,7 +97,7 @@ jobs:
           ctest -L 'main|curl' --verbose --timeout 900
 
   macOS-latest-cmake-x64:
-    runs-on: macos-13
+    runs-on: macos-15-intel
 
     steps:
       - name: Clone

filename: .github/workflows/release.yml
patch: @@ -75,7 +75,7 @@ jobs:
           name: llama-bin-macos-arm64.zip
 
   macOS-x64:
-    runs-on: macos-13
+    runs-on: macos-15-intel
 
     steps:
       - name: Clone
Repository: electron/electron
Pull request: fix: build failure when printing is disabled

#### Description of Change

Fix 1d6cb34 FTBFS regression when building with printing disabled.

This breaks the Microsoft internal builds of Electron; so if possible, I'd like to get this landed before we kick off the weekly 33 and 34 releases.

CC @codebytere @electron/wg-releases 

#### Checklist

- [x] PR description included and stakeholders cc'd
- [ ] `npm test` passes
- [x] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).

#### Release Notes

Notes: Fixed build failure when building with printing disabled.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -1988,6 +1988,7 @@ void WebContents::DraggableRegionsChanged(
   draggable_region_ = DraggableRegionsToSkRegion(regions);
 }
 
+#if BUILDFLAG(ENABLE_PRINTING)
 void WebContents::PrintCrossProcessSubframe(
     content::WebContents* web_contents,
     const gfx::Rect& rect,
@@ -1998,6 +1999,7 @@ void WebContents::PrintCrossProcessSubframe(
     client->PrintCrossProcessSubframe(rect, document_cookie, subframe_host);
   }
 }
+#endif
 
 SkRegion* WebContents::draggable_region() {
   return g_disable_draggable_regions ? nullptr : draggable_region_.get();

filename: shell/browser/api/electron_api_web_contents.h
patch: @@ -585,11 +585,13 @@ class WebContents final : public ExclusiveAccessContext,
   void DraggableRegionsChanged(
       const std::vector<blink::mojom::DraggableRegionPtr>& regions,
       content::WebContents* contents) override;
+#if BUILDFLAG(ENABLE_PRINTING)
   void PrintCrossProcessSubframe(
       content::WebContents* web_contents,
       const gfx::Rect& rect,
       int document_cookie,
       content::RenderFrameHost* subframe_host) const override;
+#endif
 
   // content::WebContentsObserver:
   void BeforeUnloadFired(bool proceed) override;

filename: shell/browser/feature_list.cc
patch: @@ -16,6 +16,7 @@
 #include "electron/buildflags/buildflags.h"
 #include "media/base/media_switches.h"
 #include "net/base/features.h"
+#include "printing/buildflags/buildflags.h"
 #include "services/network/public/cpp/features.h"
 #include "third_party/blink/public/common/features.h"
 
@@ -60,7 +61,7 @@ void InitializeFeatureList() {
       std::string(",") + features::kMacWebContentsOcclusion.name;
 #endif
 
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PRINTING)
   disable_features +=
       // EnableOopPrintDrivers is still a bit half-baked on Linux and
       // causes crashes when trying to show dialogs.
Repository: electron/electron
Pull request: fix: build failure when printing is disabled

Backport of #46283.

See that PR for details.

Notes: Fixed build failure when building with printing disabled.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -2112,6 +2112,7 @@ void WebContents::DraggableRegionsChanged(
   draggable_region_ = DraggableRegionsToSkRegion(regions);
 }
 
+#if BUILDFLAG(ENABLE_PRINTING)
 void WebContents::PrintCrossProcessSubframe(
     content::WebContents* web_contents,
     const gfx::Rect& rect,
@@ -2122,6 +2123,7 @@ void WebContents::PrintCrossProcessSubframe(
     client->PrintCrossProcessSubframe(rect, document_cookie, subframe_host);
   }
 }
+#endif
 
 SkRegion* WebContents::draggable_region() {
   return g_disable_draggable_regions ? nullptr : draggable_region_.get();

filename: shell/browser/api/electron_api_web_contents.h
patch: @@ -636,11 +636,13 @@ class WebContents final : public ExclusiveAccessContext,
   void DraggableRegionsChanged(
       const std::vector<blink::mojom::DraggableRegionPtr>& regions,
       content::WebContents* contents) override;
+#if BUILDFLAG(ENABLE_PRINTING)
   void PrintCrossProcessSubframe(
       content::WebContents* web_contents,
       const gfx::Rect& rect,
       int document_cookie,
       content::RenderFrameHost* subframe_host) const override;
+#endif
 
   // content::WebContentsObserver:
   void BeforeUnloadFired(bool proceed) override;

filename: shell/browser/feature_list.cc
patch: @@ -15,6 +15,7 @@
 #include "electron/buildflags/buildflags.h"
 #include "media/base/media_switches.h"
 #include "net/base/features.h"
+#include "printing/buildflags/buildflags.h"
 #include "services/network/public/cpp/features.h"
 #include "third_party/blink/public/common/features.h"
Repository: ollama/ollama
Pull request: Create model spinner

add a spinner to create model outputs

Changed files:
filename: cmd/cmd.go
patch: @@ -9,7 +9,6 @@ import (
 	"net"
 	"net/http"
 	"os"
-	"path/filepath"
 	"strings"
 	"time"
 
@@ -24,29 +23,32 @@ import (
 	"github.com/jmorganca/ollama/server"
 )
 
-func cacheDir() string {
-	home, err := os.UserHomeDir()
-	if err != nil {
-		panic(err)
-	}
-
-	return filepath.Join(home, ".ollama")
-}
-
 func create(cmd *cobra.Command, args []string) error {
 	filename, _ := cmd.Flags().GetString("file")
 	client := api.NewClient()
 
+	var spinner *Spinner
+
 	request := api.CreateRequest{Name: args[0], Path: filename}
 	fn := func(resp api.CreateProgress) error {
-		fmt.Println(resp.Status)
+		if spinner != nil {
+			spinner.Stop()
+		}
+
+		spinner = NewSpinner(resp.Status)
+		go spinner.Spin(100 * time.Millisecond)
+
 		return nil
 	}
 
 	if err := client.Create(context.Background(), &request, fn); err != nil {
 		return err
 	}
 
+	if spinner != nil {
+		spinner.Stop()
+	}
+
 	return nil
 }
 
@@ -176,24 +178,8 @@ func generate(cmd *cobra.Command, model, prompt string) error {
 	if len(strings.TrimSpace(prompt)) > 0 {
 		client := api.NewClient()
 
-		spinner := progressbar.NewOptions(-1,
-			progressbar.OptionSetWriter(os.Stderr),
-			progressbar.OptionThrottle(60*time.Millisecond),
-			progressbar.OptionSpinnerType(14),
-			progressbar.OptionSetRenderBlankState(true),
-			progressbar.OptionSetElapsedTime(false),
-			progressbar.OptionClearOnFinish(),
-		)
-
-		go func() {
-			for range time.Tick(60 * time.Millisecond) {
-				if spinner.IsFinished() {
-					break
-				}
-
-				spinner.Add(1)
-			}
-		}()
+		spinner := NewSpinner("")
+		go spinner.Spin(60 * time.Millisecond)
 
 		var latest api.GenerateResponse
 
@@ -292,10 +278,6 @@ func NewCLI() *cobra.Command {
 		CompletionOptions: cobra.CompletionOptions{
 			DisableDefaultCmd: true,
 		},
-		PersistentPreRunE: func(_ *cobra.Command, args []string) error {
-			// create the models directory and it's parent
-			return os.MkdirAll(filepath.Join(cacheDir(), "models"), 0o700)
-		},
 	}
 
 	cobra.EnableCommandSorting = false

filename: cmd/spinner.go
patch: @@ -0,0 +1,44 @@
+package cmd
+
+import (
+	"fmt"
+	"os"
+	"time"
+
+	"github.com/schollz/progressbar/v3"
+)
+
+type Spinner struct {
+	description string
+	*progressbar.ProgressBar
+}
+
+func NewSpinner(description string) *Spinner {
+	return &Spinner{
+		description: description,
+		ProgressBar: progressbar.NewOptions(-1,
+			progressbar.OptionSetWriter(os.Stderr),
+			progressbar.OptionThrottle(60*time.Millisecond),
+			progressbar.OptionSpinnerType(14),
+			progressbar.OptionSetRenderBlankState(true),
+			progressbar.OptionSetElapsedTime(false),
+			progressbar.OptionClearOnFinish(),
+			progressbar.OptionSetDescription(description),
+		),
+	}
+}
+
+func (s *Spinner) Spin(tick time.Duration) {
+	for range time.Tick(tick) {
+		if s.IsFinished() {
+			break
+		}
+
+		s.Add(1)
+	}
+}
+
+func (s *Spinner) Stop() {
+	s.Finish()
+	fmt.Println(s.description)
+}
Repository: electron/electron
Pull request: fix: build failure when printing is disabled

Backport of #46283

See that PR for details.


Notes: Fixed build failure when building with printing disabled.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -1988,6 +1988,7 @@ void WebContents::DraggableRegionsChanged(
   draggable_region_ = DraggableRegionsToSkRegion(regions);
 }
 
+#if BUILDFLAG(ENABLE_PRINTING)
 void WebContents::PrintCrossProcessSubframe(
     content::WebContents* web_contents,
     const gfx::Rect& rect,
@@ -1998,6 +1999,7 @@ void WebContents::PrintCrossProcessSubframe(
     client->PrintCrossProcessSubframe(rect, document_cookie, subframe_host);
   }
 }
+#endif
 
 SkRegion* WebContents::draggable_region() {
   return g_disable_draggable_regions ? nullptr : draggable_region_.get();

filename: shell/browser/api/electron_api_web_contents.h
patch: @@ -585,11 +585,13 @@ class WebContents final : public ExclusiveAccessContext,
   void DraggableRegionsChanged(
       const std::vector<blink::mojom::DraggableRegionPtr>& regions,
       content::WebContents* contents) override;
+#if BUILDFLAG(ENABLE_PRINTING)
   void PrintCrossProcessSubframe(
       content::WebContents* web_contents,
       const gfx::Rect& rect,
       int document_cookie,
       content::RenderFrameHost* subframe_host) const override;
+#endif
 
   // content::WebContentsObserver:
   void BeforeUnloadFired(bool proceed) override;

filename: shell/browser/feature_list.cc
patch: @@ -16,6 +16,7 @@
 #include "electron/buildflags/buildflags.h"
 #include "media/base/media_switches.h"
 #include "net/base/features.h"
+#include "printing/buildflags/buildflags.h"
 #include "services/network/public/cpp/features.h"
 #include "third_party/blink/public/common/features.h"
 
@@ -60,7 +61,7 @@ void InitializeFeatureList() {
       std::string(",") + features::kMacWebContentsOcclusion.name;
 #endif
 
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PRINTING)
   disable_features +=
       // EnableOopPrintDrivers is still a bit half-baked on Linux and
       // causes crashes when trying to show dialogs.
Repository: huggingface/transformers
Pull request: Bnb failling tests

# What does this PR do?



Changed files:
filename: src/transformers/quantizers/auto.py
patch: @@ -213,7 +213,10 @@ def merge_quantization_configs(
             else:
                 quantization_config = AutoQuantizationConfig.from_dict(quantization_config)
 
-        if quantization_config.__class__.__name__ != quantization_config_from_args.__class__.__name__:
+        if (
+            quantization_config_from_args is not None
+            and quantization_config.__class__.__name__ != quantization_config_from_args.__class__.__name__
+        ):
             raise ValueError(
                 f"The model is quantized with {quantization_config.__class__.__name__} but you are passing a {quantization_config_from_args.__class__.__name__} config. "
                 "Please make sure to pass the same quantization config class to `from_pretrained` with different loading attributes."
Repository: electron/electron
Pull request: fix: build failure when printing is disabled

Backport of #46283

See that PR for details.


Notes: Fixed build failure when building with printing disabled.

Changed files:
filename: shell/browser/api/electron_api_web_contents.cc
patch: @@ -2079,6 +2079,7 @@ void WebContents::DraggableRegionsChanged(
   draggable_region_ = DraggableRegionsToSkRegion(regions);
 }
 
+#if BUILDFLAG(ENABLE_PRINTING)
 void WebContents::PrintCrossProcessSubframe(
     content::WebContents* web_contents,
     const gfx::Rect& rect,
@@ -2089,6 +2090,7 @@ void WebContents::PrintCrossProcessSubframe(
     client->PrintCrossProcessSubframe(rect, document_cookie, subframe_host);
   }
 }
+#endif
 
 SkRegion* WebContents::draggable_region() {
   return g_disable_draggable_regions ? nullptr : draggable_region_.get();

filename: shell/browser/api/electron_api_web_contents.h
patch: @@ -630,11 +630,13 @@ class WebContents final : public ExclusiveAccessContext,
   void DraggableRegionsChanged(
       const std::vector<blink::mojom::DraggableRegionPtr>& regions,
       content::WebContents* contents) override;
+#if BUILDFLAG(ENABLE_PRINTING)
   void PrintCrossProcessSubframe(
       content::WebContents* web_contents,
       const gfx::Rect& rect,
       int document_cookie,
       content::RenderFrameHost* subframe_host) const override;
+#endif
 
   // content::WebContentsObserver:
   void BeforeUnloadFired(bool proceed) override;

filename: shell/browser/feature_list.cc
patch: @@ -16,6 +16,7 @@
 #include "electron/buildflags/buildflags.h"
 #include "media/base/media_switches.h"
 #include "net/base/features.h"
+#include "printing/buildflags/buildflags.h"
 #include "services/network/public/cpp/features.h"
 #include "third_party/blink/public/common/features.h"
 
@@ -60,7 +61,7 @@ void InitializeFeatureList() {
       std::string(",") + features::kMacWebContentsOcclusion.name;
 #endif
 
-#if BUILDFLAG(IS_LINUX)
+#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PRINTING)
   disable_features +=
       // EnableOopPrintDrivers is still a bit half-baked on Linux and
       // causes crashes when trying to show dialogs.
Repository: denoland/deno
Pull request: fix(ext/node): export promise based `lchown` and `lutimes` from `node:fs/promises`

The promised based `lchown` and `lutimes` were implemented in #24418 and #23172 , but haven't been exported through the `node:fs/promises` namespace.

Changed files:
filename: ext/node/polyfills/fs/promises.ts
patch: @@ -21,10 +21,10 @@ export const link = fsPromises.link;
 export const unlink = fsPromises.unlink;
 export const chmod = fsPromises.chmod;
 export const lchmod = fsPromises.lchmod;
-// export const lchown = fs.lchown;
+export const lchown = fsPromises.lchown;
 export const chown = fsPromises.chown;
 export const utimes = fsPromises.utimes;
-// export const lutimes = fs.lutimes;
+export const lutimes = fsPromises.lutimes;
 export const realpath = fsPromises.realpath;
 export const mkdtemp = fsPromises.mkdtemp;
 export const writeFile = fsPromises.writeFile;

filename: tests/unit_node/fs_test.ts
patch: @@ -37,6 +37,8 @@ import {
   copyFile,
   cp,
   FileHandle,
+  lchown,
+  lutimes,
   open,
   stat,
   writeFile,
@@ -407,3 +409,36 @@ Deno.test("[node/fs] fchmodSync works", {
   closeSync(fd);
   Deno.removeSync(tempFile);
 });
+
+Deno.test("[node/fs/promises] lchown works", {
+  ignore: Deno.build.os === "windows",
+}, async () => {
+  const tempFile = Deno.makeTempFileSync();
+  const symlinkPath = tempFile + "-link";
+  Deno.symlinkSync(tempFile, symlinkPath);
+  const uid = await execCmd("id -u");
+  const gid = await execCmd("id -g");
+
+  await lchown(symlinkPath, +uid, +gid);
+
+  Deno.removeSync(tempFile);
+  Deno.removeSync(symlinkPath);
+});
+
+Deno.test("[node/fs/promises] lutimes works", {
+  ignore: Deno.build.os === "windows",
+}, async () => {
+  const tempFile = Deno.makeTempFileSync();
+  const symlinkPath = tempFile + "-link";
+  Deno.symlinkSync(tempFile, symlinkPath);
+
+  const date = new Date("1970-01-01T00:00:00Z");
+  await lutimes(symlinkPath, date, date);
+
+  const stats = Deno.lstatSync(symlinkPath);
+  assertEquals((stats.atime as Date).getTime(), date.getTime());
+  assertEquals((stats.mtime as Date).getTime(), date.getTime());
+
+  Deno.removeSync(tempFile);
+  Deno.removeSync(symlinkPath);
+});
Repository: ggml-org/llama.cpp
Pull request: metal : fix loop bound in ggml_mem_ranges

cont #15929

Used incorrect loop termination bounds. Spotted this during tests with Mamba models.

Because of this, all models that use `GGML_OP_SCAN_SSM` with Metal were effectively broken.

Changed files:
filename: ggml/src/ggml-metal/ggml-metal-common.cpp
patch: @@ -112,7 +112,7 @@ static bool ggml_mem_ranges_add_dst(ggml_mem_ranges_t mrs, const ggml_tensor * t
 }
 
 bool ggml_mem_ranges_add(ggml_mem_ranges_t mrs, const ggml_tensor * tensor) {
-    for (int i = 0; i < GGML_MAX_DIMS; i++) {
+    for (int i = 0; i < GGML_MAX_SRC; i++) {
         if (tensor->src[i]) {
             ggml_mem_ranges_add_src(mrs, tensor->src[i]);
         }
@@ -173,7 +173,7 @@ static bool ggml_mem_ranges_check_dst(ggml_mem_ranges_t mrs, const ggml_tensor *
 }
 
 bool ggml_mem_ranges_check(ggml_mem_ranges_t mrs, const ggml_tensor * tensor) {
-    for (int i = 0; i < GGML_MAX_DIMS; i++) {
+    for (int i = 0; i < GGML_MAX_SRC; i++) {
         if (tensor->src[i]) {
             if (!ggml_mem_ranges_check_src(mrs, tensor->src[i])) {
                 return false;
Repository: electron/electron
Pull request: perf: avoid redundant map lookup in `WebFrameMain` constructor

Backport of #46238

See that PR for details.


Notes: none

Changed files:
filename: shell/browser/api/electron_api_web_frame_main.cc
patch: @@ -155,8 +155,8 @@ WebFrameMain::WebFrameMain(content::RenderFrameHost* rfh)
   if (!render_frame_detached_)
     GetFrameTreeNodeIdMap().emplace(frame_tree_node_id_, this);
 
-  DCHECK(!GetFrameTokenMap().contains(frame_token_));
-  GetFrameTokenMap().emplace(frame_token_, this);
+  const auto [_, inserted] = GetFrameTokenMap().emplace(frame_token_, this);
+  DCHECK(inserted);
 
   // WebFrameMain should only be created for active or unloading frames.
   DCHECK(GetLifecycleState(rfh) == LifecycleState::kActive ||