helloadhavan/github_issues huggingface dataset:
Repository: electron/electron
Pull request: feat: add `app.isHardwareAccelerationEnabled()`

Backport of #47614

See that PR for details.


Notes: Added `app.isHardwareAccelerationEnabled()`

Changed files:
filename: docs/api/app.md
patch: @@ -1212,6 +1212,13 @@ Disables hardware acceleration for current app.
 
 This method can only be called before app is ready.
 
+### `app.isHardwareAccelerationEnabled()`
+
+Returns `boolean` - whether hardware acceleration is currently disabled.
+
+ > [!NOTE]
+ > This information is only usable after the `gpu-info-update` event is emitted.
+
 ### `app.disableDomainBlockingFor3DAPIs()`
 
 By default, Chromium disables 3D APIs (e.g. WebGL) until restart on a per

filename: shell/browser/api/electron_api_app.cc
patch: @@ -1134,13 +1134,24 @@ void App::DisableHardwareAcceleration(gin_helper::ErrorThrower thrower) {
         "before app is ready");
     return;
   }
+
+  // If the GpuDataManager is already initialized, disable hardware
+  // acceleration immediately. Otherwise, set a flag to disable it in
+  // OnPreCreateThreads().
   if (content::GpuDataManager::Initialized()) {
     content::GpuDataManager::GetInstance()->DisableHardwareAcceleration();
   } else {
     disable_hw_acceleration_ = true;
   }
 }
 
+bool App::IsHardwareAccelerationEnabled() {
+  if (content::GpuDataManager::Initialized())
+    return content::GpuDataManager::GetInstance()
+        ->HardwareAccelerationEnabled();
+  return !disable_hw_acceleration_;
+}
+
 void App::DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower) {
   if (Browser::Get()->is_ready()) {
     thrower.ThrowError(
@@ -1908,6 +1919,8 @@ gin::ObjectTemplateBuilder App::GetObjectTemplateBuilder(v8::Isolate* isolate) {
                  &App::SetAccessibilitySupportEnabled)
       .SetMethod("disableHardwareAcceleration",
                  &App::DisableHardwareAcceleration)
+      .SetMethod("isHardwareAccelerationEnabled",
+                 &App::IsHardwareAccelerationEnabled)
       .SetMethod("disableDomainBlockingFor3DAPIs",
                  &App::DisableDomainBlockingFor3DAPIs)
       .SetMethod("getFileIcon", &App::GetFileIcon)

filename: shell/browser/api/electron_api_app.h
patch: @@ -209,6 +209,7 @@ class App final : public ElectronBrowserClient::Delegate,
   void ReleaseSingleInstanceLock();
   bool Relaunch(gin::Arguments* args);
   void DisableHardwareAcceleration(gin_helper::ErrorThrower thrower);
+  bool IsHardwareAccelerationEnabled();
   void DisableDomainBlockingFor3DAPIs(gin_helper::ErrorThrower thrower);
   bool IsAccessibilitySupportEnabled();
   v8::Local<v8::Value> GetAccessibilitySupportFeatures();

filename: spec/api-app-spec.ts
patch: @@ -149,6 +149,12 @@ describe('app module', () => {
     });
   });
 
+  describe('app.isHardwareAccelerationEnabled()', () => {
+    it('should be a boolean', () => {
+      expect(app.isHardwareAccelerationEnabled()).to.be.a('boolean');
+    });
+  });
+
   describe('app.isPackaged', () => {
     it('should be false during tests', () => {
       expect(app.isPackaged).to.equal(false);
Repository: facebook/react
Pull request: [ci] Add missing permissions




Missed these ones earlier.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32707).
* #32708
* __->__ #32707

Changed files:
filename: .github/workflows/compiler_discord_notify.yml
patch: @@ -12,6 +12,9 @@ permissions: {}
 jobs:
   check_maintainer:
     uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
+    permissions:
+      # Used by check_maintainer
+      contents: read
     with:
       actor: ${{ github.event.pull_request.user.login }}
 

filename: .github/workflows/runtime_discord_notify.yml
patch: @@ -12,6 +12,9 @@ permissions: {}
 jobs:
   check_maintainer:
     uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
+    permissions:
+      # Used by check_maintainer
+      contents: read
     with:
       actor: ${{ github.event.pull_request.user.login }}
 

filename: .github/workflows/shared_close_direct_sync_branch_prs.yml
patch: @@ -15,6 +15,9 @@ env:
 jobs:
   close_pr:
     runs-on: ubuntu-latest
+    permissions:
+      # Used to create a review and close PRs
+      pull-requests: write
     steps:
       - name: Close PR
         uses: actions/github-script@v7

filename: .github/workflows/shared_label_core_team_prs.yml
patch: @@ -13,13 +13,19 @@ env:
 jobs:
   check_maintainer:
     uses: facebook/react/.github/workflows/shared_check_maintainer.yml@main
+    permissions:
+      # Used by check_maintainer
+      contents: read
     with:
       actor: ${{ github.event.pull_request.user.login }}
 
   label:
     if: ${{ needs.check_maintainer.outputs.is_core_team == 'true' }}
     runs-on: ubuntu-latest
     needs: check_maintainer
+    permissions:
+      # Used to add labels
+      issues: write
     steps:
       - name: Label PR as React Core Team
         uses: actions/github-script@v7
Repository: vercel/next.js
Pull request: [ci] Stop running build_and_deploy on tag pushes

It's redundant. The release check is based on the commit message so the first one publishes to npm and the 2nd is wasted.

Not only is the 2nd run redundant, it also can cause both runs to slow each other down. We retry a failed publish so run 1 could retry a failed publish because it was already published in 2. And then 2 in turn could be stuck in retrying as well because 1 published a different package.

## Test plan

- [ ] Will trigger canary release once that's merged -> https://github.com/vercel/next.js/actions/runs/20243277859/job/58116629624 -> 

Changed files:
filename: .github/workflows/build_and_deploy.yml
patch: @@ -3,6 +3,8 @@ name: build-and-deploy
 
 on:
   push:
+    tags-ignore:
+      - '*'
   # we need the preview tarball for deploy tests
   pull_request:
     types: [opened, synchronize]
Repository: ollama/ollama
Pull request: server: fix warnings in prompt_test.go


Changed files:
filename: server/prompt_test.go
patch: @@ -32,7 +32,7 @@ func TestChatPrompt(t *testing.T) {
 	mllamaModel := Model{Template: tmpl, ProjectorPaths: []string{"vision"}, Config: ConfigV2{ModelFamilies: []string{"mllama"}}}
 
 	createImg := func(width, height int) ([]byte, error) {
-		img := image.NewRGBA(image.Rect(0, 0, 5, 5))
+		img := image.NewRGBA(image.Rect(0, 0, width, height))
 		var buf bytes.Buffer
 
 		if err := png.Encode(&buf, img); err != nil {
Repository: electron/electron
Pull request: fix: the parent window remained interactive after the modal window was opened

Backport of #48770

See that PR for details.


Notes: Fixed the issue where the parent window remained interactive after the modal window was opened.

Changed files:
filename: shell/browser/native_window.cc
patch: @@ -104,7 +104,8 @@ NativeWindow::NativeWindow(const gin_helper::Dictionary& options,
       transparent_{options.ValueOrDefault(options::kTransparent, false)},
       enable_larger_than_screen_{
           options.ValueOrDefault(options::kEnableLargerThanScreen, false)},
-      is_modal_{parent != nullptr && options.ValueOrDefault("modal", false)},
+      is_modal_{parent != nullptr &&
+                options.ValueOrDefault(options::kModal, false)},
       has_frame_{options.ValueOrDefault(options::kFrame, true) &&
                  title_bar_style_ == TitleBarStyle::kNormal},
       parent_{parent} {

filename: shell/browser/native_window_views.cc
patch: @@ -555,7 +555,7 @@ bool NativeWindowViews::IsFocused() const {
 }
 
 void NativeWindowViews::Show() {
-  if (is_modal() && NativeWindow::parent() && !widget()->IsVisible())
+  if (is_modal() && NativeWindow::parent())
     static_cast<NativeWindowViews*>(parent())->IncrementChildModals();
 
   widget()->native_widget_private()->Show(GetRestoredState(), gfx::Rect());

filename: shell/common/options_switches.h
patch: @@ -219,6 +219,8 @@ inline constexpr std::string_view kSpellcheck = "spellcheck";
 inline constexpr std::string_view kEnableDeprecatedPaste =
     "enableDeprecatedPaste";
 
+inline constexpr std::string_view kModal = "modal";
+
 }  // namespace options
 
 // Following are actually command line switches, should be moved to other files.
Repository: vercel/next.js
Pull request: [ci] Cancel in-progress pull_request_stats with native concurrency features

The custom cancel action is no longer needed: https://github.com/styfle/cancel-workflow-action/tree/0.12.1/

## test plan

- [x] Have to test after 
  <img width="2564" height="370" alt="CleanShot 2025-12-15 at 21 02 58@2x" src="https://github.com/user-attachments/assets/5e245222-d605-4fe7-a6c5-21a64d7ecf54" />
merge since cancel runs with the workflow source from `canary`
   > Canceling since a higher priority waiting request for Generate Pull Request Stats-refs/pull/87145/merge exists
   
   -- https://github.com/vercel/next.js/actions/runs/20245738337?pr=87145
  

Changed files:
filename: .github/workflows/cancel.yml
patch: @@ -13,5 +13,5 @@ jobs:
     steps:
       - uses: styfle/cancel-workflow-action@0.12.1
         with:
-          workflow_id: 444921, 444987, 57419851
+          workflow_id: 444987, 57419851
           access_token: ${{ github.token }}

filename: .github/workflows/pull_request_stats.yml
patch: @@ -4,6 +4,10 @@ on:
 
 name: Generate Pull Request Stats
 
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 env:
   NAPI_CLI_VERSION: 2.18.4
   TURBO_VERSION: 2.5.5
Repository: huggingface/transformers
Pull request: feat(granitemoe*): Remove logits upcast when computing loss

# What does this PR do?
When the CausalLM loss is used, the upcast is done in the loss function utils, so this is redundant.

Fixes #42709 


## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
      Pull Request section?
- [x] Was this discussed/approved via a Github issue or the [forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the
      [documentation guidelines](https://github.com/huggingface/transformers/tree/main/docs), and
      [here are tips on formatting docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Review suggestions: @ArthurZucker @Rocketknight1 @Ssukriti 


Changed files:
filename: src/transformers/models/granitemoe/modeling_granitemoe.py
patch: @@ -714,8 +714,6 @@ def forward(
 
         loss = None
         if labels is not None:
-            # Upcast to float if we need to compute the loss to avoid potential precision issues
-            logits = logits.float()
             # Flatten the tokens
             loss = self.loss_function(
                 logits,

filename: src/transformers/models/granitemoe/modular_granitemoe.py
patch: @@ -295,8 +295,6 @@ def forward(
 
         loss = None
         if labels is not None:
-            # Upcast to float if we need to compute the loss to avoid potential precision issues
-            logits = logits.float()
             # Flatten the tokens
             loss = self.loss_function(
                 logits,

filename: src/transformers/models/granitemoehybrid/modeling_granitemoehybrid.py
patch: @@ -1510,8 +1510,6 @@ def forward(
 
         loss = None
         if labels is not None:
-            # Upcast to float if we need to compute the loss to avoid potential precision issues
-            logits = logits.float()
             # Flatten the tokens
             loss = self.loss_function(
                 logits,

filename: src/transformers/models/granitemoeshared/modeling_granitemoeshared.py
patch: @@ -785,8 +785,6 @@ def forward(
 
         loss = None
         if labels is not None:
-            # Upcast to float if we need to compute the loss to avoid potential precision issues
-            logits = logits.float()
             # Flatten the tokens
             loss = self.loss_function(
                 logits,
Repository: nodejs/node
Pull request: doc: use `any` for `worker_threads.Worker` 'error' event argument `err`

<!--
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.
-->

A worker thread can throw anything via the `throw` keyword, which gets passed directly to `'error'` event listeners. The event listener should not assume it is an `Error` object.

Here is a Node.js script proofing this:
```js
import { isMainThread, Worker } from "node:worker_threads";

if (isMainThread) {
	// Main thread.

	const worker = new Worker(new URL(import.meta.url));

	worker.on("error", (err /* Documented as `Error`, but should be seen as `any`. */) => {
		console.log(typeof err); // Prints 'boolean'.
	});
} else {
	// Worker thread.

	throw false; // You can literally throw anything.
}
```

Changed files:
filename: doc/api/worker_threads.md
patch: @@ -1717,7 +1717,7 @@ changes:
 added: v10.5.0
 -->
 
-* `err` {Error}
+* `err` {any}
 
 The `'error'` event is emitted if the worker thread throws an uncaught
 exception. In that case, the worker is terminated.
Repository: ggml-org/llama.cpp
Pull request: ggml webgpu: Fix bug in dispatching large matrix-vector multiplication

Bug fix for calculating overflowing workgroup sizes for large matrix-vector multiplication batches. Should fix failures from new tests in https://github.com/ggml-org/llama.cpp/pull/19519.

This approach isn't ideal because it may over-provision workgroups by quite a bit, a better strategy is the one proposed for Vulkan in https://github.com/ggml-org/llama.cpp/pull/19509, but this will work for now.

Changed files:
filename: ggml/src/ggml-webgpu/ggml-webgpu.cpp
patch: @@ -1121,7 +1121,8 @@ static webgpu_command ggml_webgpu_mul_mat(webgpu_context & ctx,
         uint32_t batches       = dst->ne[2] * dst->ne[3];
         uint32_t output_groups = CEIL_DIV(dst->ne[0], decisions->outputs_per_wg);
         uint32_t total_wg      = output_groups * batches;
-        wg_x                   = total_wg % ctx->global_ctx->capabilities.limits.maxComputeWorkgroupsPerDimension;
+        // TODO: split large sizes into multiple batches to avoid way over-provisioning workgroups
+        wg_x = std::min(total_wg, ctx->global_ctx->capabilities.limits.maxComputeWorkgroupsPerDimension);
         wg_y = CEIL_DIV(total_wg, ctx->global_ctx->capabilities.limits.maxComputeWorkgroupsPerDimension);
     } else if (use_fast) {
         auto decisions = static_cast<ggml_webgpu_mul_mat_shader_decisions *>(pipeline.context.get());
Repository: ollama/ollama
Pull request: Install support for jetpacks

Follow up to #7217 - merge after release

Changed files:
filename: scripts/install.sh
patch: @@ -93,6 +93,22 @@ else
     fi
 fi
 
+# Check for NVIDIA JetPack systems with additional downloads
+if [ -f /etc/nv_tegra_release ] ; then
+    if grep R36 /etc/nv_tegra_release > /dev/null ; then
+        status "Downloading JetPack 6 components"
+        curl --fail --show-error --location --progress-bar \
+            "https://ollama.com/download/ollama-linux-${ARCH}-jetpack6.tgz${VER_PARAM}" | \
+            $SUDO tar -xzf - -C "$OLLAMA_INSTALL_DIR"
+    elif grep R35 /etc/nv_tegra_release > /dev/null ; then
+        status "Downloading JetPack 5 components"
+        curl --fail --show-error --location --progress-bar \
+            "https://ollama.com/download/ollama-linux-${ARCH}-jetpack5.tgz${VER_PARAM}" | \
+            $SUDO tar -xzf - -C "$OLLAMA_INSTALL_DIR"
+    else
+        warning "Unsupported JetPack version detected.  GPU may not be supported"
+    fi
+fi
 
 install_success() {
     status 'The Ollama API is now available at 127.0.0.1:11434.'
@@ -163,6 +179,13 @@ if [ "$IS_WSL2" = true ]; then
     exit 0
 fi
 
+# Don't attempt to install drivers on Jetson systems
+if [ -f /etc/nv_tegra_release ] ; then
+    status "NVIDIA JetPack ready."
+    install_success
+    exit 0
+fi
+
 # Install GPU dependencies on Linux
 if ! available lspci && ! available lshw; then
     warning "Unable to detect NVIDIA/AMD GPU. Install lspci or lshw to automatically detect and install GPU dependencies."
Repository: facebook/react
Pull request: Force layout before startViewTransition

This works around this Safari bug. https://bugs.webkit.org/show_bug.cgi?id=290146

This unfortunate because it may cause additional layouts if there's more updates to the tree coming by manual mutation before it gets painted naturally. However, we might end up wanting to read layout early anyway.

This affects the fixture because we clone the `<link>` from the `<head>` which is itself another bug. However, it should be possible to have `<link>` tags inserted into the new tree so this is still relevant.

Changed files:
filename: packages/react-dom-bindings/src/client/ReactFiberConfigDOM.js
patch: @@ -1669,6 +1669,12 @@ function customizeViewTransitionError(
   return error;
 }
 
+/** @noinline */
+function forceLayout(ownerDocument: Document) {
+  // This function exists to trick minifiers to not remove this unused member expression.
+  return (ownerDocument.documentElement: any).clientHeight;
+}
+
 export function startViewTransition(
   rootContainer: Container,
   transitionTypes: null | TransitionTypes,
@@ -1698,8 +1704,7 @@ export function startViewTransition(
         mutationCallback();
         if (previousFontLoadingStatus === 'loaded') {
           // Force layout calculation to trigger font loading.
-          // eslint-disable-next-line ft-flow/no-unused-expressions
-          (ownerDocument.documentElement: any).clientHeight;
+          forceLayout(ownerDocument);
           if (
             // $FlowFixMe[prop-missing]
             ownerDocument.fonts.status === 'loading'
@@ -1898,6 +1903,10 @@ export function startGestureTransition(
       ? (rootContainer: any)
       : rootContainer.ownerDocument;
   try {
+    // Force layout before we start the Transition. This works around a bug in Safari
+    // if one of the clones end up being a stylesheet that isn't loaded or uncached.
+    // https://bugs.webkit.org/show_bug.cgi?id=290146
+    forceLayout(ownerDocument);
     // $FlowFixMe[prop-missing]
     const transition = ownerDocument.startViewTransition({
       update: mutationCallback,
Repository: nodejs/node
Pull request: tools: dump config.gypi as json

This helps js2c processing the node.gypi correctly when a string contains a quote.

Refs: https://github.com/nodejs/node/pull/60703

Changed files:
filename: configure.py
patch: @@ -2446,8 +2446,9 @@ def make_bin_override():
 
 print_verbose(output)
 
+# Dump as JSON to allow js2c.cc read it as a simple json file.
 write('config.gypi', do_not_edit +
-      pprint.pformat(output, indent=2, width=128) + '\n')
+      json.dumps(output, indent=2) + '\n')
 
 write('config.status', '#!/bin/sh\nset -x\nexec ./configure ' +
       ' '.join([shlex.quote(arg) for arg in original_argv]) + '\n')

filename: test/parallel/test-process-config.js
patch: @@ -49,8 +49,7 @@ let config = fs.readFileSync(configPath, 'utf8');
 
 // Clean up comment at the first line.
 config = config.split('\n').slice(1).join('\n');
-config = config.replace(/"/g, '\\"');
-config = config.replace(/'/g, '"');
+// Turn pseudo-booleans strings into booleans.
 config = JSON.parse(config, (key, value) => {
   if (value === 'true') return true;
   if (value === 'false') return false;

filename: tools/js2c.cc
patch: @@ -796,21 +796,11 @@ std::vector<char> JSONify(const std::vector<char>& code) {
   // 1. Remove string comments
   std::vector<char> stripped = StripComments(code);
 
-  // 2. join multiline strings
-  std::vector<char> joined = JoinMultilineString(stripped);
+  // 2. turn pseudo-booleans strings into Booleans
+  std::vector<char> result1 = ReplaceAll(stripped, R"("true")", "true");
+  std::vector<char> result2 = ReplaceAll(result1, R"("false")", "false");
 
-  // 3. normalize string literals from ' into "
-  for (size_t i = 0; i < joined.size(); ++i) {
-    if (joined[i] == '\'') {
-      joined[i] = '"';
-    }
-  }
-
-  // 4. turn pseudo-booleans strings into Booleans
-  std::vector<char> result3 = ReplaceAll(joined, R"("true")", "true");
-  std::vector<char> result4 = ReplaceAll(result3, R"("false")", "false");
-
-  return result4;
+  return result2;
 }
 
 int AddGypi(const std::string& var,
Repository: facebook/react
Pull request: [ci] Bump number of shards for test_build to 10


I noticed `test_build` can take a while so let's bump the number of shards


Changed files:
filename: .github/workflows/runtime_build_and_test.yml
patch: @@ -373,9 +373,16 @@ jobs:
           # TODO: Test more persistent configurations?
         ]
         shard:
-          - 1/3
-          - 2/3
-          - 3/3
+          - 1/10
+          - 2/10
+          - 3/10
+          - 4/10
+          - 5/10
+          - 6/10
+          - 7/10
+          - 8/10
+          - 9/10
+          - 10/10
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4