helloadhavan/github_issues huggingface dataset:
Repository: facebook/react
Pull request: [ci] Cleanup

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* __->__ #30037
* #30036
* #30035
* #30034
* #30033
* #30032

----

- Made each workflow's name consistent
- Rename each workflow file with consistent naming scheme
- Promote flow-ci-ghaction to flow-ci

Changed files:
filename: .github/workflows/runtime_test.yml
patch: @@ -18,20 +18,20 @@ jobs:
     runs-on: ubuntu-latest
     outputs:
       params: ${{ steps.define-params.outputs.result }}
-      shard_id: ${{ steps.define-chunks.outputs.result }}
+      shard_id: ${{ steps.define-shards.outputs.result }}
     steps:
       - uses: actions/github-script@v7
-        id: define-chunks
+        id: define-shards
         with:
           script: |
             function range(from, to) {
               const arr = [];
-              for (let n = from; n < to; n++) {
+              for (let n = from; n <= to; n++) {
                 arr.push(n);
               }
               return arr;
             }
-            return range(0, process.env.SHARD_COUNT);
+            return range(1, process.env.SHARD_COUNT);
       - uses: actions/github-script@v7
         id: define-params
         with:
@@ -60,7 +60,7 @@ jobs:
 
   # Spawn a job for each shard for a given set of test params
   test:
-    name: yarn test ${{ matrix.params }} (Chunk ${{ matrix.shard_id }})
+    name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard_id }})
     runs-on: ubuntu-latest
     needs: build_test_params
     strategy:
Repository: ollama/ollama
Pull request: Update llama.cpp submodule to `099afc6`


Changed files:
filename: llm/llama.cpp
patch: @@ -1 +1 @@
-Subproject commit f57fadc009cbff741a1961cb7896c47d73978d2c
+Subproject commit 099afc6274c859ca67146e725839f2d97a5ef313
Repository: facebook/react
Pull request: [ci] Remove circleci check_generated_fizz_runtime job

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30037
* __->__ #30036
* #30035
* #30034
* #30033
* #30032

This was migrated to GitHub actions

Changed files:
filename: .github/workflows/runtime_test.yml
patch: @@ -18,20 +18,20 @@ jobs:
     runs-on: ubuntu-latest
     outputs:
       params: ${{ steps.define-params.outputs.result }}
-      shard_id: ${{ steps.define-chunks.outputs.result }}
+      shard_id: ${{ steps.define-shards.outputs.result }}
     steps:
       - uses: actions/github-script@v7
-        id: define-chunks
+        id: define-shards
         with:
           script: |
             function range(from, to) {
               const arr = [];
-              for (let n = from; n < to; n++) {
+              for (let n = from; n <= to; n++) {
                 arr.push(n);
               }
               return arr;
             }
-            return range(0, process.env.SHARD_COUNT);
+            return range(1, process.env.SHARD_COUNT);
       - uses: actions/github-script@v7
         id: define-params
         with:
@@ -60,7 +60,7 @@ jobs:
 
   # Spawn a job for each shard for a given set of test params
   test:
-    name: yarn test ${{ matrix.params }} (Chunk ${{ matrix.shard_id }})
+    name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard_id }})
     runs-on: ubuntu-latest
     needs: build_test_params
     strategy:
Repository: facebook/react
Pull request: [ci] Add new fizz GitHub action

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30037
* #30036
* __->__ #30035
* #30034
* #30033
* #30032

Copies the existing circleci workflow for checking the inlined Fizz
runtime into GitHub actions. I didn't remove the circleci job for now
just to check for parity.

Changed files:
filename: .github/workflows/runtime_test.yml
patch: @@ -18,20 +18,20 @@ jobs:
     runs-on: ubuntu-latest
     outputs:
       params: ${{ steps.define-params.outputs.result }}
-      shard_id: ${{ steps.define-chunks.outputs.result }}
+      shard_id: ${{ steps.define-shards.outputs.result }}
     steps:
       - uses: actions/github-script@v7
-        id: define-chunks
+        id: define-shards
         with:
           script: |
             function range(from, to) {
               const arr = [];
-              for (let n = from; n < to; n++) {
+              for (let n = from; n <= to; n++) {
                 arr.push(n);
               }
               return arr;
             }
-            return range(0, process.env.SHARD_COUNT);
+            return range(1, process.env.SHARD_COUNT);
       - uses: actions/github-script@v7
         id: define-params
         with:
@@ -60,7 +60,7 @@ jobs:
 
   # Spawn a job for each shard for a given set of test params
   test:
-    name: yarn test ${{ matrix.params }} (Chunk ${{ matrix.shard_id }})
+    name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard_id }})
     runs-on: ubuntu-latest
     needs: build_test_params
     strategy:
Repository: facebook/react
Pull request: [ci] Remove circleci yarn_test job

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30037
* #30036
* #30035
* __->__ #30034
* #30033
* #30032

This was migrated to GitHub actions

Changed files:
filename: .github/workflows/runtime_test.yml
patch: @@ -18,20 +18,20 @@ jobs:
     runs-on: ubuntu-latest
     outputs:
       params: ${{ steps.define-params.outputs.result }}
-      shard_id: ${{ steps.define-chunks.outputs.result }}
+      shard_id: ${{ steps.define-shards.outputs.result }}
     steps:
       - uses: actions/github-script@v7
-        id: define-chunks
+        id: define-shards
         with:
           script: |
             function range(from, to) {
               const arr = [];
-              for (let n = from; n < to; n++) {
+              for (let n = from; n <= to; n++) {
                 arr.push(n);
               }
               return arr;
             }
-            return range(0, process.env.SHARD_COUNT);
+            return range(1, process.env.SHARD_COUNT);
       - uses: actions/github-script@v7
         id: define-params
         with:
@@ -60,7 +60,7 @@ jobs:
 
   # Spawn a job for each shard for a given set of test params
   test:
-    name: yarn test ${{ matrix.params }} (Chunk ${{ matrix.shard_id }})
+    name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard_id }})
     runs-on: ubuntu-latest
     needs: build_test_params
     strategy:
Repository: facebook/react
Pull request: [ci] Improve parallelism of yarn test

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30037
* #30036
* #30035
* #30034
* __->__ #30033
* #30032

This PR adds parallelism similar to our existing circleci setup for
running yarn tests with the various test params. It does this by
sharding tests into `$SHARD_COUNT` number of groups, then spawning a job
for each of them and using jest's built in `--shard` option.

Effectively this means that the job will spawn an additional (where `n`
is the number of test params)

`n * $SHARD_COUNT` number of jobs to run tests in parallel

for a total of `n + (n * $SHARD_COUNT)` jobs. This does mean the
GitHub UI at the bottom of each PR gets longer and unfortunately it's
not sorted in any way as far as I can tell. But if something goes wrong
it should still be easy to find out what the problem is.

The PR also changes the `ci` argument for jest-cli to be an enum instead
so the tests use all available workers in GitHub actions. This will have
to live around for a bit until we can fully migrate off of circleci.

Changed files:
filename: .github/workflows/runtime_test.yml
patch: @@ -18,20 +18,20 @@ jobs:
     runs-on: ubuntu-latest
     outputs:
       params: ${{ steps.define-params.outputs.result }}
-      shard_id: ${{ steps.define-chunks.outputs.result }}
+      shard_id: ${{ steps.define-shards.outputs.result }}
     steps:
       - uses: actions/github-script@v7
-        id: define-chunks
+        id: define-shards
         with:
           script: |
             function range(from, to) {
               const arr = [];
-              for (let n = from; n < to; n++) {
+              for (let n = from; n <= to; n++) {
                 arr.push(n);
               }
               return arr;
             }
-            return range(0, process.env.SHARD_COUNT);
+            return range(1, process.env.SHARD_COUNT);
       - uses: actions/github-script@v7
         id: define-params
         with:
@@ -60,7 +60,7 @@ jobs:
 
   # Spawn a job for each shard for a given set of test params
   test:
-    name: yarn test ${{ matrix.params }} (Chunk ${{ matrix.shard_id }})
+    name: yarn test ${{ matrix.params }} (Shard ${{ matrix.shard_id }})
     runs-on: ubuntu-latest
     needs: build_test_params
     strategy:
Repository: nodejs/node
Pull request: assert: change utils to use index instead of for...of

This PR changes a for...of loop to an index-based for loop in the getErrMessage() function within lib/internal/assert/utils.js.

Refs: https://github.com/nodejs/node/blob/main/doc/contributing/primordials.md#unsafe-array-iteration


Changed files:
filename: lib/internal/assert/utils.js
patch: @@ -222,7 +222,8 @@ function getErrMessage(message, fn) {
       }
       const frames = StringPrototypeSplit(message, '\n');
       message = ArrayPrototypeShift(frames);
-      for (const frame of frames) {
+      for (let i = 0; i < frames.length; i++) {
+        const frame = frames[i];
         let pos = 0;
         while (pos < column && (frame[pos] === ' ' || frame[pos] === '\t')) {
           pos++;
Repository: denoland/deno
Pull request: fix(doc): non-determinism in `deno doc --lint`

Closes #25188

Changed files:
filename: Cargo.lock
patch: @@ -1991,9 +1991,9 @@ dependencies = [
 
 [[package]]
 name = "deno_doc"
-version = "0.189.0"
+version = "0.189.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d82f89d6417f786a32d310e3287306ad4c0763a53a83b8323f86b9ac471c71e"
+checksum = "1251ccb6449131ba40efa6408a50c1842813f7d6f5d9985730ad1974744e08ca"
 dependencies = [
  "anyhow",
  "cfg-if",

filename: Cargo.toml
patch: @@ -68,7 +68,7 @@ deno_ast = { version = "=0.52.0", features = ["transpiling"] }
 deno_core = { version = "0.380.0" }
 
 deno_cache_dir = "=0.26.3"
-deno_doc = "=0.189.0"
+deno_doc = "=0.189.1"
 deno_error = "=0.7.1"
 deno_graph = { version = "=0.106.0", default-features = false }
 deno_lint = "=0.82.0"
Repository: huggingface/transformers
Pull request: Remove optax

# What does this PR do?

`optax` is dependency of `flax`.
 

Changed files:
filename: setup.py
patch: @@ -132,7 +132,6 @@
     "opencv-python",
     "optimum-benchmark>=0.3.0",
     "optuna",
-    "optax>=0.0.8,<=0.1.4",
     "pandas<2.3.0",  # `datasets` requires `pandas` while `pandas==2.3.0` has issues with CircleCI on 2025/06/05
     "packaging>=20.0",
     "parameterized>=0.9",  # older version of parameterized cause pytest collection to fail on .expand

filename: src/transformers/dependency_versions_table.py
patch: @@ -41,7 +41,6 @@
     "opencv-python": "opencv-python",
     "optimum-benchmark": "optimum-benchmark>=0.3.0",
     "optuna": "optuna",
-    "optax": "optax>=0.0.8,<=0.1.4",
     "pandas": "pandas<2.3.0",
     "packaging": "packaging>=20.0",
     "parameterized": "parameterized>=0.9",
Repository: facebook/react
Pull request: [ci] Parallelize flow github action

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30030
* #30029
* #30028
* __->__ #30026
* #30025

The existing flow-ci script makes some assumptions about running inside
of circleci for parallelization. This PR forks the script with very smal
ll tweaks to allow for a short name to be passed in as an argument.
These short names are discovered in a new GH job and then each one is
passed as an argument for parallelization

Changed files:
filename: .github/workflows/flow.yml
patch: @@ -22,7 +22,7 @@ jobs:
             const inlinedHostConfigs = require('./scripts/shared/inlinedHostConfigs.js');
             return inlinedHostConfigs.map(config => config.shortName);
 
-  Flow:
+  flow:
     name: Flow check ${{ matrix.flow_inline_config_shortname }}
     needs: discover_flow_inline_configs
     runs-on: ubuntu-latest
Repository: electron/electron
Pull request: build: remove `fix_linter_error.patch`

#### Description of Change

Seems like it builds locally? let's see.

#### Release Notes

Notes: none


Changed files:
filename: patches/chromium/.patches
patch: @@ -133,6 +133,5 @@ feat_add_signals_when_embedder_cleanup_callbacks_run_for.patch
 feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch
 fix_win32_synchronous_spellcheck.patch
 fix_enable_wrap_iter_in_string_view_and_array.patch
-fix_linter_error.patch
 chore_grandfather_in_electron_views_and_delegates.patch
 refactor_patch_electron_permissiontypes_into_blink.patch

filename: patches/chromium/fix_linter_error.patch
patch: @@ -1,43 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Charles Kerr <charles@charleskerr.com>
-Date: Thu, 6 Mar 2025 17:06:49 -0600
-Subject: fix: linter error
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-fix: linter error
-
-This is showing up in an eslint build step in Electron:
-
-> /__w/electron/electron/src/out/Default/gen/ui/webui/resources/cr_elements/preprocessed/cr_menu_selector/cr_menu_selector.ts
->   77:23  error  This assertion is unnecessary since the receiver accepts the original type of the expression  @typescript-eslint/no-unnecessary-type-assertion
->
-> ✖ 1 problem (1 error, 0 warnings)
->   1 error and 0 warnings potentially fixable with the `--fix` option.
-
-However, removing the assertion causes a typescript build failure:
-
-> gen/ui/webui/resources/cr_elements/preprocessed/cr_menu_selector/cr_menu_selector.ts:77:23 - error TS2345: Argument of type 'HTMLElement | null' is not assignable to parameter of type 'HTMLElement'.
->   Type 'null' is not assignable to type 'HTMLElement'.
->
-> 77         items.indexOf(this.querySelector<HTMLElement>(':focus'));
->                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-So I think the two different steps may be picking up typescript definitions.
-
-This patch should be removed after the issue is tracked down
-andfixed in a followup task.
-
-diff --git a/ui/webui/resources/cr_elements/cr_menu_selector/cr_menu_selector.ts b/ui/webui/resources/cr_elements/cr_menu_selector/cr_menu_selector.ts
-index 0a83b8041b8201c95442e680c77555d4c11bc06a..abdb8e9bfbbfb1fce6fa38e226e50a35477e49a2 100644
---- a/ui/webui/resources/cr_elements/cr_menu_selector/cr_menu_selector.ts
-+++ b/ui/webui/resources/cr_elements/cr_menu_selector/cr_menu_selector.ts
-@@ -74,6 +74,7 @@ export class CrMenuSelector extends CrMenuSelectorBase {
-     const items = this.getAllFocusableItems_();
-     assert(items.length >= 1);
-     const currentFocusedIndex =
-+        // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
-         items.indexOf(this.querySelector<HTMLElement>(':focus')!);
- 
-     let newFocusedIndex = currentFocusedIndex;
Repository: ollama/ollama
Pull request: Check image filetype in api handlers

Fixes: https://github.com/ollama/ollama/issues/2456

Changed files:
filename: cmd/interactive.go
patch: @@ -625,7 +625,7 @@ func getImageData(filePath string) ([]byte, error) {
 	}
 
 	contentType := http.DetectContentType(buf)
-	allowedTypes := []string{"image/jpeg", "image/jpg", "image/svg+xml", "image/png"}
+	allowedTypes := []string{"image/jpeg", "image/jpg", "image/png"}
 	if !slices.Contains(allowedTypes, contentType) {
 		return nil, fmt.Errorf("invalid image type: %s", contentType)
 	}

filename: server/routes.go
patch: @@ -22,6 +22,7 @@ import (
 
 	"github.com/gin-contrib/cors"
 	"github.com/gin-gonic/gin"
+	"golang.org/x/exp/slices"
 
 	"github.com/jmorganca/ollama/api"
 	"github.com/jmorganca/ollama/gpu"
@@ -136,6 +137,12 @@ func modelOptions(model *Model, requestOpts map[string]interface{}) (api.Options
 	return opts, nil
 }
 
+func isSupportedImageType(image []byte) bool {
+	contentType := http.DetectContentType(image)
+	allowedTypes := []string{"image/jpeg", "image/jpg", "image/png"}
+	return slices.Contains(allowedTypes, contentType)
+}
+
 func GenerateHandler(c *gin.Context) {
 	loaded.mu.Lock()
 	defer loaded.mu.Unlock()
@@ -166,6 +173,13 @@ func GenerateHandler(c *gin.Context) {
 		return
 	}
 
+	for _, img := range req.Images {
+		if !isSupportedImageType(img) {
+			c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "unsupported image format"})
+			return
+		}
+	}
+
 	model, err := GetModel(req.Model)
 	if err != nil {
 		var pErr *fs.PathError
@@ -1103,6 +1117,15 @@ func ChatHandler(c *gin.Context) {
 		return
 	}
 
+	for _, msg := range req.Messages {
+		for _, img := range msg.Images {
+			if !isSupportedImageType(img) {
+				c.AbortWithStatusJSON(http.StatusBadRequest, gin.H{"error": "unsupported image format"})
+				return
+			}
+		}
+	}
+
 	model, err := GetModel(req.Model)
 	if err != nil {
 		var pErr *fs.PathError
Repository: ggml-org/llama.cpp
Pull request: cmake : add option to build and link LibreSSL

Tested with cmake 4.1.2 and 3.23.3

Changed files:
filename: vendor/cpp-httplib/CMakeLists.txt
patch: @@ -22,8 +22,9 @@ target_compile_definitions(${TARGET} PRIVATE
     CPPHTTPLIB_TCP_NODELAY=1
 )
 
+set(OPENSSL_NO_ASM ON CACHE BOOL "Disable OpenSSL ASM code when building BoringSSL or LibreSSL")
+
 if (LLAMA_BUILD_BORINGSSL)
-    set(OPENSSL_NO_ASM ON CACHE BOOL "Disable OpenSSL ASM code (BoringSSL)")
     set(FIPS OFF CACHE BOOL "Enable FIPS (BoringSSL)")
 
     set(BORINGSSL_GIT "https://boringssl.googlesource.com/boringssl" CACHE STRING "BoringSSL git repository")
@@ -64,6 +65,47 @@ if (LLAMA_BUILD_BORINGSSL)
     set(CPPHTTPLIB_OPENSSL_SUPPORT TRUE)
     target_link_libraries(${TARGET} PUBLIC ssl crypto)
 
+elseif (LLAMA_BUILD_LIBRESSL)
+    set(LIBRESSL_VERSION "4.2.1" CACHE STRING "LibreSSL version")
+
+    message(STATUS "Fetching LibreSSL version ${LIBRESSL_VERSION}")
+
+    set(LIBRESSL_ARGS
+        URL "https://cdn.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL_VERSION}.tar.gz"
+    )
+    if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24)
+        list(APPEND LIBRESSL_ARGS DOWNLOAD_EXTRACT_TIMESTAMP TRUE)
+    endif()
+
+    if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.28)
+        list(APPEND LIBRESSL_ARGS EXCLUDE_FROM_ALL)
+    endif()
+
+    include(FetchContent)
+    FetchContent_Declare(libressl ${LIBRESSL_ARGS})
+
+    set(SAVED_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
+    set(SAVED_BUILD_TESTING ${BUILD_TESTING})
+
+    set(BUILD_SHARED_LIBS OFF)
+    set(BUILD_TESTING OFF)
+
+    if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.28)
+        FetchContent_MakeAvailable(libressl)
+    else()
+        FetchContent_GetProperties(libressl)
+        if(NOT libressl_POPULATED)
+            FetchContent_Populate(libressl)
+            add_subdirectory(${libressl_SOURCE_DIR} ${libressl_BINARY_DIR} EXCLUDE_FROM_ALL)
+        endif()
+    endif()
+
+    set(BUILD_SHARED_LIBS ${SAVED_BUILD_SHARED_LIBS})
+    set(BUILD_TESTING ${SAVED_BUILD_TESTING})
+
+    set(CPPHTTPLIB_OPENSSL_SUPPORT TRUE)
+    target_link_libraries(${TARGET} PUBLIC ssl crypto)
+
 elseif (LLAMA_OPENSSL)
     find_package(OpenSSL)
     if (OpenSSL_FOUND)
Repository: facebook/react
Pull request: [ci] Remove circleci yarn_flow job

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30030
* #30029
* __->__ #30028
* #30026
* #30025

This was migrated to GitHub actions

Changed files:
filename: .github/workflows/flow.yml
patch: @@ -22,7 +22,7 @@ jobs:
             const inlinedHostConfigs = require('./scripts/shared/inlinedHostConfigs.js');
             return inlinedHostConfigs.map(config => config.shortName);
 
-  Flow:
+  flow:
     name: Flow check ${{ matrix.flow_inline_config_shortname }}
     needs: discover_flow_inline_configs
     runs-on: ubuntu-latest
Repository: vercel/next.js
Pull request: [backport] fix: error overlay not closing when backdrop clicked (#83981)

Backports #83981


Changed files:
filename: packages/next/src/next-devtools/dev-overlay/components/dialog/dialog.tsx
patch: @@ -37,8 +37,7 @@ const Dialog: React.FC<DialogProps> = function Dialog({
   )
 
   useOnClickOutside(
-    // eslint-disable-next-line react-hooks/react-compiler -- TODO
-    dialogRef.current,
+    dialogRef,
     CSS_SELECTORS_TO_EXCLUDE_ON_CLICK_OUTSIDE,
     (e) => {
       e.preventDefault()

filename: packages/next/src/next-devtools/dev-overlay/hooks/use-on-click-outside.ts
patch: @@ -1,18 +1,20 @@
 import * as React from 'react'
 
 export function useOnClickOutside(
-  el: Node | null,
+  el: Node | React.RefObject<Node | null> | null,
   cssSelectorsToExclude: string[],
   handler: ((e: MouseEvent | TouchEvent) => void) | undefined
 ) {
   React.useEffect(() => {
-    if (el == null || handler == null) {
+    // Support both direct nodes and ref objects
+    const element = el && 'current' in el ? el.current : el
+    if (element == null || handler == null) {
       return
     }
 
     const listener = (e: MouseEvent | TouchEvent) => {
       // Do nothing if clicking ref's element or descendent elements
-      if (!el || el.contains(e.target as Element)) {
+      if (!element || element.contains(e.target as Element)) {
         return
       }
 
@@ -28,7 +30,7 @@ export function useOnClickOutside(
       handler(e)
     }
 
-    const root = el.getRootNode()
+    const root = element.getRootNode()
     root.addEventListener('mouseup', listener as EventListener)
     root.addEventListener('touchend', listener as EventListener, {
       passive: false,
Repository: ggml-org/llama.cpp
Pull request: llama-graph: avoid expand_forward for fusion

It seems like these forward expands were not required for fusion as these operations already arrive in order. Adding these statements causes splits to change in multi-GPU setups causing performance drops (see #16912), removing them should fix these issues

Changed files:
filename: ggml/src/ggml-cuda/ggml-cuda.cu
patch: @@ -3274,14 +3274,14 @@ static void evaluate_and_capture_cuda_graph(ggml_backend_cuda_context * cuda_ctx
                         GGML_LOG_DEBUG("Setting stream no to %d for node %s\n", cuda_ctx->curr_stream_no, node->name);
                     }
                 }
-                prev_i = i;
 
 #ifdef GGML_CUDA_DEBUG
                 const int nodes_fused = i - prev_i - 1;
                 if (nodes_fused > 0) {
                     GGML_LOG_INFO("nodes_fused: %d\n", nodes_fused);
                 }
 #endif
+                prev_i = i;
 
                 if (ggml_is_empty(node) || node->op == GGML_OP_RESHAPE || node->op == GGML_OP_TRANSPOSE || node->op == GGML_OP_VIEW || node->op == GGML_OP_PERMUTE || node->op == GGML_OP_NONE) {
                     continue;

filename: src/llama-graph.cpp
patch: @@ -810,9 +810,6 @@ ggml_tensor * llm_graph_context::build_ffn(
             GGML_ABORT("fatal error");
     }
 
-    //expand here so that we can fuse ffn gate
-    ggml_build_forward_expand(gf, cur);
-
     if (gate && type_gate == LLM_FFN_PAR) {
         cur = ggml_mul(ctx0, cur, tmp);
         cb(cur, "ffn_gate_par", il);
@@ -1093,9 +1090,6 @@ ggml_tensor * llm_graph_context::build_moe_ffn(
             GGML_ABORT("fatal error");
     }
 
-    //expand here so that we can fuse ffn gate
-    ggml_build_forward_expand(gf, cur);
-
     experts = build_lora_mm_id(down_exps, cur, selected_experts); // [n_embd, n_expert_used, n_tokens]
     cb(experts, "ffn_moe_down", il);