helloadhavan/github_issues huggingface dataset:
Repository: huggingface/transformers
Pull request: Adapt to the SDPA interface to enable the NPU to call FlashAttentionScore


# What does this PR do?

Enable the torhc native SDPA interface  to invoke the FlashAttentionScore operator of NPU.


----

### Restrictions on the use of torch native interface calling FA operator: 
1. When is_causal calculation is enabled, attn_mask must be None; when is_causal is not enabled, if attn_mask enters valid data, the input data type must be Bool type.
2. When entering the data types of query, key, value, and enables requirements_grad, executes the FA operator.

Changed files:
filename: src/transformers/integrations/sdpa_attention.py
patch: @@ -2,7 +2,7 @@
 
 import torch
 
-from ..utils import is_torch_xpu_available, logging
+from ..utils import is_torch_npu_available, is_torch_xpu_available, logging
 from ..utils.import_utils import is_torch_greater_or_equal
 
 
@@ -12,6 +12,7 @@
 _is_torch_greater_or_equal_than_2_5 = is_torch_greater_or_equal("2.5", accept_dev=True)
 _is_torch_greater_or_equal_than_2_8 = is_torch_greater_or_equal("2.8", accept_dev=True)
 _is_torch_xpu_available = is_torch_xpu_available()
+_is_torch_npu_available = is_torch_npu_available()
 
 
 def repeat_kv(hidden_states: torch.Tensor, n_rep: int) -> torch.Tensor:
@@ -35,8 +36,12 @@ def use_gqa_in_sdpa(attention_mask: Optional[torch.Tensor], key: torch.Tensor) -
     # 2.xpu
     #   - torch version >= 2.8
     #   - key is not a torch.fx.Proxy (otherwise it will fail with a tracing error)
+    # 3.npu
+    #   - npu is not supported gqa currently
     if _is_torch_xpu_available:
         return _is_torch_greater_or_equal_than_2_8 and not isinstance(key, torch.fx.Proxy)
+    if _is_torch_npu_available:
+        return False
     return _is_torch_greater_or_equal_than_2_5 and attention_mask is None and not isinstance(key, torch.fx.Proxy)
 
 
@@ -80,6 +85,14 @@ def sdpa_attention_forward(
     if torch.jit.is_tracing() and isinstance(is_causal, torch.Tensor):
         is_causal = is_causal.item()
 
+    # When `is_causal = False` and the `attention_mask` is not of boolean type, the Ascend NPU's SDPA interface cannot utilize the FlashAttentionScore operator，
+    # and falls back to small-operator concatenation. To invoke the FlashAttentionScore, the attention_mask must be converted to boolean type.
+    # This adaptation ensures the `attention_mask` meets the requirement for using FlashAttentionScore.
+    if _is_torch_npu_available:
+        if attention_mask is not None and attention_mask.dtype != torch.bool:
+            # Convert to boolean type, making sdpa to force call FlashAttentionScore to improve performance.
+            attention_mask = torch.logical_not(attention_mask.bool()).to(query.device)
+
     attn_output = torch.nn.functional.scaled_dot_product_attention(
         query,
         key,
Repository: vercel/next.js
Pull request: [devtools] Disable React's default Transition indicator

Next.js DevTools should be fully separate from the actual Next.js app. In fact, it should be able to live in an iframe or extension. Right now it's still its own React root so we need to make sure it's isolated as much as possible from the actual React app.

React's default Transition indicator could've made the page display a loading indicator even though no Transition in the actual app is triggered. I don't think this can actually happen at the moment but good to make sure adding more Transitions to NDT doesn't just randomly make the page loading indicator show. Especially because we have React's default Transition indicator disabled for the actual Next.js app due to Chrome bugs.

Changed files:
filename: packages/next/src/next-devtools/dev-overlay.browser.tsx
patch: @@ -335,6 +335,9 @@ export function renderAppDevOverlay(
 
     const root = createRoot(container, {
       identifierPrefix: 'ndt-',
+      // We don't have design for a default Transition indicator for the NDT frontend.
+      // So we disable React's built-in one to not conflict with the one for the actual Next.js app.
+      onDefaultTransitionIndicator: () => () => {},
     })
 
     const shadowRoot = container.attachShadow({ mode: 'open' })
Repository: electron/electron
Pull request: build: remove unnecessary eslint-plugin-standard package

#### 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
-->

`eslint-plugin-standard` is deprecated on npm and the deprecation notice says we can remove it with the version of `eslint-config-standard` we're using.

> standard 16.0.0 and eslint-config-standard 16.0.0 no longer require the eslint-plugin-standard package. You can remove it from your dependencies with 'npm rm eslint-plugin-standard'. More info here: https://github.com/standard/standard/issues/1316

#### 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: package.json
patch: @@ -33,7 +33,6 @@
     "eslint-plugin-n": "^16.6.2",
     "eslint-plugin-node": "^11.1.0",
     "eslint-plugin-promise": "^6.6.0",
-    "eslint-plugin-standard": "^5.0.0",
     "eslint-plugin-unicorn": "^55.0.0",
     "events": "^3.2.0",
     "folder-hash": "^2.1.1",

filename: yarn.lock
patch: @@ -2733,11 +2733,6 @@ eslint-plugin-react@^7.28.0:
     semver "^6.3.0"
     string.prototype.matchall "^4.0.8"
 
-eslint-plugin-standard@^5.0.0:
-  version "5.0.0"
-  resolved "https://registry.yarnpkg.com/eslint-plugin-standard/-/eslint-plugin-standard-5.0.0.tgz#c43f6925d669f177db46f095ea30be95476b1ee4"
-  integrity sha512-eSIXPc9wBM4BrniMzJRBm2uoVuXz2EPa+NXPk2+itrVt+r5SbKFERx/IgrK/HmfjddyKVz2f+j+7gBRvu19xLg==
-
 eslint-plugin-unicorn@^55.0.0:
   version "55.0.0"
   resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-55.0.0.tgz#e2aeb397914799895702480970e7d148df5bcc7b"
@@ -3572,12 +3567,7 @@ ignore@^5.0.0, ignore@^5.1.1, ignore@^5.2.0, ignore@^5.2.4:
   resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.3.1.tgz#5073e554cd42c5b33b394375f538b8593e34d4ef"
   integrity sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==
 
-ignore@^7.0.0:
-  version "7.0.4"
-  resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.4.tgz#a12c70d0f2607c5bf508fb65a40c75f037d7a078"
-  integrity sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==
-
-ignore@^7.0.3:
+ignore@^7.0.0, ignore@^7.0.3:
   version "7.0.4"
   resolved "https://registry.yarnpkg.com/ignore/-/ignore-7.0.4.tgz#a12c70d0f2607c5bf508fb65a40c75f037d7a078"
   integrity sha512-gJzzk+PQNznz8ysRrC0aOkBNVRBDtE1n53IqyqEf3PXrYwomFs5q4pGMizBMJF+ykh03insJ27hB8gSrD2Hn8A==
Repository: nodejs/node
Pull request: src: fix order of CHECK_NOT_NULL/dereference

`ASYNC_THROW_IF_INSUFFICIENT_PERMISSIONS` may dereference `req_wrap_async`, so `CHECK_NOT_NULL(req_wrap_async)` should be used before and not after.

<!--
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: src/node_file.cc
patch: @@ -1559,12 +1559,12 @@ static void Unlink(const FunctionCallbackInfo<Value>& args) {
 
   if (argc > 1) {  // unlink(path, req)
     FSReqBase* req_wrap_async = GetReqWrap(args, 1);
+    CHECK_NOT_NULL(req_wrap_async);
     ASYNC_THROW_IF_INSUFFICIENT_PERMISSIONS(
         env,
         req_wrap_async,
         permission::PermissionScope::kFileSystemWrite,
         path.ToStringView());
-    CHECK_NOT_NULL(req_wrap_async);
     FS_ASYNC_TRACE_BEGIN1(
         UV_FS_UNLINK, req_wrap_async, "path", TRACE_STR_COPY(*path))
     AsyncCall(env, req_wrap_async, args, "unlink", UTF8, AfterNoArgs,
Repository: denoland/deno
Pull request: fix(compile): remove data.is_empty() check

<!--
Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label.
-->


Changed files:
filename: cli/standalone/binary.rs
patch: @@ -185,7 +185,6 @@ pub fn is_standalone_binary(exe_path: &Path) -> bool {
   libsui::utils::is_elf(&data)
     || libsui::utils::is_pe(&data)
     || libsui::utils::is_macho(&data)
-    || data.is_empty()
 }
 
 pub struct WriteBinOptions<'a> {
Repository: ollama/ollama
Pull request: Doc how to set up ROCm builds on windows


Changed files:
filename: docs/development.md
patch: @@ -135,3 +135,10 @@ go build .
 In addition to the common Windows development tools described above, install CUDA **AFTER** you install MSVC.
 
 - [NVIDIA CUDA](https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html)
+
+
+#### Windows ROCm (AMD Radeon)
+
+In addition to the common Windows development tools described above, install AMDs HIP package **AFTER** you install MSVC
+
+- [AMD HIP](https://www.amd.com/en/developer/resources/rocm-hub/hip-sdk.html)
\ No newline at end of file
Repository: electron/electron
Pull request: build: update build tools

Backport of #46656

See that PR for details.


Notes: <!-- 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 -->none


Changed files:
filename: .github/actions/install-build-tools/action.yml
patch: @@ -10,8 +10,10 @@ runs:
         git config --global core.filemode false
         git config --global core.autocrlf false
         git config --global branch.autosetuprebase always
+        git config --global core.fscache true
+        git config --global core.preloadindex true
       fi
-      export BUILD_TOOLS_SHA=8246e57791b0af4ae5975eb96f09855f9269b1cd
+      export BUILD_TOOLS_SHA=6e8526315ea3b4828882497e532b8340e64e053c
       npm i -g @electron/build-tools
       # Update depot_tools to ensure python
       e d update_depot_tools

filename: .github/workflows/pipeline-segment-electron-test.yml
patch: @@ -131,6 +131,8 @@ jobs:
         git config --global core.filemode false
         git config --global core.autocrlf false
         git config --global branch.autosetuprebase always
+        git config --global core.fscache true
+        git config --global core.preloadindex true
         git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
         # Ensure depot_tools does not update.
         test -d depot_tools && cd depot_tools
Repository: electron/electron
Pull request: build: update build tools

#### 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
-->
This PR updates build-tools to the latest version, particularly to get https://github.com/electron/build-tools/pull/696 which should resolve issues like https://github.com/electron/electron/actions/runs/14493394971/job/40655348383.

#### 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: <!-- 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 -->none


Changed files:
filename: .github/actions/install-build-tools/action.yml
patch: @@ -10,8 +10,10 @@ runs:
         git config --global core.filemode false
         git config --global core.autocrlf false
         git config --global branch.autosetuprebase always
+        git config --global core.fscache true
+        git config --global core.preloadindex true
       fi
-      export BUILD_TOOLS_SHA=8246e57791b0af4ae5975eb96f09855f9269b1cd
+      export BUILD_TOOLS_SHA=6e8526315ea3b4828882497e532b8340e64e053c
       npm i -g @electron/build-tools
       e auto-update disable
       e d auto-update disable

filename: .github/workflows/pipeline-segment-electron-test.yml
patch: @@ -134,6 +134,8 @@ jobs:
         git config --global core.filemode false
         git config --global core.autocrlf false
         git config --global branch.autosetuprebase always
+        git config --global core.fscache true
+        git config --global core.preloadindex true
         git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
         # Ensure depot_tools does not update.
         test -d depot_tools && cd depot_tools
Repository: ollama/ollama
Pull request: update llama.cpp submodule to `c2101a2`


Changed files:
filename: llm/llama.cpp
patch: @@ -1 +1 @@
-Subproject commit 6cdabe652695167263c8b447520987b11856f7ca
+Subproject commit c2101a2e909ac7c08976d414e64e96c90ee5fa9e
Repository: denoland/deno
Pull request: fix(ext/web): recheck state after signaling abort on writable stream

See the note under [WritableStreamAbort](https://streams.spec.whatwg.org/#writable-stream-abort).


Changed files:
filename: ext/web/06_streams.js
patch: @@ -4308,11 +4308,12 @@ function transformStreamUnblockWrite(stream) {
  * @returns {Promise<void>}
  */
 function writableStreamAbort(stream, reason) {
-  const state = stream[_state];
+  let state = stream[_state];
   if (state === "closed" || state === "errored") {
     return PromiseResolve(undefined);
   }
   stream[_controller][_signal][signalAbort](reason);
+  state = stream[_state];
   if (state === "closed" || state === "errored") {
     return PromiseResolve(undefined);
   }
@@ -4325,7 +4326,7 @@ function writableStreamAbort(stream, reason) {
     wasAlreadyErroring = true;
     reason = undefined;
   }
-  /** Deferred<void> */
+  /** @type {Deferred<void>} */
   const deferred = new Deferred();
   stream[_pendingAbortRequest] = {
     deferred,

filename: tests/wpt/runner/expectation.json
patch: @@ -5329,12 +5329,8 @@
       "invalid-realm.tentative.window.html": false
     },
     "writable-streams": {
-      "aborting.any.html": [
-        "recursive abort() call from abort() aborting signal"
-      ],
-      "aborting.any.worker.html": [
-        "recursive abort() call from abort() aborting signal"
-      ],
+      "aborting.any.html": true,
+      "aborting.any.worker.html": true,
       "bad-strategies.any.html": true,
       "bad-strategies.any.worker.html": true,
       "bad-underlying-sinks.any.html": true,
Repository: ggml-org/llama.cpp
Pull request: ci : fix winget workflow


Changed files:
filename: .github/workflows/winget.yml
patch: @@ -9,7 +9,7 @@ jobs:
   update:
     name: Update Winget Package
     runs-on: ubuntu-latest
-    if: ${{ github.repository.owner.login == 'ggml-org' }}
+    if: github.repository_owner == 'ggml-org'
 
     steps:
       - name: Install cargo binstall
Repository: huggingface/transformers
Pull request: Remove old Python code

# What does this PR do?

Remove code for python < 3.10

Changed files:
filename: src/transformers/hf_argparser.py
patch: @@ -262,19 +262,6 @@ def _add_dataclass_arguments(self, dtype: DataClassType):
                 "removing line of `from __future__ import annotations` which opts in Postponed "
                 "Evaluation of Annotations (PEP 563)"
             )
-        except TypeError as ex:
-            # Remove this block when we drop Python 3.9 support
-            if sys.version_info[:2] < (3, 10) and "unsupported operand type(s) for |" in str(ex):
-                python_version = ".".join(map(str, sys.version_info[:3]))
-                raise RuntimeError(
-                    f"Type resolution failed for {dtype} on Python {python_version}. Try removing "
-                    "line of `from __future__ import annotations` which opts in union types as "
-                    "`X | Y` (PEP 604) via Postponed Evaluation of Annotations (PEP 563). To "
-                    "support Python versions that lower than 3.10, you need to use "
-                    "`typing.Union[X, Y]` instead of `X | Y` and `typing.Optional[X]` instead of "
-                    "`X | None`."
-                ) from ex
-            raise
 
         for field in dataclasses.fields(dtype):
             if not field.init:

filename: src/transformers/models/idefics3/processing_idefics3.py
patch: @@ -108,9 +108,6 @@ class Idefics3ProcessorKwargs(ProcessingKwargs, total=False):
     }
 
 
-Idefics3ProcessorKwargs.__annotations__["images_kwargs"] = Idefics3ImagesKwargs  # python 3.8 compatibility
-
-
 class Idefics3Processor(ProcessorMixin):
     r"""
     Constructs a Idefics3 processor which wraps a LLama tokenizer and Idefics3 image processor into a single processor.

filename: tests/peft_integration/test_peft_integration.py
patch: @@ -715,9 +715,8 @@ def test_peft_from_pretrained_missing_keys_warning(self):
 
                 # Here we need to adjust the key name a bit to account for PEFT-specific naming.
                 # 1. Remove PEFT-specific prefix
-                # If merged after dropping Python 3.8, we can use: key = key.removeprefix(peft_prefix)
                 peft_prefix = "base_model.model."
-                key = key[len(peft_prefix) :]
+                key = key.removeprefix(peft_prefix)
                 # 2. Insert adapter name
                 prefix, _, suffix = key.rpartition(".")
                 key = f"{prefix}.other.{suffix}"
Repository: electron/electron
Pull request: build: fix depot tool pathing on Windows (#47194)

Backport of #47194

See that PR for details.


Notes: none

Changed files:
filename: .github/actions/install-build-tools/action.yml
patch: @@ -15,11 +15,16 @@ runs:
       fi
       export BUILD_TOOLS_SHA=6e8526315ea3b4828882497e532b8340e64e053c
       npm i -g @electron/build-tools
+      # Update depot_tools to ensure python
       e d update_depot_tools
       e auto-update disable
+      # Disable further updates of depot_tools
       e d auto-update disable
       if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
         e d cipd.bat --version
         cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
+        echo "C:\Users\ContainerAdministrator\.electron_build_tools\third_party\depot_tools" >> $GITHUB_PATH
+      else
+        echo "$HOME/.electron_build_tools/third_party/depot_tools" >> $GITHUB_PATH
+        echo "$HOME/.electron_build_tools/third_party/depot_tools/python-bin" >> $GITHUB_PATH
       fi
-      echo "$HOME/.electron_build_tools/third_party/depot_tools" >> $GITHUB_PATH