sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: RFC: Dynamically Quantized 4 bit matmul API and usage
Labels: oncall: quantization

# 4-Bit  Dynamically Quantized Matrix Multiplication in PyTorch

This RFC introduces two new operations to enable efficient 4-bit weight quantization and matrix multiplication in PyTorch. These operations provide a mechanism for low-precision arithmetic to be used for both training and inference, improving performance and reducing memory usage. The two new operations are:

- `torch.ops.aten._dyn_quant_pack_4bit_weight` - Packs the quantized weights, scales, and bias for a Linear layer into a compact format using 4-bit symmetric quantization.
- `torch.ops.aten._dyn_quant_matmul_4bit` - Performs matrix multiplication using quantized weights, optimized for 4-bit precision.

## 1. `torch.ops.aten._dyn_quant_pack_4bit_weight`

This operation is used to pack the quantized weights, scales, and optional bias for a Linear layer. The function expects 4-bit quantized weights and returns a packed representation.

### **Parameters:**

- **`weight`** (`Tensor`): The original weights of the Linear layer.
- **`scales_and_zeros`** (`Tensor`): A tensor containing the quantization scales for each group. The tensor has the shape `[num_groups]`.
- **`bias`** (`Tensor`, optional): The bias tensor for the Linear layer. This parameter is optional.
- **`groupsize`** (`int`): The number of channels per group. The value must be a multiple of 32 or equal to `in_features`.
- **`in_features`** (`int`): The number of input features (the size of the input tensor).
- **`out_features`** (`int`): The number of output features (the size of the output tensor).

### **Returns:**
A tensor representing the packed 4-bit weights and scales, which can be passed to the matrix multiplication operation.

---

## 2. `torch.ops.aten._dyn_quant_matmul_4bit`

This operation performs matrix multiplication using the quantized weights in 4-bit precision, optimized for efficient execution.

### **Parameters:**

- **`input`** (`Tensor`): The input tensor for the matrix multiplication, typically with shape `[batch_size, in_features]`.
- **`packed_weights`** (`Tensor`): The packed 4-bit weights, returned by `torch.ops.aten._dyn_quant_pack_4bit_weight`.
- **`groupsize`** (`int`): The number of channels per group. The value must be a multiple of 32 or equal to `in_features`.
- **`in_features`** (`int`): The number of input features (same as the Linear layer's `in_features`).
- **`out_features`** (`int`): The number of output features (same as the Linear layer's `out_features`).

### **Returns:**
A tensor representing the result of the matrix multiplication, with shape `[batch_size, out_features]`.

---

## API Usage Example

In Below Comment there is an example of how to use these operations for quantization, execution, and benchmarking:



cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo @jgong5 @Xia-Weiwen @leslie-fang-intel @msaroufim
Repository: next.js
Issue: Unexpected token Delim('$') at [project]/app/globals.css:757:29
Labels: Turbopack

### Link to the code that reproduces this issue

https://github.com/J4v4Scr1pt/ThnJK/tree/upgradeToNextjs15andReact19

### To Reproduce

Start the project with --turbopack enabled and navigate to any page. As soon as it compile it will fail on below error. 

### Current vs. Expected behavior

Current:
Fails as soon as Turbo is trying to compile a page you navigate to.

Expected:
To work as with webpack.

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32470
  Available CPU cores: 12
Binaries:
  Node: 22.12.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: 9.15.0
Relevant Packages:
  next: 15.1.0 // Latest available version is detected (15.1.0).
  eslint-config-next: 15.1.0
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.7.2
Next.js Config:
  output: N/A
```


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

Turbopack

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

next dev (local), Other (Deployed)

### Additional context

I have some custom Tailwind configuration that used to work with Nextjs and webpack. With NextJs 15 and turbo being stable I wanted to use this. But then I get this error:
![image](https://github.com/user-attachments/assets/6a392c5f-8d08-4f45-9f39-42bfaa92b238)
```
 ⨯ ./app/globals.css:758:30
Parsing css source code failed
  756 |   --background: ({ opacityVariable, opacityValue }) => {
  757 |           if (!isNaN(+opacityValue)) {
> 758 |             return `hsl(var(${nextuiColorVariable}) / ${opacityValue})`;
      |                              ^
  759 |           }
  760 |           if (opacityVariable) {
  761 |             return `hsl(var(${nextuiColorVariable}) / var(${nextuiOpacityVariable}, var(${opacityVariable})))`;

Unexpected token Delim('$') at [project]/app/globals.css:757:29
```

I can only fix the issue by removing the method or using webpack, which is not what I want :).
Repository: vscode
Issue: Scroll glitch in resolve conflicts view
Labels: bug,merge-editor

Testing #5648




https://github.com/microsoft/vscode/assets/964386/1a172e05-8cda-4a9c-bbe8-d972d0cf2872
Repository: vscode
Issue: Ability to Automatically Expand Replies in commentThread
Labels: feature-request,comments

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Hello,

I’m developing a VSCode extension that uses the commentThread feature. According to the [official documentation](https://code.visualstudio.com/api/references/vscode-api#CommentThread), it is possible to add comments and replies to a thread. However, I’ve noticed that replies are collapsed by default in the UI, and there doesn’t seem to be a way to control this behavior programmatically.

Feature Request:
I would like to request a feature that allows developers to control whether replies in a commentThread are expanded or collapsed by default. For example, an additional property like isRepliesExpanded: boolean in the CommentThread API would be extremely helpful.

![Image](https://github.com/user-attachments/assets/e5ac890d-6abe-44a1-a7d1-11e33365f965)
Repository: kubernetes
Issue: `AuthorizedTTL`, `UnauthorizedTTL` in `apiserver.config.k8s.io/v1{alpha1,beta1}.AuthorizationConfiguration` cannot be set to `0`
Labels: kind/feature,sig/auth,needs-triage

### What would you like to be added?

https://github.com/kubernetes/kubernetes/blob/16da2955d0ffeb7fcdfd7148ef2fb6c1ce1a9ef5/staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/types.go#L95-L104 suggests that the `AuthorizedTTL` and `UnauthorizedTTL` fields behave like the "legacy" `--authorization-webhook-cache-{un}authorized-ttl` flags. Yet, since they are no pointer types, they get defaulted if they are unset or explicitly set to `0` (which isn't the case when using the flags): https://github.com/kubernetes/kubernetes/blob/16da2955d0ffeb7fcdfd7148ef2fb6c1ce1a9ef5/staging/src/k8s.io/apiserver/pkg/apis/apiserver/v1/defaults.go#L52-L59

This prevents disabling caching, since setting it to `0` leads to defaulting. A workaround is to set a very low duration (`1ns` or similar), but it would be cleaner if the fields could simply be set to `0`.

Shouldn't we make them `*metav1.Duration` so that we can properly distinguish the cases where they are unset (and should be defaulted) and where they were explicitly set to `0`?

_Edit: Since this proposal is a breaking API change ([ref](https://github.com/kubernetes/kubernetes/pull/129237#issuecomment-2590367515)), another approach is [introducing dedicated fields](https://github.com/kubernetes/kubernetes/pull/129237#issuecomment-2591263513) for disabling caching explicitly._

### Why is this needed?

Prevent caching the decisions at all, similar to how it was possible before with setting
Repository: vscode
Issue: onDidChangeConfiguration event fires for a window scope setting
Labels: api,config,under-discussion

1. Create a `window` scope configuration setting
```json
        "git.decorations.enabled": {
          "type": "boolean",
          "default": true,
          "description": "%config.decorations.enabled%"
        },
```

2. Use the following snippet to listen for configuration changes
```ts
const onEnablementChange = filterEvent(workspace.onDidChangeConfiguration, e => e.affectsConfiguration('git.decorations.enabled'));
onEnablementChange(this.update, this, this.disposables);
```
3. Open the user settings file and add the following JSON
```json
"git.decorations.enabled": true
```

Actual: event fires even though the value did not change 
Expected: event should not fire since the value did not change
Repository: TypeScript
Issue: Organize Import removes React import on React JS files
Labels: Needs More Info

<!-- ⚠️⚠️ 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/No

<!-- 🪓 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.96.0
- OS Version: Windows_NT x64 10.0.22631

Version: 1.96.0 (user setup)
Commit: 138f619c86f1199955d53b4166bef66ef252935c
Date: 2024-12-11T02:29:09.626Z
Electron: 32.2.6
ElectronBuildId: 10629634
Chromium: 128.0.6613.186
Node.js: 20.18.1
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.22631

Steps to Reproduce:

1. Open a JS file containing a React import
2. Have Organize Imports as a code action on save
3. See the React import get removed, despite it being used



Looks like this got re-introduced in latest update microsoft/vscode#47287
Repository: go
Issue: runtime: deadlock detection does not work properly in js/wasm
Labels: NeedsInvestigation,arch-wasm,compiler/runtime

### Go version

go version go1.23.3 windows/amd64

### Output of `go env` in your module/workspace:

```shell
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\zxilly\AppData\Local\go-build
set GOENV=C:\Users\zxilly\AppData\Roaming\go\env
set GOEXE=.exe
set GOEXPERIMENT=
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=C:\Users\zxilly\go\pkg\mod
set GONOPROXY=1
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\zxilly\go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLCHAIN=auto
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.23.3
set GODEBUG=
set GOTELEMETRY=local
set GOTELEMETRYDIR=C:\Users\zxilly\AppData\Roaming\go\telemetry
set GCCGO=gccgo
set GOAMD64=v1
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=NUL
set GOWORK=
set CGO_CFLAGS=-O2 -g
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-O2 -g
set CGO_FFLAGS=-O2 -g
set CGO_LDFLAGS=-O2 -g
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=C:\Users\zxilly\AppData\Local\Temp\go-build192904976=/tmp/go-build -gno-record-gcc-switches
```


### What did you do?

Compile and run following code

```go
package main

func main() {
	select {}
}
```


### What did you see happen?

This will lead to 

```
fatal error: all goroutines are asleep - deadlock!

goroutine 1 [select (no cases)]:
main.main()
        T:/wasm/test.go:4 +0xf
```

on `windows/amd64`.

However, on `js/wasm` build, it will lead to

```
PS T:\wasm> node "C:\Program Files\Go\misc\wasm\wasm_exec_node.js" t.wasm
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x0 addr=0x0 pc=0x0]

goroutine 5 [running]:
panic({0xbc20, 0xc2280})
        C:/Program Files/Go/src/runtime/panic.go:804 +0x23
runtime.panicmem(...)
        C:/Program Files/Go/src/runtime/panic.go:262
runtime.sigpanic()
        C:/Program Files/Go/src/runtime/os_wasm.go:30 +0xb
runtime.handleEvent()
        C:/Program Files/Go/src/runtime/lock_js.go:289 +0x14
runtime.goexit({})
        C:/Program Files/Go/src/runtime/asm_wasm.s:434 +0x1
```

### What did you expect to see?

Similiar output on wasm platform
Repository: next.js
Issue: Fragment surrounding metatag component breaks scroll behavior
Labels: Navigation

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/5fqq5c

### To Reproduce

1. start the application
2. scroll to the bottom of the preview
3. click the "Bar" link and observe scroll position is at the top. This page contains a metatag inside a `<div>`
4. Scroll to the bottom of the preview
5. click the "Foo" link and observe scroll position is still at the bottom. This page contains a metatag inside a fragement `<>`

### Current vs. Expected behavior

Using React 19's metatag behaviors, it is expected that the scroll position would be at the top for both "Foo" and "Bar" pages. The position of a metatag inside a fragment should not alter the scroll position behavior when navigating between pages.

ie.
```TypeScript
<>
  <title>Foo</title>
  <h1>Foo</h1>
</>
```
breaks the scroll, while the below scrolls appropriately.
```TypeScript
<div>
  <title>Bar</title>
  <h1>Bar</h1>
</div>
```

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.12.0
  npm: 10.5.0
  Yarn: 1.22.19
  pnpm: 8.15.6
Relevant Packages:
  next: 15.1.1-canary.6 // Latest available version is detected (15.1.1-canary.6).
  eslint-config-next: 15.0.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.7.2
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Navigation

### Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local), Vercel (Deployed)

### Additional context

_No response_
Repository: deno
Issue: `deno outdated` flag clash
Labels: outdated

              I've found another confusing behavior of `deno outdated`

```
: deno outdated                   
```
```
: deno outdated --compatible
┌─────────────┬────────────────┬────────────────┬─────────┐
│ Package     │ Current        │ Update         │ Latest  │
├─────────────┼────────────────┼────────────────┼─────────┤
│ npm:daisyui │ 5.0.0-alpha.47 │ 5.0.0-alpha.48 │ 4.12.22 │
└─────────────┴────────────────┴────────────────┴─────────┘

Run deno outdated --update to update to the latest compatible versions,
or deno outdated --help for more information.
```
```
: deno outdated --compatible -u
error: the argument '--compatible' cannot be used with '--update'

Usage: deno outdated --compatible [filters]...
```
```
: deno outdated  -u
Updated 1 dependency:
 - npm:daisyui 5.0.0-alpha.47 -> 5.0.0-alpha.48
```

I would expect `deno outdated -u` to do nothing if `deno outdated` outputs nothing and `deno outdated --compatible -u` to update daisyui to the update version outputed by `deno outdated --compatible` but `-u` doesn't work with `--compatible`

_Originally posted by @kuchta in https://github.com/denoland/deno/issues/27025#issuecomment-2543772117_
Repository: rust
Issue: Better error reporting for `T: ?Sized` types when `impl Receiver for MyType<T>` is implicitly sized
Labels: A-diagnostics,F-arbitrary_self_types,D-confusing,C-discussion

Originally from @adetaylor:

---

I'm looking for advice on the diagnostics around the `Sized`ness of a receiver, and I'm hoping @estebank can advise (or of course anyone else @wesleywiser @compiler-errors ).

The background (for Esteban):
* This is the tracking issue for "arbitrary self types v2", which allows methods like this:
  ```rust
  impl Foo {
    fn bar(self: MySmartPtr<Self>) {} // note type of self
  }
  ```
* The key part of this is that types (such as `MySmartPtr`, above) which wish to act as method receivers must implement a new trait `Receiver`
* Before writing the [RFC](https://github.com/rust-lang/rfcs/pull/3519), I happened to make a mistake which I think might be quite common, so in the [Diagnostics section of the RFC](https://github.com/rust-lang/rfcs/blob/master/text/3519-arbitrary-self-types-v2.md#diagnostics) I proposed adding a diagnostic specifically for this case (the second bullet in that linked section).

The case I want to generate an error for: [see this code](https://github.com/rust-lang/rust/commit/a3a43b079b6ff6593dc824b2d1329a5649ba2197#diff-fef56aa988c6838c2a99e5b21e1c0986d7dd101c97b4941079b278cfa9183827R6) but, in short, someone implements `Receiver` for `T` but not `T: ?Sized`.

Questions. Even partial answers to some questions might point me in the right direction.

### Overall approach

1. I can quite easily get hold of an unmet obligation for why the type of `self` doesn't implement `Receiver`. But how can I determine if some missing `?Sized` bound is the problem?
  a. Re-run the resolution process with some simulated fake sized `Self` type? See if the obligation resolves in that case, and if so, show a diagnostic.
  b. Simulate that some `impl<T> Receiver for T` block is actually `impl <T: ?Sized> Receiver for T`, elsewhere in the program or even in another crate. See if the obligation resolves in that case, and if so, show a diagnostic.
  c. Suggest "ensure any Receiver implementations cover !Sized" without actually checking that this is the problem. This might give lots of false positives.

---

@adetaylor: I've split this out into its own issue. Let's try to avoid discussion on tracking issues. It's really not the purpose of a tracking issue, and we've locked tracking issues in the past for exactly the same reason (it often pings like... 40 people who are subscribed to the issue).

These days tracking issues carry the note: 

> As with all tracking issues for the language, please file anything unrelated to implementation history, that is: bugs and design questions, as separate issues as opposed to leaving comments here. The status of the feature should also be covered by the feature gate label. Please do not ask about developments here.
Repository: godot
Issue: mipmap are not applied at runtime load glb file
Labels: bug,topic:import,topic:3d

### Tested versions

4.3 stable

### System information

Windows 11 - Godot 4.3 Stable

### Issue description

1. editor imported *.glb model - mipmap ok
2. separate model (*.gltf+*.bin+*.png) - mipmap ok
3. embed texture model (*.glb) - mipmap not ok

When loading a glTF file with embedded textures at runtime, mipmaps are not applied. I tried using the `GLTFState.get_images()` function to retrieve the images, calling the `generate_mipmap` function on them, and then resetting them with `GLTFState.set_images`, but it still doesn't work.

Looking through past issues, it seems that mipmaps are not applied to glTF files with embedded textures. Is there any plan to support mipmap generation for *.glb files with embedded textures when loaded at runtime? 

I couldn’t find anything related in the milestones.

best regards.

### Steps to reproduce

```gdscript
extends Node3D

var loaded_model

func _ready() -> void:
	var gltf_document = GLTFDocument.new()
	var gltf_state = GLTFState.new()
	
	var error = gltf_document.append_from_file("res://Model/TestModel.glb", gltf_state)
	if error == OK:
		# generate mipmap
		var images = gltf_state.get_images()
		var new_images_array = []
		for img in images:
			var src_img = img.get_image()
			src_img.generate_mipmaps()
			new_images_array.append(ImageTexture.create_from_image(src_img))
			print("src_img.get_size() -> ", src_img.get_size())
			print("src_img.get_mipmap_count() -> ", src_img.get_mipmap_count())
		gltf_state.set_images(new_images_array)
		
		loaded_model = gltf_document.generate_scene(gltf_state)
		add_child(loaded_model)
```

### Minimal reproduction project (MRP)

[mipmaptest.zip](https://github.com/user-attachments/files/18154749/mipmaptest.zip)
Repository: vscode
Issue: During open search bar leave cursor in editor if before search open some text was selected (and put into search field)
Labels: bug,editor-find,confirmation-pending

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

![Image](https://github.com/user-attachments/assets/749471a1-106d-4379-bf20-14878dff0c49)
Repository: vscode
Issue: Clear search field value if I open it (again, after search)
Labels: feature-request,search

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Repository: vscode
Issue: editor.rulers and column count are off by one
Labels: bug,editor-contrib

<!-- ⚠️⚠️ 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.97.0-insider ce50bd4876af457f64d83cfd956bc916535285f4 x64 (fresh install)
- OS Version: Linux 6.12.1-arch1-1 x86_64

Steps to Reproduce:

1. Use the editor rulers feature by turning it on in settings, e.g.

```json
  "editor.rulers": [
    {
      "column": 0,
      "color": "#b3ff0070"
    },
    8,
    {
      "column": 10,
      "color": "#ff000070"
    },
    12,
  ],
```

2. Observe that the column lines are consistently one off from the column count displayed elsewhere in vscode.

![Image](https://github.com/user-attachments/assets/f1ca1173-3a8e-4eb6-98b4-724642cabd00)

It appears that columns are 1-indexed in some places and 0-indexed in others? 

Personally I would prefer seeing everything 0-indexed, for me I want column count should be equivalent to line length (i.e. I like the rulers how they are, but the column count shown elsewhere is off). But any amount of consistency would be an improvement.

Semi-related:
- https://github.com/microsoft/vscode/issues/144942
- https://github.com/microsoft/vscode/issues/107869