helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: tests: Avoid floating point precision false positives in SUM

See https://github.com/ggml-org/llama.cpp/pull/17413#issuecomment-3569680359

This was easily reproducible with both Vulkan and CUDA backends by running the tests in a loop, and is a floating point precision issue. With catastrophic cancellation I could even see some very large errors like:

```
[SUM] NMSE = 0.000918274 > 0.000000100     0 -0.000063 -0.000061, diff = -0.000002
```

Changing the input distribution to not be centered around zero seems to workaround the issue.

Changed files:
filename: tests/test-backend-ops.cpp
patch: @@ -5344,6 +5344,13 @@ struct test_sum : public test_case {
     float grad_eps() override {
         return 0.1f * sqrtf(ne[0]*ne[1]*ne[2]*ne[3]);
     }
+
+    // Don't center the distribution around zero. Helps to avoid catastrophic cancellation.
+    void initialize_tensors(ggml_context * ctx) override {
+        for (ggml_tensor * t = ggml_get_first_tensor(ctx); t != nullptr; t = ggml_get_next_tensor(ctx, t)) {
+            init_tensor_uniform(t, -0.9f, 1.1f);
+        }
+    }
 };
 
 // GGML_OP_SUM_ROWS
@@ -5410,6 +5417,13 @@ struct test_mean : public test_case {
     float grad_eps() override {
         return 0.1f * ne[0]*ne[1]*ne[2]*ne[3];
     }
+
+    // Don't center the distribution around zero. Helps to avoid catastrophic cancellation.
+    void initialize_tensors(ggml_context * ctx) override {
+        for (ggml_tensor * t = ggml_get_first_tensor(ctx); t != nullptr; t = ggml_get_next_tensor(ctx, t)) {
+            init_tensor_uniform(t, -0.9f, 1.1f);
+        }
+    }
 };
 
 // GGML_OP_UPSCALE
Repository: facebook/react
Pull request: [compiler] Allow inferred non-optional paths when manual deps were optional

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30840
* #30838
* #30836
* #30819
* __->__ #30816
* #30814
* #30813
* #30812
* #30811

If the inferred deps are more precise (non-optional) than the manual deps (optional) it should pass validation.

The other direction also seems like it would be fine - inferring optional deps when the original was non-optional - but for now let's keep the "at least as precise" rule.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.ts
patch: @@ -8,7 +8,6 @@
 import {CompilerError} from '..';
 import {
   DeclarationId,
-  DependencyPath,
   InstructionId,
   InstructionKind,
   Place,
Repository: denoland/deno
Pull request: fix(ext/node): use non-blocking write in fs.writev

fs.writev inner async function was calling io.writeSync (blocking) instead of io.write (async). \
This switches to the non-blocking variant.

Also, enables 4 node compat tests:
- test-fs-writev.js
- test-fs-writev-promises.js
- test-fs-writev-sync.js
- test-pipe-writev.js


Changed files:
filename: ext/node/polyfills/fs.ts
patch: @@ -2096,7 +2096,7 @@ function writev(
     let currentOffset = 0;
     // deno-lint-ignore prefer-primordials
     while (currentOffset < buffer.byteLength) {
-      currentOffset += await io.writeSync(fd, buffer.subarray(currentOffset));
+      currentOffset += await io.write(fd, buffer.subarray(currentOffset));
     }
     return currentOffset - offset;
   };

filename: tests/node_compat/config.jsonc
patch: @@ -835,6 +835,9 @@
     "parallel/test-fs-write-optional-params.js": {},
     "parallel/test-fs-write-stream-encoding.js": {},
     "parallel/test-fs-write-sync-optional-params.js": {},
+    "parallel/test-fs-writev.js": {},
+    "parallel/test-fs-writev-promises.js": {},
+    "parallel/test-fs-writev-sync.js": {},
     "parallel/test-global-console-exists.js": {},
     "parallel/test-global-domexception.js": {},
     "parallel/test-global-encoder.js": {},
@@ -1596,6 +1599,7 @@
     },
     "parallel/test-pipe-head.js": {},
     "parallel/test-pipe-return-val.js": {},
+    "parallel/test-pipe-writev.js": {},
     "parallel/test-preload-worker.js": {},
     "parallel/test-primordials-apply.js": {
       "ignore": true,
Repository: electron/electron
Pull request: test: add response to bluetooth request possibilities

Backport of #47725

See that PR for details.


Notes: none

Changed files:
filename: spec/chromium-spec.ts
patch: @@ -3644,8 +3644,14 @@ describe('navigator.bluetooth', () => {
 
   it('can request bluetooth devices', async () => {
     const bluetooth = await w.webContents.executeJavaScript(`
-    navigator.bluetooth.requestDevice({ acceptAllDevices: true}).then(device => "Found a device!").catch(err => err.message);`, true);
-    expect(bluetooth).to.be.oneOf(['Found a device!', 'Bluetooth adapter not available.', 'User cancelled the requestDevice() chooser.']);
+    navigator.bluetooth.requestDevice({ acceptAllDevices: true }).then(device => "Found a device!").catch(err => err.message);`, true);
+    const requestResponses = [
+      'Found a device!',
+      'Bluetooth adapter not available.',
+      'User cancelled the requestDevice() chooser.',
+      'User denied the browser permission to scan for Bluetooth devices.'
+    ];
+    expect(bluetooth).to.be.oneOf(requestResponses, `Unexpected response: ${bluetooth}`);
   });
 });
 
@@ -3675,6 +3681,7 @@ describe('navigator.hid', () => {
     server.close();
     closeAllWindows();
   });
+
   afterEach(() => {
     session.defaultSession.setPermissionCheckHandler(null);
     session.defaultSession.setDevicePermissionHandler(null);
Repository: ggml-org/llama.cpp
Pull request: test-backend-ops: improve msvc build time

Incremental build time for test-backend-ops with msvc has gotten much worse as make_test_cases_eval has gotten larger, it seems to be hitting some non-linear time thing in the compiler. This change disables optimizations for that function to workaround it.

```
before:
========== Build started at 4:10 PM and took 31.201 seconds ==========

after:
========== Build started at 4:09 PM and took 05.400 seconds ==========
```

Another option would be to split this function into smaller functions. I experimented with this and it helps, not quite as much, and is a more disruptive change that may still regress in the future. So I think the pragma would be better.


Changed files:
filename: tests/test-backend-ops.cpp
patch: @@ -6710,6 +6710,11 @@ static const ggml_type other_types[] = {
     GGML_TYPE_BF16,
 };
 
+#ifdef _MSC_VER
+// Workaround long compile time with msvc
+#pragma optimize("", off)
+#endif
+
 // Test cases for evaluation: should try to cover edge cases while using small input sizes to keep the runtime low
 static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
     std::vector<std::unique_ptr<test_case>> test_cases;
@@ -7996,6 +8001,9 @@ static std::vector<std::unique_ptr<test_case>> make_test_cases_eval() {
 
     return test_cases;
 }
+#ifdef _MSC_VER
+#pragma optimize("", on)
+#endif
 
 // Test cases for performance evaluation: should be representative of real-world use cases
 static std::vector<std::unique_ptr<test_case>> make_test_cases_perf() {
Repository: vercel/next.js
Pull request: Rspack: Fix lockfile test on rspack

Noticed this on https://github.com/vercel/next.js/pull/84673

We don't run rspack test on every PR, so this wasn't caught before.

Closes PACK-5661

Changed files:
filename: test/development/lockfile/lockfile.test.ts
patch: @@ -3,7 +3,7 @@ import execa from 'execa'
 import stripAnsi from 'strip-ansi'
 
 describe('lockfile', () => {
-  const { next, isTurbopack } = nextTestSetup({
+  const { next, isTurbopack, isRspack } = nextTestSetup({
     files: __dirname,
   })
 
@@ -13,7 +13,11 @@ describe('lockfile', () => {
 
     const { stdout, stderr, exitCode } = await execa(
       'pnpm',
-      ['next', 'dev', isTurbopack ? '--turbopack' : '--webpack'],
+      [
+        'next',
+        'dev',
+        ...(isRspack ? [] : [isTurbopack ? '--turbopack' : '--webpack']),
+      ],
       {
         cwd: next.testDir,
         env: next.env as NodeJS.ProcessEnv,
Repository: ollama/ollama
Pull request: update libraries for langchain_community + llama3 changed from llama2

Changed:
- run ->invoke for updated lib 
- updated langchain libraries for non-depreciated
- updated llama2 to llama3

Changed files:
filename: examples/langchain-python-rag-websummary/main.py
patch: @@ -1,12 +1,12 @@
-from langchain.llms import Ollama
-from langchain.document_loaders import WebBaseLoader
+from langchain_community.llms import Ollama
+from langchain_community.document_loaders import WebBaseLoader
 from langchain.chains.summarize import load_summarize_chain
 
 loader = WebBaseLoader("https://ollama.com/blog/run-llama2-uncensored-locally")
 docs = loader.load()
 
-llm = Ollama(model="llama2")
+llm = Ollama(model="llama3")
 chain = load_summarize_chain(llm, chain_type="stuff")
 
-result = chain.run(docs)
+result = chain.invoke(docs) 
 print(result)
Repository: huggingface/transformers
Pull request: Double router compute?

# What does this PR do?

Not sure what the intended fix is (force f32 or not) but currently the first is ignored

Changed files:
filename: src/transformers/models/deepseek_v2/modeling_deepseek_v2.py
patch: @@ -117,7 +117,6 @@ def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
         residuals = hidden_states
         orig_shape = hidden_states.shape
         router_logits = nn.functional.linear(hidden_states.type(torch.float32), self.gate.weight.type(torch.float32))
-        router_logits = self.gate(hidden_states)
         topk_indices, topk_weights = self.route_tokens_to_experts(router_logits)
         hidden_states = hidden_states.view(-1, hidden_states.shape[-1])
         hidden_states = self.experts(hidden_states, topk_indices, topk_weights).view(*orig_shape)

filename: src/transformers/models/deepseek_v2/modular_deepseek_v2.py
patch: @@ -275,7 +275,6 @@ def forward(self, hidden_states: torch.Tensor) -> torch.Tensor:
         residuals = hidden_states
         orig_shape = hidden_states.shape
         router_logits = nn.functional.linear(hidden_states.type(torch.float32), self.gate.weight.type(torch.float32))
-        router_logits = self.gate(hidden_states)
         topk_indices, topk_weights = self.route_tokens_to_experts(router_logits)
         hidden_states = hidden_states.view(-1, hidden_states.shape[-1])
         hidden_states = self.experts(hidden_states, topk_indices, topk_weights).view(*orig_shape)
Repository: electron/electron
Pull request: test: add response to bluetooth request possibilities

#### Description of Change

See test failure - we should take this possible outcome into account as it can also occur locally.

<img width="812" height="188" alt="Screenshot 2025-07-11 at 4 02 05 PM" src="https://github.com/user-attachments/assets/09bf07f5-a84e-4b00-9adc-7c53ab034049" />


#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `npm test` passes
- [x] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
- [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: none

Changed files:
filename: spec/chromium-spec.ts
patch: @@ -3654,8 +3654,14 @@ describe('navigator.bluetooth', () => {
 
   it('can request bluetooth devices', async () => {
     const bluetooth = await w.webContents.executeJavaScript(`
-    navigator.bluetooth.requestDevice({ acceptAllDevices: true}).then(device => "Found a device!").catch(err => err.message);`, true);
-    expect(bluetooth).to.be.oneOf(['Found a device!', 'Bluetooth adapter not available.', 'User cancelled the requestDevice() chooser.']);
+    navigator.bluetooth.requestDevice({ acceptAllDevices: true }).then(device => "Found a device!").catch(err => err.message);`, true);
+    const requestResponses = [
+      'Found a device!',
+      'Bluetooth adapter not available.',
+      'User cancelled the requestDevice() chooser.',
+      'User denied the browser permission to scan for Bluetooth devices.'
+    ];
+    expect(bluetooth).to.be.oneOf(requestResponses, `Unexpected response: ${bluetooth}`);
   });
 });
 
@@ -3685,6 +3691,7 @@ describe('navigator.hid', () => {
     server.close();
     closeAllWindows();
   });
+
   afterEach(() => {
     session.defaultSession.setPermissionCheckHandler(null);
     session.defaultSession.setDevicePermissionHandler(null);
Repository: facebook/react
Pull request: [compiler] Add DependencyPath optional property

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30840
* #30838
* #30836
* #30819
* #30816
* #30814
* __->__ #30813
* #30812
* #30811

Adds an `optional: boolean` property to each token in a DependencyPath, currently always set to false. Also updates the equality and printing logic for paths to account for this field.

Subsequent PRs will update our logic to determine which manual dependencies were optional, then we can start inferring optional deps as well.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.ts
patch: @@ -8,7 +8,6 @@
 import {CompilerError} from '..';
 import {
   DeclarationId,
-  DependencyPath,
   InstructionId,
   InstructionKind,
   Place,
Repository: nodejs/node
Pull request: tools: print appropriate output when test aborted

this distinguishes test abort from all tests passed.

Previously, "All tests passed." was printed even when the user aborted the test using the keyboard (e.g., Ctrl+C), as long as no test failures had occurred.

fixes https://github.com/nodejs/node/issues/59795

<!--
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: tools/test.py
patch: @@ -174,7 +174,7 @@ def Run(self, tasks) -> Dict:
       raise
     self.Done()
     return {
-      'allPassed': not self.failed,
+      'allPassed': not self.failed and not self.shutdown_event.is_set(),
       'failed': self.failed,
     }
 
@@ -1843,11 +1843,12 @@ def should_keep(case):
 
   if result['allPassed']:
     print("\nAll tests passed.")
-  else:
+  elif result['failed']:
     print("\nFailed tests:")
     for failure in result['failed']:
       print(EscapeCommand(failure.command))
-
+  else:
+    print("\nTest aborted.")
   return exitcode
Repository: ollama/ollama
Pull request: Allocate a large enough kv cache for all parallel requests

This fixes `opts.NumCtx` being assigned correctly

Changed files:
filename: server/sched.go
patch: @@ -93,6 +93,9 @@ func InitScheduler(ctx context.Context) *Scheduler {
 
 // context must be canceled to decrement ref count and release the runner
 func (s *Scheduler) GetRunner(c context.Context, model *Model, opts api.Options, sessionDuration time.Duration) (chan *runnerRef, chan error) {
+	// allocate a large enough kv cache for all parallel requests
+	opts.NumCtx = opts.NumCtx * numParallel
+
 	req := &LlmRequest{
 		ctx:             c,
 		model:           model,
@@ -101,8 +104,7 @@ func (s *Scheduler) GetRunner(c context.Context, model *Model, opts api.Options,
 		successCh:       make(chan *runnerRef),
 		errCh:           make(chan error, 1),
 	}
-	// context split across parallel threads
-	opts.NumCtx = opts.NumCtx * numParallel
+
 	select {
 	case s.pendingReqCh <- req:
 	default:
Repository: electron/electron
Pull request: ci: roll `BUILD_TOOLS_SHA` for macOS 15.5 SDK

Backport of #47694

See that PR for details.


Notes: none

Changed files:
filename: .github/actions/install-build-tools/action.yml
patch: @@ -14,7 +14,7 @@ runs:
         git config --global core.longpaths true
         git config --global core.preloadindex true
       fi
-      export BUILD_TOOLS_SHA=0a7f6bef9453ceee45612442660ca16d2c40171b
+      export BUILD_TOOLS_SHA=274cba0474f0d1e4e6adbb66c1da48556cb0add5
       npm i -g @electron/build-tools
       # Update depot_tools to ensure python
       e d update_depot_tools
Repository: ggml-org/llama.cpp
Pull request: ggml : document occupancy heuristics in cuda_op_mean call to reduce_rows kernal

Added comments to `ggml_cuda_op_mean` to explain the logic behind the thread block size selection (512 vs 128 vs 32) for calling `reduce_rows` kernal

As a newcomer to the codebase, I spent a significant amount of time trying to decipher why these specific "magic numbers" were chosen and how the `nsm` check works. I dug through the commit history to find the original optimization context regarding latency hiding and scheduler overhead.

This inline documentation documents those heuristics so future contributors don't have to repeat that archaeology work.

Changed files:
filename: ggml/src/ggml-cuda/mean.cu
patch: @@ -63,6 +63,9 @@ void ggml_cuda_op_mean(ggml_backend_cuda_context & ctx, ggml_tensor * dst) {
 
     const int id  = ggml_cuda_get_device();
     const int nsm = ggml_cuda_info().devices[id].nsm;
+
+    // Heuristic for block size selection to optimize occupancy.
+    // See discussion in: https://github.com/ggml-org/llama.cpp/pull/15132
     if ((nrows / nsm) < 2) {
         const dim3 block_dims(512, 1, 1);
         reduce_rows_f32</*norm=*/true><<<block_nums, block_dims, 0, stream>>>(src0_d, dst_d, ncols);
Repository: electron/electron
Pull request: ci: roll `BUILD_TOOLS_SHA` for macOS 15.5 SDK

#### Description of Change

As in title.

See [diff](https://github.com/electron/build-tools/compare/274cba0474f0d1e4e6adbb66c1da48556cb0add5..e5e0b7a7470a398cb3fe92eceaf0f8837dcc4d1b).

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd
- [x] `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: none

Changed files:
filename: .github/actions/install-build-tools/action.yml
patch: @@ -14,7 +14,7 @@ runs:
         git config --global core.longpaths true
         git config --global core.preloadindex true
       fi
-      export BUILD_TOOLS_SHA=0a7f6bef9453ceee45612442660ca16d2c40171b
+      export BUILD_TOOLS_SHA=274cba0474f0d1e4e6adbb66c1da48556cb0add5
       npm i -g @electron/build-tools
       # Update depot_tools to ensure python
       e d update_depot_tools
Repository: denoland/deno
Pull request: fix(ext/node): wrap non-Error unhandled rejections in ERR_UNHANDLED_REJECTION

## Summary

- When a promise is rejected with a non-Error value (e.g. `Promise.reject(null)`) and there are no `unhandledRejection` listeners, Node.js wraps the rejection reason in an `ERR_UNHANDLED_REJECTION` error before routing it to `uncaughtException`. Deno was passing the raw value directly, which caused crashes when exception handlers accessed `.message` or `.name`.
- This fixes `test-promise-unhandled-default.js` in the node compat test suite (also unblocks `test-promise-unhandled-throw.js` which tests the same wrapping logic under `--unhandled-rejections=throw`).

## Test plan

- `cargo test --test node_compat test-promise-unhandled-default` passes (was failing before)
- Full promise test suite: went from 16/20 failing to 14/20 failing (remaining failures are due to missing `v8.promiseHooks`, `--unhandled-rejections` flag, and `process.on('multipleResolves')`)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Changed files:
filename: ext/node/polyfills/process.ts
patch: @@ -1086,7 +1086,29 @@ function synchronizeListeners() {
         // listeners.
 
         event.preventDefault();
-        uncaughtExceptionHandler(event.reason, "unhandledRejection");
+
+        let reason = event.reason;
+        // If the rejection reason is not an Error, wrap it in an
+        // ERR_UNHANDLED_REJECTION error, matching Node.js behavior.
+        if (!(reason instanceof Error)) {
+          const message = "This error originated either by throwing " +
+            "inside of an async function without a catch block, or by rejecting a " +
+            "promise which was not handled with .catch(). The promise rejected with the" +
+            ` reason "${reason}".`;
+          const err = new Error(message);
+          // deno-lint-ignore no-explicit-any
+          (err as any).code = "ERR_UNHANDLED_REJECTION";
+          // deno-lint-ignore no-explicit-any
+          (err as any).reason = event.reason;
+          Object.defineProperty(err, "name", {
+            value: "UnhandledPromiseRejection",
+            writable: true,
+            configurable: true,
+          });
+          reason = err;
+        }
+
+        uncaughtExceptionHandler(reason, "unhandledRejection");
         return;
       }
Repository: facebook/react
Pull request: [compiler] Wrap ReactiveScopeDep path tokens in object

Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom):
* #30840
* #30838
* #30836
* #30819
* #30816
* #30814
* #30813
* __->__ #30812
* #30811

Previously the path of a ReactiveScopeDependency was `Array<string>`. We need to track whether each property access is optional or not, so as a first step we change this to `Array<{property: string}>`, making space for an additional property in a subsequent PR.

Changed files:
filename: compiler/packages/babel-plugin-react-compiler/src/ReactiveScopes/MergeReactiveScopesThatInvalidateTogether.ts
patch: @@ -8,7 +8,6 @@
 import {CompilerError} from '..';
 import {
   DeclarationId,
-  DependencyPath,
   InstructionId,
   InstructionKind,
   Place,