helloadhavan/github_issues huggingface dataset:
Repository: ggml-org/llama.cpp
Pull request: CUDA: fix build error from ambiguous __half conversions in conv2d

Building conv2d with half precision failed because `__half` defines multiple implicit conversion operators (to float, int, short, etc.), causing ambiguous overload resolution when multiplying with float.

~~Introduce a templated `to_float` helper that explicitly converts `__half` via `__half2float`, while passing through float unchanged. Use this helper in conv2d accumulation to ensure unambiguous and correct promotion to float.~~

Use ggml_cuda_cast from convert.cuh for casting the value to float instead.

Fixes some build errors with half-precision kernels on CUDA.



Changed files:
filename: ggml/src/ggml-cuda/conv2d.cu
patch: @@ -1,4 +1,5 @@
 #include "conv2d.cuh"
+#include "convert.cuh"
 
 struct conv_params {
     const int64_t IW, IH;
@@ -94,8 +95,8 @@ static __global__ void conv2d_kernel(const float * __restrict__ input,
                 const int64_t in_x = calculate_input_coord(out_x, kx, P.ST_X, P.DL_X, P.PD_X);
 
                 const float input_val = input[Layout::input_index(n, c_in, in_y, in_x, P)];
-                const float kernel_val = kernel[Layout::kernel_index(c_out, c_in, ky, kx, P)];
-                acc += (input_val * kernel_val);
+                const T kernel_val = kernel[Layout::kernel_index(c_out, c_in, ky, kx, P)];
+                acc += (input_val * ggml_cuda_cast<float>(kernel_val));
             }
         }
     }
Repository: facebook/react
Pull request: Update .prettierrc.js

jsxBracketSameLine deprecated in v2.4.0 of Prettier, replaced by bracketSameLine.

https://prettier.io/docs/en/options.html#deprecated-jsx-brackets

<!--
  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 test --debug --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

<!--
 Explain the **motivation** for making this change. What existing problem does the pull request solve?
-->

I've always wanted to contribute to open source, even if it's in the smallest way possible. Resolves deprecated feature with currently used version of Prettier (2.4+).  Those doing things like using React as a reference for their ".prettierrc" files will be using the non-deprecated versions.

## How did you test this change?

Modified line 969 of App.js to push </h1> to line 971, saved the file, then ran "yarn prettier" and formatting returned it to original position confirming that jsxBracketSameLine acts in the same fashion to bracketSameLine, but also is no longer deprecated that has additional features which may be useful in the future to the project.


<!--
  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.
-->

λ yarn prettier
yarn run v1.22.19
$ node ./scripts/prettier/index.js write-changed
> git merge-base HEAD main
> git diff --name-only --diff-filter=ACMRTUB bbb9cb116dbf7b6247721aa0c4bcb6ec249aa8af
> git ls-files --others --exclude-standard
Done in 1.52s.


Changed files:
filename: .prettierrc.js
patch: @@ -5,7 +5,7 @@ const {esNextPaths} = require('./scripts/shared/pathsByLanguageVersion');
 module.exports = {
   bracketSpacing: false,
   singleQuote: true,
-  jsxBracketSameLine: true,
+  bracketSameLine: true,
   trailingComma: 'es5',
   printWidth: 80,
   parser: 'flow',
Repository: huggingface/transformers
Pull request: fix failing `test_sdpa_can_dispatch_on_flash`

# What does this PR do?



Changed files:
filename: src/transformers/utils/generic.py
patch: @@ -993,16 +993,23 @@ def check_model_inputs(func):
 
     @wraps(func)
     def wrapper(self, *args, **kwargs):
-        use_cache = kwargs.get("use_cache", getattr(self.config, "use_cache", False))
-        return_dict = kwargs.pop("return_dict", getattr(self.config, "return_dict", True))
-        all_args = kwargs.copy()
+        use_cache = kwargs.get("use_cache", None)
+        if use_cache is None:
+            use_cache = getattr(self.config, "use_cache", False)
+
+        return_dict = kwargs.pop("return_dict", None)
+        if return_dict is None:
+            return_dict = getattr(self.config, "return_dict", True)
 
         if getattr(self, "gradient_checkpointing", False) and self.training and use_cache:
             logger.warning_once(
                 "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`."
             )
-            kwargs["use_cache"] = False
+            use_cache = False
 
+        kwargs["use_cache"] = use_cache
+
+        all_args = kwargs.copy()
         if "kwargs" in all_args:
             for k, v in all_args["kwargs"].items():
                 all_args[k] = v

filename: tests/models/t5gemma/test_modeling_t5gemma.py
patch: @@ -311,7 +311,7 @@ def create_and_check_with_lm_head(
             decoder_attention_mask=decoder_attention_mask,
             labels=lm_labels,
         )
-        self.parent.assertEqual(len(outputs), 4)
+        self.parent.assertEqual(len(outputs), 5)
         self.parent.assertEqual(outputs["logits"].size(), (self.batch_size, self.seq_length, self.vocab_size))
         self.parent.assertEqual(outputs["loss"].size(), ())
 
@@ -1067,7 +1067,7 @@ def test_past_key_values_format(self, custom_all_cache_shapes=None):
 
                 for i in range(num_decoder_layers):
                     if is_legacy_cache:
-                        self.assertEqual(len(past_kv[0]), 4)  # legacy check: confirm number of elements in tuple
+                        self.assertEqual(len(past_kv[0]), 5)  # legacy check: confirm number of elements in tuple
 
                     # Self attention
                     self_attention_layer_key_cache = (
@@ -1687,7 +1687,7 @@ def build_model_and_check_forward_pass(self, **kwargs):
             labels=lm_labels,
         )
         # outputs = model(*inputs)
-        assert len(outputs) == 4
+        assert len(outputs) == 5
         assert outputs["logits"].size() == (tester.batch_size, tester.seq_length, tester.vocab_size)
         assert outputs["loss"].size() == ()
         return model.model
Repository: facebook/react
Pull request: Rename fork ReactSharedInternals -> ReactSharedInternalsClient

## Summary

Follow up from #27717 based on feedback to rename the fork module itself

## How did you test this change?

- `yarn build`
- `yarn test packages/scheduler/src/__tests__/SchedulerUMDBundle-test.internal.js`

Changed files:
filename: packages/react/src/forks/ReactSharedInternalsClient.umd.js
patch: @@ -15,7 +15,7 @@ import ReactCurrentBatchConfig from '../ReactCurrentBatchConfig';
 import {enableServerContext} from 'shared/ReactFeatureFlags';
 import {ContextRegistry} from '../ReactServerContextRegistry';
 
-const ReactSharedInternals = {
+const ReactSharedInternalsClient = {
   ReactCurrentDispatcher,
   ReactCurrentCache,
   ReactCurrentOwner,
@@ -30,12 +30,12 @@ const ReactSharedInternals = {
 };
 
 if (__DEV__) {
-  ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
-  ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
+  ReactSharedInternalsClient.ReactCurrentActQueue = ReactCurrentActQueue;
+  ReactSharedInternalsClient.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
 }
 
 if (enableServerContext) {
-  ReactSharedInternals.ContextRegistry = ContextRegistry;
+  ReactSharedInternalsClient.ContextRegistry = ContextRegistry;
 }
 
-export default ReactSharedInternals;
+export default ReactSharedInternalsClient;

filename: packages/scheduler/src/__tests__/SchedulerUMDBundle-test.internal.js
patch: @@ -43,7 +43,7 @@ describe('Scheduling UMD bundle', () => {
     const umdAPIProd = require('../../npm/umd/scheduler.production.min');
     const umdAPIProfiling = require('../../npm/umd/scheduler.profiling.min');
     const secretAPI =
-      require('react/src/forks/ReactSharedInternals.umd').default;
+      require('react/src/forks/ReactSharedInternalsClient.umd').default;
     validateForwardedAPIs(api, [
       umdAPIDev,
       umdAPIProd,

filename: scripts/rollup/forks.js
patch: @@ -225,7 +225,7 @@ const forks = Object.freeze({
       case UMD_DEV:
       case UMD_PROD:
       case UMD_PROFILING:
-        return './packages/react/src/forks/ReactSharedInternals.umd.js';
+        return './packages/react/src/forks/ReactSharedInternalsClient.umd.js';
       default:
         return null;
     }
Repository: electron/electron
Pull request: fix: win.closeFilePreview recreates panel when called twice

#### Description of Change

Accessing `[QLPreviewPanel sharedPreviewPanel]` causes the panel to be initialized and reappear according to [QLPreviewPanel.h](https://github.com/phracker/MacOSX-SDKs/blob/041600eda65c6a668f66cb7d56b7d1da3e8bcc93/MacOSX10.6.sdk/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuickLookUI.framework/Versions/A/Headers/QLPreviewPanel.h#L36-L39).

```
/*!
 * @abstract Returns the QLPreviewPanel instance, creating it if it doesnÕt exist yet.
 */
+ (QLPreviewPanel *)sharedPreviewPanel;
```

Thus when calling `win.closeFilePreview` multiple times, it would recreate the closed window every other call.

To fix this, we can release the `preview_file_` data source and gate based on its existence before accessing `[QLPreviewPanel sharedPreviewPanel]`.

This resolves our flaky visual tests where this panel appears in front of other windows. 

repro gist: https://gist.github.com/86dec76eb1fd0a163ceb30925558d081

#### 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)

#### Release Notes

Notes: Fixed file preview window reappearing when calling `win.closeFilePreview` twice on macOS.


Changed files:
filename: shell/browser/native_window_mac.mm
patch: @@ -1596,8 +1596,11 @@ static bool FromV8(v8::Isolate* isolate,
 }
 
 void NativeWindowMac::CloseFilePreview() {
-  if ([QLPreviewPanel sharedPreviewPanelExists]) {
+  // Need to be careful about checking [QLPreviewPanel sharedPreviewPanel] as
+  // simply accessing it will cause it to reinitialize and reappear.
+  if ([QLPreviewPanel sharedPreviewPanelExists] && preview_item_) {
     [[QLPreviewPanel sharedPreviewPanel] close];
+    preview_item_ = nil;
   }
 }
 

filename: spec/api-browser-window-spec.ts
patch: @@ -6256,6 +6256,7 @@ describe('BrowserWindow module', () => {
       w.previewFile(__filename);
       await setTimeout(500);
       expect(showCalled).to.equal(false, 'should not have called show twice');
+      w.closeFilePreview();
     });
   });
Repository: nodejs/node
Pull request: doc: reserve module version 136 for Electron 37

This PR reserves NMV 136 for Electron 37 as part of our regular [release preparation work](https://github.com/orgs/electron/projects/112/views/3?pane=issue&itemId=100704744). Thanks! 🙇

Changed files:
filename: doc/abi_version_registry.json
patch: @@ -1,5 +1,6 @@
 {
   "NODE_MODULE_VERSION": [
+    { "modules": 136,"runtime": "electron", "variant": "electron",             "versions": "37" },
     { "modules": 135,"runtime": "electron", "variant": "electron",             "versions": "36" },
     { "modules": 134,"runtime": "node",     "variant": "v8_13.0",              "versions": "24.0.0-pre" },
     { "modules": 133,"runtime": "electron", "variant": "electron",             "versions": "35" },
Repository: vercel/next.js
Pull request: [sync-react] Set correct PR author

Follow-up to https://github.com/vercel/next.js/pull/81134

We checkout and commit with nextjs-bot but then opened the PR as vercel-release-bot. Now we use nextjs-bot for both.

Changed files:
filename: .github/workflows/update_react.yml
patch: @@ -53,4 +53,4 @@ jobs:
         shell: bash
         run: pnpm sync-react --actor "${{ github.actor }}" --commit --create-pull --version "${{ inputs.version }}"
         env:
-          GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
+          GITHUB_TOKEN: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
Repository: denoland/deno
Pull request: feat(cache): add `DENO_EMIT_CACHE_MODE`

This commit adds support for `DENO_EMIT_CACHE_MODE` env var that accepts
either `normal` or `disable` values, allowing to disable caching of transpiled
sources - ie. transpilation will happen on each run.

Changed files:
filename: cli/cache/emit.rs
patch: @@ -16,16 +16,36 @@ pub struct EmitCache {
   disk_cache: DiskCache,
   emit_failed_flag: AtomicFlag,
   file_serializer: EmitFileSerializer,
+  mode: Mode,
+}
+
+#[derive(Debug)]
+enum Mode {
+  Normal,
+  Disable,
 }
 
 impl EmitCache {
   pub fn new(disk_cache: DiskCache) -> Self {
+    let mode = match std::env::var("DENO_EMIT_CACHE_MODE")
+      .unwrap_or_default()
+      .as_str()
+    {
+      "normal" | "" => Mode::Normal,
+      "disable" => Mode::Disable,
+      _ => {
+        log::warn!("Unknown DENO_EMIT_CACHE_MODE value, defaulting to normal");
+        Mode::Normal
+      }
+    };
+
     Self {
       disk_cache,
       emit_failed_flag: Default::default(),
       file_serializer: EmitFileSerializer {
         cli_version: DENO_VERSION_INFO.deno,
       },
+      mode,
     }
   }
 
@@ -42,6 +62,10 @@ impl EmitCache {
     specifier: &ModuleSpecifier,
     expected_source_hash: u64,
   ) -> Option<String> {
+    if matches!(self.mode, Mode::Disable) {
+      return None;
+    }
+
     let emit_filename = self.get_emit_filename(specifier)?;
     let bytes = self.disk_cache.get(&emit_filename).ok()?;
     self
@@ -70,7 +94,7 @@ impl EmitCache {
     source_hash: u64,
     code: &[u8],
   ) -> Result<(), AnyError> {
-    if self.emit_failed_flag.is_raised() {
+    if matches!(self.mode, Mode::Disable) || self.emit_failed_flag.is_raised() {
       log::debug!("Skipped emit cache save of {}", specifier);
       return Ok(());
     }
@@ -174,6 +198,7 @@ mod test {
         cli_version: "1.0.0",
       },
       emit_failed_flag: Default::default(),
+      mode: Mode::Normal,
     };
 
     let specifier1 =
@@ -203,6 +228,7 @@ mod test {
         cli_version: "2.0.0",
       },
       emit_failed_flag: Default::default(),
+      mode: Mode::Normal,
     };
     assert_eq!(cache.get_emit_code(&specifier1, 10), None);
     cache.set_emit_code(&specifier1, 5, emit_code1.as_bytes());
@@ -214,6 +240,7 @@ mod test {
         cli_version: "2.0.0",
       },
       emit_failed_flag: Default::default(),
+      mode: Mode::Normal,
     };
     assert_eq!(cache.get_emit_code(&specifier1, 5), Some(emit_code1));
Repository: nodejs/node
Pull request: buffer: use constexpr where possible

Self-explanatory cc @nodejs/buffer

Changed files:
filename: src/node_buffer.cc
patch: @@ -1452,9 +1452,9 @@ uint32_t WriteOneByteString(const char* src,
     return 0;
   }
 
-  if (encoding == UTF8) {
+  if constexpr (encoding == UTF8) {
     return simdutf::convert_latin1_to_utf8_safe(src, src_len, dst, dst_len);
-  } else if (encoding == LATIN1 || encoding == ASCII) {
+  } else if constexpr (encoding == LATIN1 || encoding == ASCII) {
     const auto size = std::min(src_len, dst_len);
     memcpy(dst, src, size);
     return size;
Repository: electron/electron
Pull request: fix: win.closeFilePreview recreates panel when called twice

Backport of #45319

See that PR for details.


Notes: Fixed file preview window reappearing when calling `win.closeFilePreview` twice on macOS.


Changed files:
filename: shell/browser/native_window_mac.mm
patch: @@ -1556,8 +1556,11 @@ static bool FromV8(v8::Isolate* isolate,
 }
 
 void NativeWindowMac::CloseFilePreview() {
-  if ([QLPreviewPanel sharedPreviewPanelExists]) {
+  // Need to be careful about checking [QLPreviewPanel sharedPreviewPanel] as
+  // simply accessing it will cause it to reinitialize and reappear.
+  if ([QLPreviewPanel sharedPreviewPanelExists] && preview_item_) {
     [[QLPreviewPanel sharedPreviewPanel] close];
+    preview_item_ = nil;
   }
 }
 

filename: spec/api-browser-window-spec.ts
patch: @@ -6223,6 +6223,7 @@ describe('BrowserWindow module', () => {
       w.previewFile(__filename);
       await setTimeout(500);
       expect(showCalled).to.equal(false, 'should not have called show twice');
+      w.closeFilePreview();
     });
   });
Repository: ggml-org/llama.cpp
Pull request: llama : fix fattn reserve call n_seqs parameter


Changed files:
filename: src/llama-context.cpp
patch: @@ -281,9 +281,15 @@ llama_context::llama_context(
         }
 
         cross.v_embd.clear();
+
+        const uint32_t n_seqs = cparams.kv_unified ? 1 : cparams.n_seq_max;
+        const uint32_t n_tokens = std::min(cparams.n_ctx, cparams.n_ubatch);
+
+        LLAMA_LOG_DEBUG("%s: worst-case: n_tokens = %d, n_seqs = %d, n_outputs = %d\n", __func__, n_tokens, n_seqs, n_outputs);
+
         // resolve automatic Flash Attention use
         if (params.flash_attn_type == LLAMA_FLASH_ATTN_TYPE_AUTO) {
-            auto * gf = graph_reserve(1, 1, 0, mctx.get(), true);
+            auto * gf = graph_reserve(1, n_seqs, n_outputs, mctx.get(), true);
             if (!gf) {
                 throw std::runtime_error("failed to split graph for Flash Attention check");
             }
@@ -324,11 +330,6 @@ llama_context::llama_context(
         }
 
         // reserve worst-case graph
-        const uint32_t n_seqs = cparams.kv_unified ? 1 : cparams.n_seq_max;
-        const uint32_t n_tokens = std::min(cparams.n_ctx, cparams.n_ubatch);
-
-        LLAMA_LOG_DEBUG("%s: worst-case: n_tokens = %d, n_seqs = %d, n_outputs = %d\n", __func__, n_tokens, n_seqs, n_outputs);
-
         int n_splits_pp = -1;
         int n_nodes_pp  = -1;
Repository: denoland/deno
Pull request: fix(ext/node): use primordials in ext/node/polyfills/_fs/_fs_opendir.ts

Towards #24236

Changed files:
filename: ext/node/polyfills/_fs/_fs_opendir.ts
patch: @@ -1,8 +1,5 @@
 // Copyright 2018-2025 the Deno authors. MIT license.
 
-// TODO(petamoriken): enable prefer-primordials for node polyfills
-// deno-lint-ignore-file prefer-primordials
-
 import Dir from "ext:deno_node/_fs/_fs_dir.ts";
 import { Buffer } from "node:buffer";
 import {
@@ -15,6 +12,11 @@ import {
   validateInteger,
 } from "ext:deno_node/internal/validators.mjs";
 import { promisify } from "ext:deno_node/internal/util.mjs";
+import { primordials } from "ext:core/mod.js";
+
+const {
+  StringPrototypeToString,
+} = primordials;
 
 /** These options aren't functionally used right now, as `Dir` doesn't yet support them.
  * However, these values are still validated.
@@ -29,6 +31,17 @@ function _validateFunction(callback: unknown): asserts callback is Callback {
   validateFunction(callback, "callback");
 }
 
+function getPathString(
+  path: string | Buffer | URL,
+): string {
+  if (Buffer.isBuffer(path)) {
+    // deno-lint-ignore prefer-primordials
+    return path.toString();
+  }
+
+  return StringPrototypeToString(path);
+}
+
 /** @link https://nodejs.org/api/fs.html#fsopendirsyncpath-options */
 export function opendir(
   path: string | Buffer | URL,
@@ -38,7 +51,7 @@ export function opendir(
   callback = typeof options === "function" ? options : callback;
   _validateFunction(callback);
 
-  path = getValidatedPath(path).toString();
+  path = getPathString(getValidatedPath(path));
 
   let err, dir;
   try {
@@ -72,7 +85,7 @@ export function opendirSync(
   path: string | Buffer | URL,
   options?: Options,
 ): Dir {
-  path = getValidatedPath(path).toString();
+  path = getPathString(getValidatedPath(path));
 
   const { bufferSize } = getOptions(options, {
     encoding: "utf8",
Repository: huggingface/transformers
Pull request: update docker file to use latest `timm` (for `perception_lm`)

# What does this PR do?

Fix the whole `perception_lm` test suite is failing.

Merge without waiting to make CI better

Changed files:
filename: docker/transformers-all-latest-gpu/Dockerfile
patch: @@ -30,6 +30,8 @@ RUN python3 -m pip install --no-cache-dir -e ./transformers[dev,onnxruntime] &&
 
 RUN python3 -m pip uninstall -y flax jax
 
+RUN python3 -m pip install --no-cache-dir -U timm
+
 RUN python3 -m pip install --no-cache-dir git+https://github.com/facebookresearch/detectron2.git pytesseract
 RUN python3 -m pip install -U "itsdangerous<2.1.0"
Repository: vercel/next.js
Pull request: [dev-tools] Consistent focus states for buttons

Trivial PR. Just makes sure we use our `--focus-ring` CSS variable for focus states.

![CleanShot 2025-07-01 at 13 18 05@2x](https://github.com/user-attachments/assets/c3f7aded-0644-4a46-850d-8d5e4e379084)


Changed files:
filename: packages/next/src/next-devtools/dev-overlay/components/devtools-panel/devtools-panel.tsx
patch: @@ -348,8 +348,7 @@ export const DEVTOOLS_PANEL_STYLES = css`
     padding: 4px 12px;
     font-size: 14px;
     font-weight: 500;
-
-    transition: all 0.2s ease;
+    transition: background-color 200ms ease;
 
     &:hover {
       background-color: var(--color-gray-200);
@@ -397,7 +396,9 @@ export const DEVTOOLS_PANEL_STYLES = css`
     padding: 6px;
     color: var(--color-gray-1000);
     border-radius: 4px;
-    transition: all 0.2s ease;
+    transition-property: background-color, color;
+    transition-duration: 200ms;
+    transition-timing-function: ease;
 
     &:hover {
       background-color: var(--color-gray-200);

filename: packages/next/src/next-devtools/dev-overlay/styles/base.tsx
patch: @@ -141,7 +141,7 @@ export function Base({ scale = 1 }: { scale?: DevToolsScale }) {
           &:hover {
             color: var(--color-blue-900);
           }
-          &:focus {
+          &:focus-visible {
             outline: var(--focus-ring);
           }
         }