helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: opencl: use `max_alloc_size` in backend ctx instead of querying again

`max_alloc_size` has been queried and stored in `ggml_backend_opencl_context`, so we can just use it.


Changed files:
filename: ggml/src/ggml-opencl/ggml-opencl.cpp
patch: @@ -924,27 +924,24 @@ static ggml_backend_opencl_context * ggml_cl2_init(ggml_backend_dev_t dev) {
     // TODO: fixme: these sizes are hardcoded for now.
     //  they should be allocated based on the model's size
     //  and the device's max alloc size
-    size_t max_alloc_size;
-    CL_CHECK(clGetDeviceInfo(device, CL_DEVICE_MAX_MEM_ALLOC_SIZE, sizeof(size_t), &max_alloc_size, NULL));
-
     // Allocate intermediate buffers and images
     size_t required_A_q_d_bytes = 311164928;
     size_t required_A_s_d_bytes = 38895616;
     size_t required_B_d_bytes = 45088768;
 
     // Ensure buffer sizes do not exceed the maximum allocation size
-    size_t max_A_q_d_bytes = MIN(required_A_q_d_bytes, max_alloc_size);
-    size_t max_A_s_d_bytes = MIN(required_A_s_d_bytes, max_alloc_size);
-    size_t max_B_d_bytes   = MIN(required_B_d_bytes, max_alloc_size);
-    if (required_A_q_d_bytes > max_alloc_size) {
+    size_t max_A_q_d_bytes = MIN(required_A_q_d_bytes, backend_ctx->max_alloc_size);
+    size_t max_A_s_d_bytes = MIN(required_A_s_d_bytes, backend_ctx->max_alloc_size);
+    size_t max_B_d_bytes   = MIN(required_B_d_bytes, backend_ctx->max_alloc_size);
+    if (required_A_q_d_bytes > backend_ctx->max_alloc_size) {
         GGML_LOG_WARN("ggml_opencl: A_q_d buffer size reduced from %zu to %zu due to device limitations.\n",
                       required_A_q_d_bytes, max_A_q_d_bytes);
     }
-    if (required_A_s_d_bytes > max_alloc_size) {
+    if (required_A_s_d_bytes > backend_ctx->max_alloc_size) {
         GGML_LOG_WARN("ggml_opencl: A_s_d buffer size reduced from %zu to %zu due to device limitations.\n",
                       required_A_s_d_bytes, max_A_s_d_bytes);
     }
-    if (required_B_d_bytes > max_alloc_size) {
+    if (required_B_d_bytes > backend_ctx->max_alloc_size) {
         GGML_LOG_WARN("ggml_opencl: B_d buffer size reduced from %zu to %zu due to device limitations.\n",
                       required_B_d_bytes, max_B_d_bytes);
     }
Repository: electron/electron
Pull request: build: fix build when `enable_pdf_viewer` and `enable_electron_extensions` disabled

Backport of #43206

See that PR for details.


Notes: none

Changed files:
filename: shell/browser/api/electron_api_session.cc
patch: @@ -47,6 +47,7 @@
 #include "net/base/completion_repeating_callback.h"
 #include "net/base/load_flags.h"
 #include "net/base/network_anonymization_key.h"
+#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
 #include "net/http/http_auth_handler_factory.h"
 #include "net/http/http_auth_preferences.h"
 #include "net/http/http_cache.h"

filename: shell/browser/electron_browser_context.cc
patch: @@ -311,8 +311,10 @@ ElectronBrowserContext::~ElectronBrowserContext() {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   NotifyWillBeDestroyed();
 
+#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
   // the DestroyBrowserContextServices() call below frees this.
   extension_system_ = nullptr;
+#endif
 
   // Notify any keyed services of browser context destruction.
   BrowserContextDependencyManager::GetInstance()->DestroyBrowserContextServices(
Repository: huggingface/transformers
Pull request: add gpt2 test on XPU

Hi @SunMarc . We used to skip the gpt2 bnb tests due to the precision error, but now it has been fixed. We enable gpt2 bnb model test on the test script, and it can pass!

Also, the mix-precision 8-bit training on CPU and XPU has been fixed.

cc @Titus-von-Koeller @matthewdouglas 

Changed files:
filename: tests/quantization/bnb/test_4bit.py
patch: @@ -626,7 +626,6 @@ def test_training(self):
 
 
 @apply_skip_if_not_implemented
-@unittest.skipIf(torch_device == "xpu", reason="XPU has precision issue on gpt model, will test it once fixed")
 class Bnb4BitGPT2Test(Bnb4BitTest):
     model_name = "openai-community/gpt2-xl"
     EXPECTED_RELATIVE_DIFFERENCE = 3.3191854854152187

filename: tests/quantization/bnb/test_mixed_int8.py
patch: @@ -889,6 +889,7 @@ def test_training(self):
 
         # Step 1: freeze all parameters
         model = AutoModelForCausalLM.from_pretrained(self.model_name, load_in_8bit=True)
+        model.train()
 
         if torch.cuda.is_available():
             self.assertEqual(set(model.hf_device_map.values()), {torch.cuda.current_device()})
@@ -914,14 +915,9 @@ def test_training(self):
         batch = self.tokenizer("Test batch ", return_tensors="pt").to(torch_device)
 
         # Step 4: Check if the gradient is not None
-        if torch_device in {"xpu", "cpu"}:
-            # XPU and CPU finetune do not support autocast for now.
+        with torch.autocast(torch_device):
             out = model.forward(**batch)
             out.logits.norm().backward()
-        else:
-            with torch.autocast(torch_device):
-                out = model.forward(**batch)
-                out.logits.norm().backward()
 
         for module in model.modules():
             if isinstance(module, LoRALayer):
@@ -932,7 +928,6 @@ def test_training(self):
 
 
 @apply_skip_if_not_implemented
-@unittest.skipIf(torch_device == "xpu", reason="XPU has precision issue on gpt model, will test it once fixed")
 class MixedInt8GPT2Test(MixedInt8Test):
     model_name = "openai-community/gpt2-xl"
     EXPECTED_RELATIVE_DIFFERENCE = 1.8720077507258357
Repository: nodejs/node
Pull request: doc: remove random horizontal separators in `process.md`

They don't seem to have any meaning (the sections it separates are not more different than any other pair of two sections) and I don't think we use those anywhere else in our docs, I suspect they were added by mistake.
<!--
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: doc/api/process.md
patch: @@ -1956,8 +1956,6 @@ added: v4.8.0
 
 A boolean value that is `true` if the current Node.js build includes support for ALPN in TLS.
 
-***
-
 ## `process.features.tls_ocsp`
 
 <!-- YAML
@@ -1968,8 +1966,6 @@ added: v0.11.13
 
 A boolean value that is `true` if the current Node.js build includes support for OCSP in TLS.
 
-***
-
 ## `process.features.tls_sni`
 
 <!-- YAML
@@ -1980,8 +1976,6 @@ added: v0.5.3
 
 A boolean value that is `true` if the current Node.js build includes support for SNI in TLS.
 
-***
-
 ## `process.features.uv`
 
 <!-- YAML
Repository: facebook/react
Pull request: [DevTools] Fix runtime error when inspecting an element times out

## Summary

Back in #22280, we added error handlers when calling `inspectElementMutableSource` in order to at least log the errors to the console or handle them.

However, while testing the standalone app, I noticed that the error handler inside `inspectedElementCache.js` was actually being called with an `undefined` error, which then produced a new runtime error when trying to access `error.message`: https://github.com/facebook/react/blob/e8feb11b62e869804970258fa629922edbfc836b/packages/react-devtools-shared/src/inspectedElementCache.js#L133-L141

I traced this back to this promise in `backendAPI.js` which was rejecting without any error, making the error `undefined`: https://github.com/facebook/react/blob/e8feb11b62e869804970258fa629922edbfc836b/packages/react-devtools-shared/src/backendAPI.js#L159-L162

The fix in this commit is to pass an error when rejecting the promise 

## Test Plan

- yarn flow
- yarn test
- yarn test-build-devtools
- inspecting elements no longer fail with undefined errors or produce other runtime errors

**Before**

![image](https://user-images.githubusercontent.com/1271509/133510663-e09d5af0-dca5-433f-b531-7b2e219a4e99.png)


**After**
![image](https://user-images.githubusercontent.com/1271509/133510032-8a7850e8-3f09-427a-b255-00706249ef6a.png)


Changed files:
filename: packages/react-devtools-shared/src/backendAPI.js
patch: @@ -158,7 +158,9 @@ function getPromiseForRequestID<T>(
 
     const onTimeout = () => {
       cleanup();
-      reject();
+      reject(
+        new Error(`Timed out waiting for event '${eventType}' from bridge`),
+      );
     };
 
     bridge.addListener(eventType, onInspectedElement);
Repository: facebook/react
Pull request: Fixed issue for better bundles,chunks and workers name in devtools-extensions.


<!--
  Thanks for submitting a pull request!
  We appreciate you spending the time to work on these changes. Please provide enough information so that others can review your pull request. The three fields below are mandatory.

  Before submitting a pull request, please make sure the following is done:

  1. Fork [the repository](https://github.com/facebook/react) and create your branch from `main`.
  2. Run `yarn` in the repository root.
  3. If you've fixed a bug or added code that should be tested, add tests!
  4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch TestName` is helpful in development.
  5. Run `yarn test --prod` to test in the production environment. It supports the same options as `yarn test`.
  6. If you need a debugger, run `yarn debug-test --watch TestName`, open `chrome://inspect`, and press "Inspect".
  7. Format your code with [prettier](https://github.com/prettier/prettier) (`yarn prettier`).
  8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

  Learn more about contributing: https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

This Pull request fixes #22115 

## How did you test this change?
 ran `yarn test:chrome `
<!--
  Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes the user interface.
  How exactly did you verify that your PR solves the issue you wanted to solve?
  If you leave this empty, your PR will very likely be closed.
-->
## Demonstration of the proposed changes
Using magic comments on dynamic imports fixes the chunk names properly. 
For workers I added a name property to the workerize-loader in webpack.config.js

## Result
Now the files after building devtools-extensions are as follows.
![image](https://user-images.githubusercontent.com/51379307/133440506-e255da71-cc50-48da-9a98-3b02361b6441.png)


Changed files:
filename: packages/react-devtools-extensions/src/main.js
patch: @@ -331,7 +331,9 @@ function createPanelIfReactLoaded() {
 
         // TODO (Webpack 5) Hopefully we can remove this prop after the Webpack 5 migration.
         const hookNamesModuleLoaderFunction = () =>
-          import('react-devtools-shared/src/hooks/parseHookNames');
+          import(
+            /* webpackChunkName: 'parseHookNames' */ 'react-devtools-shared/src/hooks/parseHookNames'
+          );
 
         root = createRoot(document.createElement('div'));
 

filename: packages/react-devtools-extensions/webpack.config.js
patch: @@ -114,6 +114,7 @@ module.exports = {
             loader: 'workerize-loader',
             options: {
               inline: true,
+              name: '[name]',
             },
           },
           {
Repository: huggingface/transformers
Pull request: Fix state_dict map location when quantized

# What does this PR do?

Fix following https://github.com/huggingface/transformers/pull/35926. If we now allow to load on meta with quantization as well, we need to be coherent on both sides


Changed files:
filename: src/transformers/modeling_utils.py
patch: @@ -4897,7 +4897,7 @@ def _load_pretrained_model(
 
             map_location = "cpu"
             if low_cpu_mem_usage:
-                if shard_file.endswith(".safetensors") and not is_quantized:
+                if shard_file.endswith(".safetensors"):
                     map_location = "meta"
                 elif (
                     device_map is not None
Repository: nodejs/node
Pull request: doc: put --env-file-if-exists=config right under --env-file=config

Fixes: #55129 
Refs: #53060

Changed files:
filename: doc/api/cli.md
patch: @@ -894,6 +894,15 @@ export USERNAME="nodejs" # will result in `nodejs` as the value.
 If you want to load environment variables from a file that may not exist, you
 can use the [`--env-file-if-exists`][] flag instead.
 
+### `--env-file-if-exists=config`
+
+<!-- YAML
+added: v22.9.0
+-->
+
+Behavior is the same as [`--env-file`][], but an error is not thrown if the file
+does not exist.
+
 ### `-e`, `--eval "script"`
 
 <!-- YAML
@@ -1810,15 +1819,6 @@ is being linked to Node.js. Sharing the OpenSSL configuration may have unwanted
 implications and it is recommended to use a configuration section specific to
 Node.js which is `nodejs_conf` and is default when this option is not used.
 
-### `--env-file-if-exists=config`
-
-<!-- YAML
-added: v22.9.0
--->
-
-Behavior is the same as [`--env-file`][], but an error is not thrown if the file
-does not exist.
-
 ### `--pending-deprecation`
 
 <!-- YAML
Repository: electron/electron
Pull request: ci: set labels on Dependabot PRs for GitHub Actions deps

#### Description of Change

<!--
Thank you for your Pull Request. Please provide a description above and review
the requirements below.

Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
-->

Save us a tiny bit of work with needing to label these PRs.

#### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

- [x] PR description included and stakeholders cc'd

#### Release Notes

Notes: none <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/main/README.md#examples -->


Changed files:
filename: .github/dependabot.yml
patch: @@ -7,3 +7,6 @@ updates:
     directory: /
     schedule:
       interval: weekly
+    labels:
+      - "no-backport"
+      - "semver/none"
Repository: huggingface/transformers
Pull request: skip

# What does this PR do?

skippppppppppppppp for now

Changed files:
filename: tests/models/qwen3/test_modeling_qwen3.py
patch: @@ -348,6 +348,42 @@ def setUp(self):
         self.model_tester = Qwen3ModelTester(self)
         self.config_tester = ConfigTester(self, config_class=Qwen3Config, hidden_size=37)
 
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_beam_search_generate_dict_outputs_use_cache(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_assisted_decoding_matches_greedy_search_0_random(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_contrastive_generate_dict_outputs_use_cache(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_assisted_decoding_matches_greedy_search_1_same(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_assisted_decoding_sample(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_dola_decoding_sample(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_greedy_generate_dict_outputs_use_cache(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_prompt_lookup_decoding_matches_greedy_search(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_generate_compilation_all_outputs(self):
+        pass
+
     def test_config(self):
         self.config_tester.run_common_tests()
 

filename: tests/models/qwen3_moe/test_modeling_qwen3_moe.py
patch: @@ -367,6 +367,38 @@ def setUp(self):
         self.model_tester = Qwen3MoeModelTester(self)
         self.config_tester = ConfigTester(self, config_class=Qwen3MoeConfig, hidden_size=37)
 
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_beam_search_generate_dict_outputs_use_cache(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_assisted_decoding_matches_greedy_search_0_random(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_contrastive_generate_dict_outputs_use_cache(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_assisted_decoding_matches_greedy_search_1_same(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_assisted_decoding_sample(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_dola_decoding_sample(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_greedy_generate_dict_outputs_use_cache(self):
+        pass
+
+    @unittest.skip("TODO: ask the contributor to take a look")
+    def test_prompt_lookup_decoding_matches_greedy_search(self):
+        pass
+
     def test_config(self):
         self.config_tester.run_common_tests()
Repository: denoland/deno
Pull request: fix(cli): missing flag for `--unstable-process`

Fixes #22500

Changed files:
filename: runtime/js/90_deno_ns.js
patch: @@ -245,7 +245,6 @@ const denoNs = {
   gid: os.gid,
   uid: os.uid,
   Command: process.Command,
-  // TODO(bartlomieju): why is this exported?
   ChildProcess: process.ChildProcess,
 };
 
@@ -258,10 +257,11 @@ const unstableIds = {
   http: 5,
   kv: 6,
   net: 7,
-  temporal: 8,
-  unsafeProto: 9,
-  webgpu: 10,
-  workerOptions: 11,
+  process: 8,
+  temporal: 9,
+  unsafeProto: 10,
+  webgpu: 11,
+  workerOptions: 12,
 };
 
 const denoNsUnstableById = { __proto__: null };

filename: runtime/lib.rs
patch: @@ -90,23 +90,28 @@ pub static UNSTABLE_GRANULAR_FLAGS: &[(
     "Enable unstable net APIs",
     7,
   ),
-  ("temporal", "Enable unstable Temporal API", 8),
+  (
+    ops::process::UNSTABLE_FEATURE_NAME,
+    "Enable unstable process APIs",
+    8,
+  ),
+  ("temporal", "Enable unstable Temporal API", 9),
   (
     "unsafe-proto",
     "Enable unsafe __proto__ support. This is a security risk.",
     // This number is used directly in the JS code. Search
     // for "unstableIds" to see where it's used.
-    9,
+    10,
   ),
   (
     deno_webgpu::UNSTABLE_FEATURE_NAME,
     "Enable unstable `WebGPU` API",
-    10,
+    11,
   ),
   (
     ops::worker_host::UNSTABLE_FEATURE_NAME,
     "Enable unstable Web Worker APIs",
-    11,
+    12,
   ),
 ];
Repository: vercel/next.js
Pull request: Fix Wasm example

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the PR.
- Read the Docs Contribution Guide to ensure your contribution follows the docs guidelines: https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See: https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added (https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to understand the PR)
- When linking to a Slack thread, you might want to share details of the conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes PACK-4292

Changed files:
filename: examples/with-webassembly/app/api/edge/route.ts
patch: @@ -1,6 +1,6 @@
 import type * as addWasmModule from "../../../add.wasm";
 // @ts-ignore
-import addWasm from "../../add.wasm?module";
+import addWasm from "../../../add.wasm?module";
 
 const module$ = WebAssembly.instantiate(addWasm);
 

filename: examples/with-webassembly/app/page.tsx
patch: @@ -1,11 +1,10 @@
 import Link from "next/link";
 import { RustServerComponent } from "../components/RustComponent";
 
-export default function Page({
-  searchParams,
-}: {
-  searchParams: { [key: string]: string };
+export default async function Page(props: {
+  searchParams: Promise<{ [key: string]: string }>;
 }) {
+  const searchParams = await props.searchParams;
   const number = parseInt(searchParams.number || "30");
   return (
     <div>