sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [Flex Attention] Ima Repro for non divisible seqlen + FlexDecode kernel
Labels: triaged,oncall: pt2,module: higher order operators,module: pt2-dispatcher,module: flex attention

# Summary
## Error
This will raise NaNs and shows that the we are loading from no no memory on compute sanitizer. This example sets the kernel options `is_divisible = False ` And it shouldnt

## Repro
```python
import torch
from torch.nn.attention.flex_attention import flex_attention, create_block_mask


def generate_causal_offset(offset: torch.Tensor):

    def causal_offset_mask(b, h, q_idx, kv_idx):
        return (offset + q_idx) >= kv_idx

    return causal_offset_mask


prefill = 128
max_seq_new_tokens = 100
B, H, HEAD_DIM = 1, 16, 64
start_offset = torch.tensor(prefill, device="cuda", dtype=torch.int32)
query = torch.rand(B, 1, H, HEAD_DIM, device="cuda", dtype=torch.float16).transpose(
    1, 2
)
TRANSPOSE = True

for i in range(max_seq_new_tokens):
    if TRANSPOSE:
        key = torch.rand(
            B, prefill + i, H, HEAD_DIM, device="cuda", dtype=torch.float16
        ).transpose(1, 2)
        value = torch.rand(
            B, prefill + i, H, HEAD_DIM, device="cuda", dtype=torch.float16
        ).transpose(1, 2)
    else:
        key = torch.rand(B, H, prefill + i, HEAD_DIM, device="cuda", dtype=torch.float16)
        value = torch.rand(B, H, prefill + i, HEAD_DIM, device="cuda", dtype=torch.float16)

    # create a causal mask
    offset = start_offset + i
    causal_offset_mask = generate_causal_offset(offset)
    block_mask = create_block_mask(causal_offset_mask, 1, 1, 1, key.shape[-2])
    flex_compile = torch.compile(flex_attention)
    flex_eager = flex_attention

    out_compile = flex_compile(query, key, value, block_mask=block_mask)
    out_eager = flex_eager(query, key, value, block_mask=block_mask)
    print("out_compile contains nan", torch.isnan(out_compile).any())
    print("out_eager contains nan", torch.isnan(out_eager).any())
    try:
        torch.testing.assert_close(out_compile, out_eager, atol=1e-2, rtol=0.0)
    except AssertionError as e:
        print(f"Failed at {i}")
        raise e

```

cc @chauhang @penguinwu @zou3519 @ydwu4 @bdhirsh @yf225 @Chillee @yanboliang @BoyuanFeng
Repository: ui
Issue: [bug]: Stuck Installing Tooltip Component
Labels: bug

### Describe the bug

The tooltip component is consistently getting stuck installing. Running `npx shadcn-ui@latest add tooltip` results in a constant `Installing tooltip...` dialogue. I'm using Vite + React. All other components work fine. 

### Affected component/components

Tooltip

### How to reproduce

1. Run `npx shadcn-ui@latest add tooltip`
2. Nothing happens...

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
Windows 11 Pro + Snapdragon X Elite 
Latest Vite and node 20.14.0
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: vscode
Issue: cursor placement of TSX tags does not work with some tailwind properties 
Labels: bug,help wanted,javascript

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.92.2
- OS Version: Ubuntu 24.04 LTS

When attempting to press `enter`, the editor usually auto indents the tag properly, but this does not happen when any property with the "/" charachter is included

Steps to Reproduce:

1. copy and paste this code into a `.tsx` file
```jsx
import React from "react";

const AuthDesktop = () => {
  return (
    <main className="w-full h-full flex items-center justify-center">
      <div className="w-1/2"></div>
      <div className="w-[50%]"></div>
    </main>
  );
};

export default AuthDesktop;
```
2. attempt to press enter inside the tag with className `w-[50%]`, it will place the cursor correctly, but that is not the case with the tag with className `w-1/2`

below is an example of what happens.

[Screencast from 2024-08-16 22-06-02.webm](https://github.com/user-attachments/assets/d3e42985-6bc6-4b3e-9484-d75288fe2b02)
Repository: rust
Issue: rustdoc: Weird display of `<ToBytes for Simd<_, _>>::Bytes` associated type
Labels: T-rustdoc,C-bug,A-const-generics,A-cross-crate-reexports

Implementations of `ToBytes` for various portable SIMD vectors are rendered incorrectly:

```
type Bytes = Simd<u8, core::::core_simd::to_bytes::{impl#55}::Bytes::{constant#0}>
```

https://doc.rust-lang.org/nightly/std/simd/prelude/struct.Simd.html#impl-ToBytes-for-Simd%3Cf32,+8%3E

(looks the same on stable: https://doc.rust-lang.org/stable/std/simd/prelude/struct.Simd.html#impl-ToBytes-for-Simd%3Cf32,+8%3E)

It’s probably reproducible with some other traits and types, but I was not able to do it. Notably, this:

```rust
pub trait Foo {
    type Bar;
}

struct Arr<T, const N: usize>(T);

macro_rules! gen_impl {
    ($a:literal, [$($b:literal),*]) => {
        $(impl Foo for [u8; $b] {
            type Bar = Arr<u8, { $a * $b }>;
        })*
    };
}

gen_impl!(2, [3, 4]);
```

renders as

```
type Bar = Arr<u8, { $a * $b }>
```

for me (stable + `rustc 1.82.0-nightly (64ebd39da 2024-08-03)`), which is maybe not perfect, but isn’t that broken.
Repository: react
Issue: Bug: Memory leak of old state until next render
Labels: Status: Unconfirmed

React version: 18.3.1

## Summary
It appears that state which is no longer being used can still be retained by some `__reactFiber$...` internals, leading to arbitrarily large memory leaks depending on what other objects are referenced by the state.

Possibly related issues:
- https://github.com/facebook/react/issues/14380
- https://github.com/facebook/react/issues/13702
- https://github.com/facebook/react/issues/14057

## Steps To Reproduce

1. Open the following repro example in Chrome (click Open Preview In New Tab): https://stackblitz.com/edit/react-leak-repro-1?file=src%2FApp.tsx
2. Open the Chrome Memory inspector
3. Click the "Mount" button, take a heap snapshot, and verify the LeakyActions object is present
4. Click the "Unmount" button, take a heap snapshot, and see that **LeakyActions is still present**
5. Click the "Increment" button, take a heap snapshot, and verify that LeakyActions is now released.

https://github.com/user-attachments/assets/fbfcf317-9eb3-431e-a887-cf8126d6aad8

Link to code example:

https://stackblitz.com/edit/react-leak-repro-1?file=src%2FApp.tsx,vite.config.ts

This repro case may be slightly more complicated than necessary, but was reduced from a real-world use case in our app.

```ts
import { useImperativeHandle, useState } from 'react';

class LeakyActions {
  foo() {
    console.log('real foo');
  }
}

function WorkspaceAdapter({ r }: { r: React.Ref<LeakyActions> }) {
  useImperativeHandle(r, () => new LeakyActions(), []);
  return null;
}

function App() {
  const [adapterMounted, setAdapterMounted] = useState(false);
  const [actions, setActions] = useState<LeakyActions | null>(null);
  const [counter, setCounter] = useState(0);

  return (
    <>
      <button onClick={() => setAdapterMounted((x) => !x)}>
        {adapterMounted ? 'Unmount' : 'Mount'}
      </button>

      <div>Have actions: {String(actions != undefined)}</div>
      {adapterMounted && <WorkspaceAdapter r={setActions} />}

      <div>Counter: {counter}</div>
      <button onClick={() => setCounter((c) => c + 1)}>Increment</button>
    </>
  );
}

export default App;
```

## The current behavior

The object is retained by the `__reactFiber$...` property of the `<button>` element:

<img width="1181" alt="image" src="https://github.com/user-attachments/assets/49b1660e-537a-433a-8e32-b209ce1443e5">

In our app, this behavior leads to a huge graph of objects from a previous screen/route of the app being retained when switching away from that screen.

## The expected behavior

The state which is no longer current should be released.
Repository: PowerToys
Issue: Keyboard layout change not being able to return to normal
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.83.0

### Installation method

Microsoft Store

### Running as admin

No

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

Restarting the computer with changed keys layout 

### ✔️ Expected Behavior

For nothing to change

### ❌ Actual Behavior

Even though the app showed that i have custom layout disabled, it still wouldnt turn off. After removing the app from computer, the issue is still there

### Other Software

none
Repository: vscode
Issue: Long inline chat workspace edits are annoying to accept
Labels: feature-request,inline-chat,panel-chat

1. Ask for some `/tests`
2. Get a long diff and end in a state like this: 
<img width="614" alt="image" src="https://github.com/user-attachments/assets/f327c57d-0154-4fb5-847f-0121f123ed0e">

3. You have to scroll back to the top to hit the ✔️ to accept the suggestion.
Repository: pytorch
Issue: [HOP] Add BC tests for hop in export
Labels: triaged,oncall: pt2,module: higher order operators,oncall: export,module: pt2-dispatcher

### 🐛 Describe the bug

According to current design, we can support BC when add a new default kwarg to HOP's signature. Add some BC test in export.

We also need to make sure default kwargs not captured in graph when using its default value.

### Versions

main

cc @ezyang @chauhang @penguinwu @zou3519 @avikchaudhuri @gmagogsfm @zhxchen17 @tugsbayasgalan @angelayi @suo @bdhirsh
Repository: go
Issue: proposal: log/slog: add ParseLevel
Labels: Proposal

### Proposal Details

Level and LevelVar have UnmarshalText methods, but there no direct way to parse a string into a Level.
UnmarshalText is fine if the level is a flag, but not if it's, say, a query param. For that one has to write the awkward code:
```
slogLevel.UnmarshalText([]byte(r.FormValue("l"))
```

Add `ParseLevel(string) (Level, error)`.
Repository: kubernetes
Issue: Bogus prohibition of `uniqueItems` in JSON schema in CRD
Labels: kind/bug,sig/api-machinery,triage/accepted

### What happened?

https://github.com/kubernetes/apiextensions-apiserver/blob/v0.31.0/pkg/apis/apiextensions/validation/validation.go#L1007-L1009 has been there forever but makes no sense to me. Checking that constraint can be done in O(N) time and O(N) space. And I _can_ impose the functionally same constraint on a slice by setting `+listType=map` and using the corresponding (collection of) `+listMapKey` settings.

### What did you expect to happen?

I expected that I can use `uniqueItems`.

### How can we reproduce it (as minimally and precisely as possible)?

_I_ produced it while using kubebuilder. I put the `// +kubebuilder:validation:UniqueItems=true` comment on a field holding a slice (the `Destinations` field in `BindingSpec` in https://github.com/kubestellar/kubestellar/pull/2405).

### Anything else we need to know?

🤷 

### Kubernetes version

<details>

This has been there _forever_.

</details>


### Cloud provider

<details>
N/A
</details>


### OS version

<details>

N/A

</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>
Repository: godot
Issue: Vulkan ignores VSync setting and leaks memory on Windows.
Labels: bug,platform:windows,topic:core,topic:rendering,performance

### Tested versions

v4.3.stable.steam [77dcf97d8]
(These don't have the D3D12 renderer, but the Vulkan renderer still has the same behaviour.)
v4.2.2.stable.official [15073afe3]
v4.1.4.stable.official [fe0e8e557]
v4.0.4.stable.official [fc0b241c9]
v4.0.stable.official [92bee43ad]


### System information

Godot v4.3.stable (77dcf97d8) - Windows 10.0.22631 (Mini11 AIO 23H2 v1 Neptune) - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3050 Laptop GPU (NVIDIA; 32.0.15.6081) - AMD Ryzen 7 5800H with Radeon Graphics (16 Threads)

### Issue description

In the Vulkan renderer, on an empty project it ignores the VSync setting and it starts leaking memory.
![image](https://github.com/user-attachments/assets/fdda0eb3-d15c-4e68-9496-ce130123892a)
When using D3D12, this doesn't happen.
![image](https://github.com/user-attachments/assets/c83bb0d7-5576-4590-aed1-08adf7d3fa52)


### Steps to reproduce

- Go to the NVIDIA Control Panel.
- Set "Use my preference emphasising" to "Performance".
- Make a new empty project.
- Add an empty 2D Scene and run the project.

### Minimal reproduction project (MRP)

N/A
Repository: flutter
Issue: `flutter drive` should emit a specific exit code (at minimum) if an emulator or device goes offline
Labels: a: tests,tool,t: flutter driver,f: integration_test,P2,c: tech-debt,team-tool,triaged-tool

In https://github.com/flutter/flutter/issues/153445 we investigated that Android 35 (the upcoming release) is too unstable on emulators to be used on pre or post-submit infrastructure (see our [CI changes here (https://github.com/flutter/flutter/issues/153445)). In an informal conversation between @zanderso @reidbaker @johnmccutchan and @matanlurey we talked about our inability to determine root causes. 

@johnmccutchan wrote:

> I guess I'm wondering why we can't have finer grained signals of test failures?
>
> Like if an emulator is crashing I'd like that to be flagged as something distinct than a flakey test. Because it wasn't the test that flaked actually, it was our environment.

@zanderso wrote:

> Yeah, I was thinking like `flutter drive` would have different error exit codes for a test failure vs. failures for other reasons like the emulator/device disappearing.

So, this issue is tracking _doing this_. 

I admit I am not sure how easy this will be, in particular to do across every platform we support.

If we limit the scope (i.e. _Android_ devices), or file sub-issues for every platform, it might be viable to do _some_ of these.
Repository: next.js
Issue: BUG: incorrect url encoding in `<link rel="preload">` for prioritized images
Labels: bug,Image (next/image),linear: next

### Link to the code that reproduces this issue

https://github.com/HelaGone/image_testing

### To Reproduce

1. build the application
2. start the server
3. visit the provided url
4. right click and select view source code
5. search for the link `rel=preload` of the `imageSrcSet`
6. 
<img width="825" alt="Screenshot 2024-08-16 at 4 35 25 p m" src="https://github.com/user-attachments/assets/7efc30dc-8c6e-4948-b598-6ec87379e97e">

7. see the wrong encoding of the `&` it's `&amp;` and should be `&` or `%26`
8. copy the path and concatenate the path with the `localhost:3000` 
9. see the error in the browser: `"w" parameter (width) is required` 
<img width="910" alt="Screenshot 2024-08-16 at 4 34 17 p m" src="https://github.com/user-attachments/assets/bb8e117d-a1e8-4aff-a42d-0b44dfb62053">



### Current vs. Expected behavior

current behavior is the error in the browser: 
<img width="910" alt="Screenshot 2024-08-16 at 4 34 17 p m" src="https://github.com/user-attachments/assets/fc0d4651-ed4b-4265-8f31-568e9a5b981a">

Expected behaviour:
The image should resolve correctly in the browser. 


### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.5.0: Wed May  1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.21
  pnpm: N/A
Relevant Packages:
  next: 15.0.0-canary.118 // Latest available version is detected (15.0.0-canary.118).
  eslint-config-next: N/A
  react: 19.0.0-rc-49496d49-20240814
  react-dom: 19.0.0-rc-49496d49-20240814
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Image (next/image)

### Which stage(s) are affected? (Select all that apply)

Other (Deployed)

### Additional context

This is affecting our application in production and reporting Google Search Console errors
<img width="861" alt="Screenshot 2024-08-16 at 4 43 41 p m" src="https://github.com/user-attachments/assets/dff587bf-95e2-4b07-9af5-02c7e3120c12">

Here is a production with [wrong encoding](https://www.nmas.com.mx/_next/image/?url=https%3A%2F%2Fstatic-live.nmas.com.mx%2Fnmas-news%2Fstyles%2Fcorte_16_9%2Fcloud-storage%2F2023-06%2Finstagram-red-abuso-sexual-infantil.jpeg.jpg%3Fitok%3DMPkXPAn6&amp;w=1920&amp;q=80)

The same image with [proper encoding:](https://www.nmas.com.mx/_next/image/?url=https%3A%2F%2Fstatic-live.nmas.com.mx%2Fnmas-news%2Fstyles%2Fcorte_16_9%2Fcloud-storage%2F2023-06%2Finstagram-red-abuso-sexual-infantil.jpeg.jpg%3Fitok%3DMPkXPAn6&w=1920&q=80)
Repository: godot
Issue: Y-sorted subtree's root gets modulation applied twice
Labels: bug,topic:rendering,topic:2d

### Tested versions

v4.3.stable.official [77dcf97d8] and earlier (not a regression)

### System information

N/A

### Issue description

Title. In action:
![LnryUZ1d0a](https://github.com/user-attachments/assets/c25112ff-1921-40dd-a7ed-b7f0f1a74f06)


### Steps to reproduce

1. Create scene with single Sprite2D (and texture assigned).
2. Apply modulation.
3. Toggle `y_sort_enabled`.

### Minimal reproduction project (MRP)

N/A
Repository: godot
Issue: [BUG] Title bar hidden in windowed mode when viewport is higher than display resolution
Labels: bug,discussion,topic:gui

### Tested versions

v4.3.stable.mono.official [77dcf97d8]

### System information

Godot v4.3.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 3060 Ti (NVIDIA; 31.0.15.3623) - AMD Ryzen 7 3700X 8-Core Processor (16 Threads)

### Issue description

![image](https://github.com/user-attachments/assets/b05cff08-a271-4a85-8efb-c1e0eeafd194)


As you can see no title bar is shown when running the game:

![image](https://github.com/user-attachments/assets/67f5e8c1-1ab6-49d1-9a99-fffc6f636f61)


### Steps to reproduce

Set the window to something higher than your monitor screen resolution and see that the title bar is not displayed when the game is launch.

My display resolution is 1920x1080

My godot project:
![image](https://github.com/user-attachments/assets/aa70df08-b196-4df4-af4d-9409b55b02ea)


### Minimal reproduction project (MRP)

[test-screen-size.zip](https://github.com/user-attachments/files/16642514/test-screen-size.zip)
Repository: flutter
Issue: release branches use target configurations from the main branch
Labels: team-infra,P1,triaged-infra

Fixing this would avoid situations like having to land upstream .ci.yaml changes just to unblock a release, such as in: https://github.com/flutter/engine/pull/54591
Repository: godot
Issue: gui_input() stops on the scrollbar of a ScrollContainer
Labels: discussion,topic:gui

### Tested versions

- v4.3-stable

### System information

Godot v4.3.stable - Windows 10.0.19045 - GLES3 (Compatibility) - Intel(R) HD Graphics 620 (Intel Corporation; 31.0.101.2111) - Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz (4 Threads)

### Issue description

When using the signal `gui_signal()` hovering over the scrollbar part of it does not trigger the signal, im unsure if this is a bug but it feels like one as every other part of the container triggers the signal.

```gdscript
extends Node2D

var on_ui : bool = false

func _process(_delta):
	print(on_ui)
	on_ui = false

func on_gui_input(_event):
	on_ui = true
```

### Steps to reproduce

1. Create Scrollbar with an overflow so the scrollbar appears
2. Add the code above and link the signal `gui_input(event)` to the function `on_gui_input(_event)`
3. Run the game and run the cursor up and down the scrollbar and it will continue to output `false`

Im unsure if this is a bug but running my cursor on anything else that i have linked to my function with `gui_input(event)` always triggers the function.

### Minimal reproduction project (MRP)

N/A
Repository: transformers
Issue: Integrate Liger (Linkedin GPU Efficient Runtime) Kernel to HuggingFace
Labels: trainer,Feature request

### Feature request

Integrate Liger (Linkedin GPU Efficient Runtime) Kernel to HuggingFace Trainer, user could decide whether to enable kernel with a simple flag

### Motivation

Liger (Linkedin GPU Efficient Runtime) Kernel is a collection of Triton kernels designed specifically for LLM training. We have implemented Hugging Face Compatible RMSNorm, RoPE, SwiGLU, CrossEntropy, FusedLinearCrossEntropy, and more to come. It can effectively increase multi-GPU training throughput by 20% and reduces memory usage by 60%. The kernel works out of the box with [flash attention](https://github.com/Dao-AILab/flash-attention), PyTorch FSDP, and Microsoft DeepSpeed. We welcome contributions from the community to gather the best kernels for LLM training.

### Your contribution

We (LinkedIn) will take care of work for a smooth integration and would need HF review and feedback for changes.


### Benchmark

Benchmark conditions: LLaMA 3-8B, Alpaca Dataset, Max seq len = 512, Data Type = bf16, Optimizer = AdamW, Gradient Checkpointing = True, Distributed Strategy = FSDP1 on 4 A100s.

The throughput increases by approximately 20% with more data, but the GPU memory is reduced by 40%. This means you can train the model on smaller GPUs, with larger batch sizes, or with longer sequence lengths at no additional cost.


![image (3)](https://github.com/user-attachments/assets/779240ce-531a-48ad-84a2-570421d2a43c)
![image (4)](https://github.com/user-attachments/assets/3ac951d9-ffc0-4b61-b98a-b27ec3bfc1dc)


For more detailed benchmark setup and more exciting efficiency for multi-head training (Medusa), please refer to original repo: https://github.com/linkedin/Liger-Kernel (Repo will be public soon)