helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: sched : fix multiple evaluations of the same graph with pipeline parallelism

Fixes incorrect results when using `LLAMA_SET_ROWS=1` with pipeline parallelism. Caused by increasing `cur_copy` in `sched_graph_compute`, resulting in an incorrect copy being used if the same graph is evaluated multiple times.

Changed files:
filename: ggml/src/ggml-backend.cpp
patch: @@ -647,6 +647,7 @@ struct ggml_backend_sched {
     // pipeline parallelism support
     int n_copies;
     int cur_copy;
+    int next_copy;
     ggml_backend_event_t events[GGML_SCHED_MAX_BACKENDS][GGML_SCHED_MAX_COPIES];
     struct ggml_tensor * graph_inputs[GGML_SCHED_MAX_SPLIT_INPUTS];
     int n_graph_inputs;
@@ -1433,8 +1434,6 @@ static enum ggml_status ggml_backend_sched_compute_splits(ggml_backend_sched_t s
         }
     }
 
-    sched->cur_copy = (sched->cur_copy + 1) % sched->n_copies;
-
     return GGML_STATUS_SUCCESS;
 }
 
@@ -1535,10 +1534,10 @@ void ggml_backend_sched_reset(ggml_backend_sched_t sched) {
 bool ggml_backend_sched_reserve(ggml_backend_sched_t sched, struct ggml_cgraph * measure_graph) {
     GGML_ASSERT((int)sched->hash_set.size >= measure_graph->n_nodes + measure_graph->n_leafs);
 
-    ggml_backend_sched_split_graph(sched, measure_graph);
-
     ggml_backend_sched_synchronize(sched);
 
+    ggml_backend_sched_split_graph(sched, measure_graph);
+
     if (!ggml_gallocr_reserve_n(sched->galloc, &sched->graph, sched->node_backend_ids, sched->leaf_backend_ids)) {
         return false;
     }
@@ -1550,6 +1549,10 @@ bool ggml_backend_sched_reserve(ggml_backend_sched_t sched, struct ggml_cgraph *
 
 bool ggml_backend_sched_alloc_graph(ggml_backend_sched_t sched, struct ggml_cgraph * graph) {
     GGML_ASSERT((int)sched->hash_set.size >= graph->n_nodes + graph->n_leafs);
+    GGML_ASSERT(!sched->is_alloc);
+
+    sched->cur_copy = sched->next_copy;
+    sched->next_copy = (sched->next_copy + 1) % sched->n_copies;
 
     ggml_backend_sched_split_graph(sched, graph);
 
@@ -1590,7 +1593,7 @@ void ggml_backend_sched_synchronize(ggml_backend_sched_t sched) {
         // if the graph is not already allocated, always use copy 0 after a synchronization
         // this ensures that during generation the same copy is used every time,
         // which avoids changes in the graph that could cause CUDA or other graphs to be disabled
-        sched->cur_copy = 0;
+        sched->next_copy = 0;
     }
 }
Repository: denoland/deno
Pull request: test(ext/node): reduce race condition in test case

This partially addresses #27154 (https://github.com/denoland/deno/issues/27154#issuecomment-2513347521 )

This PR reduces the race condition in unit_node test case `[node/http] client closing a streaming request doesn't terminate server`.

This now resolves the deferred when the server received the error, which is the required condition for the next assertion after `await deferred1.promise`. This should be more correct than resolving it using timer.

Changed files:
filename: tests/unit_node/http_test.ts
patch: @@ -1370,6 +1370,7 @@ Deno.test("[node/http] client closing a streaming request doesn't terminate serv
   let interval: number;
   let uploadedData = "";
   let requestError: Error | null = null;
+  const deferred1 = Promise.withResolvers<void>();
   const server = http.createServer((req, res) => {
     res.writeHead(200, { "Content-Type": "text/plain" });
     interval = setInterval(() => {
@@ -1382,13 +1383,13 @@ Deno.test("[node/http] client closing a streaming request doesn't terminate serv
       clearInterval(interval);
     });
     req.on("error", (err) => {
+      deferred1.resolve();
       requestError = err;
       clearInterval(interval);
       res.end();
     });
   });
 
-  const deferred1 = Promise.withResolvers<void>();
   server.listen(0, () => {
     // deno-lint-ignore no-explicit-any
     const port = (server.address() as any).port;
@@ -1418,9 +1419,6 @@ Deno.test("[node/http] client closing a streaming request doesn't terminate serv
 
         if (sentChunks >= 3) {
           client.destroy();
-          setTimeout(() => {
-            deferred1.resolve();
-          }, 40);
         } else {
           setTimeout(writeChunk, 10);
         }
Repository: ggml-org/llama.cpp
Pull request: sync : ggml


Changed files:
filename: scripts/sync-ggml.last
patch: @@ -1 +1 @@
-3323219cd3cc050e5c7133cd4fc1e50d1f590faf
+56938c4a3b2d923f42040f9ad32d229c76c466cd
Repository: facebook/react
Pull request: Bypass packages that are already published when confirmed by users

## Summary

I ran into some two factor certification issue and had to resume the publish script. However, this time if I confirmed the published package, it will still try to publish the same version and fail. This is not expected, and it blocks me from publishing the rest of the packages.

## How did you test this change?

I re-run the publish script after the change and successfully publish the rest of the packages.

```
? Have you run the build-and-test script? Yes

✓ Checking NPM permissions for ryancat. 881 ms

? Please provide an NPM two-factor auth token: 278924


react-devtools version 4.27.2 has already been published.

? Is this expected (will skip react-devtools@4.27.2)? Yes


react-devtools-core version 4.27.2 has already been published.

? Is this expected (will skip react-devtools-core@4.27.2)? Yes

✓ Publishing package react-devtools-inline 23.1 secs

You are now ready to publish the extension to Chrome, Edge, and Firefox:
  https://fburl.com/publish-react-devtools-extensions

When publishing to Firefox, remember the following:
  Build id: 625690
  Git archive: ******
```


Changed files:
filename: scripts/devtools/publish-release.js
patch: @@ -91,7 +91,8 @@ async function publishToNPM() {
         )} has already been published.`
       );
 
-      await confirm('Is this expected?');
+      await confirm(`Is this expected (will skip ${npmPackage}@${version})?`);
+      continue;
     }
 
     if (DRY_RUN) {
Repository: facebook/react
Pull request: Treat displayName as undefined

When we have a key we read displayName eagerly for future warnings.

In general, React should be inspecting if something is a client reference before dotting into it. However, we use displayName a lot and it kind of has defined meaning for debugging everywhere it's used so seems fine to treat this as undefined.

Changed files:
filename: packages/react-server-dom-webpack/src/ReactFlightWebpackNodeRegister.js
patch: @@ -48,6 +48,8 @@ module.exports = function register() {
           return target.filepath;
         case 'name':
           return target.name;
+        case 'displayName':
+          return undefined;
         case 'async':
           return target.async;
         // We need to special case this because createElement reads it if we pass this

filename: packages/react-server-dom-webpack/src/__tests__/ReactFlightDOM-test.js
patch: @@ -466,6 +466,13 @@ describe('ReactFlightDOM', () => {
     );
   });
 
+  it('does not throw when React inspects any deep props', () => {
+    const ClientModule = clientExports({
+      Component: function () {},
+    });
+    <ClientModule.Component key="this adds instrumentation" />;
+  });
+
   it('throws when accessing a Context.Provider below the client exports', () => {
     const Context = React.createContext();
     const ClientModule = clientExports({
Repository: electron/electron
Pull request: fix: WCO buttons hidden on Linux in fullscreen

Backport of #44621

See that PR for details.


Notes: Fixed an issue where the windows control overlay was unexpectedly visible in fullscreen on Linux.


Changed files:
filename: shell/browser/ui/views/opaque_frame_view.cc
patch: @@ -256,14 +256,17 @@ void OpaqueFrameView::LayoutWindowControls() {
   buttons_not_shown.push_back(views::FrameButton::kMinimize);
   buttons_not_shown.push_back(views::FrameButton::kClose);
 
-  for (const auto& button : leading_buttons_) {
-    ConfigureButton(button, ALIGN_LEADING);
-    std::erase(buttons_not_shown, button);
-  }
+  // We do not want to show the buttons in fullscreen mode.
+  if (!frame()->IsFullscreen()) {
+    for (const auto& button : leading_buttons_) {
+      ConfigureButton(button, ALIGN_LEADING);
+      std::erase(buttons_not_shown, button);
+    }
 
-  for (const auto& button : base::Reversed(trailing_buttons_)) {
-    ConfigureButton(button, ALIGN_TRAILING);
-    std::erase(buttons_not_shown, button);
+    for (const auto& button : base::Reversed(trailing_buttons_)) {
+      ConfigureButton(button, ALIGN_TRAILING);
+      std::erase(buttons_not_shown, button);
+    }
   }
 
   for (const auto& button_id : buttons_not_shown)
@@ -402,8 +405,7 @@ void OpaqueFrameView::ConfigureButton(views::FrameButton button_id,
                                       ButtonAlignment alignment) {
   switch (button_id) {
     case views::FrameButton::kMinimize: {
-      bool can_minimize = true;  // delegate_->CanMinimize();
-      if (can_minimize) {
+      if (window()->IsMinimizable()) {
         minimize_button_->SetVisible(true);
         SetBoundsForButton(button_id, minimize_button_, alignment);
       } else {
@@ -412,8 +414,7 @@ void OpaqueFrameView::ConfigureButton(views::FrameButton button_id,
       break;
     }
     case views::FrameButton::kMaximize: {
-      bool can_maximize = true;  // delegate_->CanMaximize();
-      if (can_maximize) {
+      if (window()->IsMaximizable()) {
         // When the window is restored, we show a maximized button; otherwise,
         // we show a restore button.
         bool is_restored = !window()->IsMaximized() && !window()->IsMinimized();
@@ -431,8 +432,12 @@ void OpaqueFrameView::ConfigureButton(views::FrameButton button_id,
       break;
     }
     case views::FrameButton::kClose: {
-      close_button_->SetVisible(true);
-      SetBoundsForButton(button_id, close_button_, alignment);
+      if (window()->IsClosable()) {
+        close_button_->SetVisible(true);
+        SetBoundsForButton(button_id, close_button_, alignment);
+      } else {
+        HideButton(button_id);
+      }
       break;
     }
   }
Repository: nodejs/node
Pull request: tools: update gyp-next to 0.18.3

This is an automated update of gyp-next to 0.18.3.

Changed files:
filename: tools/gyp/CHANGELOG.md
patch: @@ -1,5 +1,12 @@
 # Changelog
 
+## [0.18.3](https://github.com/nodejs/gyp-next/compare/v0.18.2...v0.18.3) (2024-10-08)
+
+
+### Bug Fixes
+
+* enable pch for clang on windows ([#268](https://github.com/nodejs/gyp-next/issues/268)) ([cc5838c](https://github.com/nodejs/gyp-next/commit/cc5838c4e9260bf459d71de53fbb2eebd1a6f508))
+
 ## [0.18.2](https://github.com/nodejs/gyp-next/compare/v0.18.1...v0.18.2) (2024-09-23)
 
 

filename: tools/gyp/pyproject.toml
patch: @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
 
 [project]
 name = "gyp-next"
-version = "0.18.2"
+version = "0.18.3"
 authors = [
   { name="Node.js contributors", email="ryzokuken@disroot.org" },
 ]
Repository: ggml-org/llama.cpp
Pull request: fix: restore MiniCPM inference after Granite Four changes

This commit fixes MiniCPM model inference that was broken by the Granite Four PR (#13550). The issue had two parts:

1. Missing LLM_KV_ATTENTION_LAYER_INDICES enum value that was removed, causing enum ordering to shift and breaking model metadata parsing

2. MiniCPM architecture uses llm_build_granite which was changed to use hparams.rope_finetuned instead of use_rope parameter, but MiniCPM models were not setting this flag correctly

Changes:
- Restore LLM_KV_ATTENTION_LAYER_INDICES enum and string mapping
- Set hparams.rope_finetuned = true for MiniCPM architecture

Fixes inference output from gibberish to correct model responses.

Tested with MiniCPM 0.5B model showing proper inference: Input: "你好"
Output: "你好，我是MiniCPM系列模型，由面壁智能和OpenBMB开源社区开发。详细信息请访问 https://github.com/OpenBMB/ [end of text]"

*Make sure to read the [contributing guidelines](https://github.com/ggml-org/llama.cpp/blob/master/CONTRIBUTING.md) before submitting a PR*


Changed files:
filename: src/llama-model.cpp
patch: @@ -646,6 +646,9 @@ void llama_model::load_hparams(llama_model_loader & ml) {
                 ml.get_key(LLM_KV_RESIDUAL_SCALE,              hparams.f_residual_scale);
                 ml.get_key(LLM_KV_LOGIT_SCALE,                 hparams.f_logit_scale);
 
+                // MiniCPM uses rope by default, unlike Granite which uses it as a switch
+                hparams.rope_finetuned = true;
+
                 switch (hparams.n_layer) {
                     case 52: type = LLM_TYPE_1B; break;
                     case 40: type = LLM_TYPE_2B; break;
Repository: denoland/deno
Pull request: fix(fmt): stable formatting of HTML files with JS

Closes https://github.com/denoland/deno/issues/26407
Closes https://github.com/denoland/deno/issues/26763
Closes https://github.com/denoland/deno/issues/26560
Closes https://github.com/denoland/deno/issues/26744
Closes #27030

Changed files:
filename: Cargo.lock
patch: @@ -4682,9 +4682,9 @@ dependencies = [
 
 [[package]]
 name = "markup_fmt"
-version = "0.16.0"
+version = "0.18.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f303c36143671ac6c54112eb5aa95649b169dae783fdb6ead2c0e88b408c425c"
+checksum = "fa7605bb4ad755a9ab5c96f2ce3bfd4eb8acd559b842c041fc8a5f84d63aed3a"
 dependencies = [
  "aho-corasick",
  "css_dataset",

filename: cli/Cargo.toml
patch: @@ -130,7 +130,7 @@ libz-sys.workspace = true
 log = { workspace = true, features = ["serde"] }
 lsp-types.workspace = true
 malva = "=0.11.0"
-markup_fmt = "=0.16.0"
+markup_fmt = "=0.18.0"
 memmem.workspace = true
 monch.workspace = true
 notify.workspace = true

filename: cli/tools/fmt.rs
patch: @@ -440,8 +440,10 @@ pub fn format_html(
           )
         }
         _ => {
-          let mut typescript_config =
-            get_resolved_typescript_config(fmt_options);
+          let mut typescript_config_builder =
+            get_typescript_config_builder(fmt_options);
+          typescript_config_builder.file_indent_level(hints.indent_level);
+          let mut typescript_config = typescript_config_builder.build();
           typescript_config.line_width = hints.print_width as u32;
           dprint_plugin_typescript::format_text(
             &path,
@@ -919,9 +921,9 @@ fn files_str(len: usize) -> &'static str {
   }
 }
 
-fn get_resolved_typescript_config(
+fn get_typescript_config_builder(
   options: &FmtOptionsConfig,
-) -> dprint_plugin_typescript::configuration::Configuration {
+) -> dprint_plugin_typescript::configuration::ConfigurationBuilder {
   let mut builder =
     dprint_plugin_typescript::configuration::ConfigurationBuilder::new();
   builder.deno();
@@ -953,7 +955,13 @@ fn get_resolved_typescript_config(
     });
   }
 
-  builder.build()
+  builder
+}
+
+fn get_resolved_typescript_config(
+  options: &FmtOptionsConfig,
+) -> dprint_plugin_typescript::configuration::Configuration {
+  get_typescript_config_builder(options).build()
 }
 
 fn get_resolved_markdown_config(
@@ -1075,6 +1083,7 @@ fn get_resolved_markup_fmt_config(
   };
 
   let language_options = LanguageOptions {
+    script_formatter: Some(markup_fmt::config::ScriptFormatter::Dprint),
     quotes: Quotes::Double,
     format_comments: false,
     script_indent: true,

filename: tests/specs/fmt/html/__test__.jsonc
patch: @@ -12,6 +12,10 @@
     "broken": {
       "args": "fmt broken.html",
       "output": "broken.out"
+    },
+    "with_js": {
+      "args": "fmt --check with_js.html",
+      "output": "Checked 1 file\n"
     }
   }
 }

filename: tests/specs/fmt/html/with_js.html
patch: @@ -0,0 +1,9 @@
+<html>
+  <body>
+    <script>
+      /* some multi-line comment
+      with function below it */
+      someFunc();
+    </script>
+  </body>
+</html>
Repository: ggml-org/llama.cpp
Pull request: chat : fix kimi-k2 chat template

Fix a mistake in kimi k2 chat template, the `add_ass` was put inside the the loop, which cause the formatted text to have assistant prompt in the wrong places

Also fix a wrong code ordering in `llama-arch.cpp`


Changed files:
filename: src/llama-arch.cpp
patch: @@ -1933,12 +1933,6 @@ static const std::map<llm_arch, std::map<llm_tensor, const char *>> LLM_TENSOR_N
             { LLM_TENSOR_TOKEN_EMBD_NORM,   "token_embd_norm" },
         }
     },
-    {
-        LLM_ARCH_UNKNOWN,
-        {
-            { LLM_TENSOR_TOKEN_EMBD,      "token_embd" },
-        },
-    },
     {
         LLM_ARCH_DREAM,
         {
@@ -1956,6 +1950,12 @@ static const std::map<llm_arch, std::map<llm_tensor, const char *>> LLM_TENSOR_N
             { LLM_TENSOR_FFN_UP,          "blk.%d.ffn_up" },
         },
     },
+    {
+        LLM_ARCH_UNKNOWN,
+        {
+            { LLM_TENSOR_TOKEN_EMBD,      "token_embd" },
+        },
+    },
 };
 
 static const std::map<llm_tensor, llm_tensor_info> LLM_TENSOR_INFOS = {

filename: src/llama-chat.cpp
patch: @@ -718,10 +718,9 @@ int32_t llm_chat_apply_template(
             }
 
             ss << message->content << "
";
-
-            if (add_ass) {
-                ss << "
assistant
";
-            }
+        }
+        if (add_ass) {
+            ss << "
assistant
";
         }
     } else {
         // template not supported
Repository: nodejs/node
Pull request: typings: add missing type of `ArrayBufferPrototypeGetByteLength`

The type of `ArrayBufferPrototypeGetByteLength` was missing in `primordials.d.ts`.
<!--
Before submitting a pull request, please read:

- the CONTRIBUTING guide at https://github.com/nodejs/node/blob/HEAD/CONTRIBUTING.md
- the commit message formatting guidelines at
  https://github.com/nodejs/node/blob/HEAD/doc/contributing/pull-requests.md#commit-message-guidelines

For code changes:
1. Include tests for any bug fixes or new features.
2. Update documentation if relevant.
3. Ensure that `make -j4 test` (UNIX), or `vcbuild test` (Windows) passes.

If you believe this PR should be highlighted in the Node.js CHANGELOG
please add the `notable-change` label.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.
-->


Changed files:
filename: typings/primordials.d.ts
patch: @@ -154,6 +154,7 @@ declare namespace primordials {
   export const ArrayBufferPrototypeGetDetached: UncurryThis<typeof ArrayBuffer.prototype.detached>
   export const ArrayBufferPrototypeSlice: UncurryThis<typeof ArrayBuffer.prototype.slice>
   export const ArrayBufferPrototypeTransfer: UncurryThis<typeof ArrayBuffer.prototype.transfer>
+  export const ArrayBufferPrototypeGetByteLength: UncurryGetter<typeof ArrayBuffer.prototype , "byteLength">;
   export const AsyncIteratorPrototype: AsyncIterable<any>;
   export import BigInt = globalThis.BigInt;
   export const BigIntPrototype: typeof BigInt.prototype
Repository: electron/electron
Pull request: fix: WCO buttons hidden on Linux in fullscreen

Backport of #44621

See that PR for details.


Notes: Fixed an issue where the windows control overlay was unexpectedly visible in fullscreen on Linux.


Changed files:
filename: shell/browser/ui/views/opaque_frame_view.cc
patch: @@ -255,14 +255,17 @@ void OpaqueFrameView::LayoutWindowControls() {
   buttons_not_shown.push_back(views::FrameButton::kMinimize);
   buttons_not_shown.push_back(views::FrameButton::kClose);
 
-  for (const auto& button : leading_buttons_) {
-    ConfigureButton(button, ALIGN_LEADING);
-    std::erase(buttons_not_shown, button);
-  }
+  // We do not want to show the buttons in fullscreen mode.
+  if (!frame()->IsFullscreen()) {
+    for (const auto& button : leading_buttons_) {
+      ConfigureButton(button, ALIGN_LEADING);
+      std::erase(buttons_not_shown, button);
+    }
 
-  for (const auto& button : base::Reversed(trailing_buttons_)) {
-    ConfigureButton(button, ALIGN_TRAILING);
-    std::erase(buttons_not_shown, button);
+    for (const auto& button : base::Reversed(trailing_buttons_)) {
+      ConfigureButton(button, ALIGN_TRAILING);
+      std::erase(buttons_not_shown, button);
+    }
   }
 
   for (const auto& button_id : buttons_not_shown)
@@ -401,8 +404,7 @@ void OpaqueFrameView::ConfigureButton(views::FrameButton button_id,
                                       ButtonAlignment alignment) {
   switch (button_id) {
     case views::FrameButton::kMinimize: {
-      bool can_minimize = true;  // delegate_->CanMinimize();
-      if (can_minimize) {
+      if (window()->IsMinimizable()) {
         minimize_button_->SetVisible(true);
         SetBoundsForButton(button_id, minimize_button_, alignment);
       } else {
@@ -411,8 +413,7 @@ void OpaqueFrameView::ConfigureButton(views::FrameButton button_id,
       break;
     }
     case views::FrameButton::kMaximize: {
-      bool can_maximize = true;  // delegate_->CanMaximize();
-      if (can_maximize) {
+      if (window()->IsMaximizable()) {
         // When the window is restored, we show a maximized button; otherwise,
         // we show a restore button.
         bool is_restored = !window()->IsMaximized() && !window()->IsMinimized();
@@ -430,8 +431,12 @@ void OpaqueFrameView::ConfigureButton(views::FrameButton button_id,
       break;
     }
     case views::FrameButton::kClose: {
-      close_button_->SetVisible(true);
-      SetBoundsForButton(button_id, close_button_, alignment);
+      if (window()->IsClosable()) {
+        close_button_->SetVisible(true);
+        SetBoundsForButton(button_id, close_button_, alignment);
+      } else {
+        HideButton(button_id);
+      }
       break;
     }
   }
Repository: vercel/next.js
Pull request: Turbopack Build: Update manifest for #80238

## What?

One more test in the manifest that wasn't updated in #80238.

Closes PACK-4788

Changed files:
filename: test/turbopack-build-tests-manifest.json
patch: @@ -10248,10 +10248,9 @@
       "CSS Modules: Import Global CSS production mode should've emitted a single CSS file",
       "Custom Properties: Fail for global element in CSS Modules production mode should fail to build"
     ],
-    "failed": [
-      "CSS Modules: Importing Invalid Global CSS production mode should fail to build"
-    ],
+    "failed": [],
     "pending": [
+      "CSS Modules: Importing Invalid Global CSS production mode should fail to build",
       "CSS Modules: Import Exports production mode should've emitted a single CSS file",
       "Custom Properties: Fail for :root {} in CSS Modules production mode should fail to build"
     ],