sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: libtorch doesn't work with cuda 12.6 and 12.4
Labels: module: windows,module: cpp,triaged

### 🐛 Describe the bug

```cpp
#include <cuda_runtime.h>
#include <torch/torch.h>
#include <iostream>

int main() {
    std::cout << "CUDA device count: " << torch::cuda::device_count() << std::endl;
    std::cout << "CUDA is available: " << (torch::cuda::is_available() ? "Yes" : "No") << std::endl;
    std::cout << "cuDNN is available: " << (torch::cuda::cudnn_is_available() ? "Yes" : "No") <<        std::endl;
    int deviceCount;
    cudaGetDeviceCount(&deviceCount);
    std::cout << "Number of CUDA devices: " << deviceCount << std::endl;
    return 0;
}
```
produces: CUDA device count: 0 CUDA is available: No cuDNN is available: No Number of CUDA devices: 1
cuda runtime correctly identifies my device - rtx 4070. nvcc confirms 12.6 cuda toolkit, however neither debug, nor release version (libtorch-win-shared-with-deps-2.4.0+cu124.zip) can detect my cuda device. i downgraded cuda toolkit to 12.4 to match pytorch, but same effect.

### Versions

libtorch-win-shared-with-deps-2.4.0+cu124.zip

cc @peterjc123 @mszhanyi @skyline75489 @nbcsm @iremyux @Blackhex @jbschlosser
Repository: PowerToys
Issue: FileExplorer Addons: Preview doesn't work anymore
Labels: Issue-Bug,Product-File Explorer,Needs-Triage

### Microsoft PowerToys version

0.83.0

### Installation method

PowerToys auto-update

### Running as admin

None

### Area(s) with issue?

File Explorer: Preview Pane

### Steps to reproduce

Since 0.82.0 the preview handler doesn't work anymore. The preview window works only with image files like png, jpg and gif. Every other file type fails (pdf, md, xml, html ...).
No errors show up in Event viewer.

### ✔️ Expected Behavior

I expected that the preview works with the mentioned files

### ❌ Actual Behavior

The previews don't show up, only the satandard message that no previe can't be provided

### Other Software
just after restart, no other software running, same issue.
---

This is not a duplicate (checked it),
[PowerToysReport_2024-08-03-19-55-33.zip](https://github.com/user-attachments/files/16482389/PowerToysReport_2024-08-03-19-55-33.zip)
Repository: pytorch
Issue: Enable F16C instructions in CUTLASS? At least for the inductor backend?
Labels: module: cuda,module: cpu,triaged,oncall: pt2

### 🚀 The feature, motivation and pitch

I was exploring options in the CUTLASS CMakelist as we may need to turn on https://github.com/NVIDIA/cutlass/blob/06b21349bcf6ddf6a1686a47a137ad1446579db9/CMakeLists.txt#L313 for flash attention 3 and general performance boosts and found CUTLASS_ENABLE_F16C https://github.com/NVIDIA/cutlass/blob/06b21349bcf6ddf6a1686a47a137ad1446579db9/CMakeLists.txt#L313 which is defaulted to off. Now I couldn't tell whether this instruction set is supported by PyTorch as a minimum requirement at the moment, but I believe it is for X86 architecture. If we do require this instruction set anyway for CPU ops, we should consider enabling this flag.

### Alternatives

* Leave it turned off and eat the minor performance loss for better compatibility with really old X86 archs.
* Turn it on conditional for the inductor CUTLASS backend if the CPU on the host supports it.

### Additional context

_No response_

cc @ptrblck @msaroufim @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @ezyang @chauhang @penguinwu
Repository: rust
Issue: Redundant calls to Vec::reserve are not optimized out
Labels: T-libs,C-optimization

```rust
pub fn reservy(x: &mut Vec<u8>) {
    x.reserve(10);
    x.reserve(10);
}
```
Currently compiles to:
```llvm
define void @example::reservy::hfd53462e17d1ffb0(ptr noalias nocapture noundef align 8 dereferenceable(24) %x) unnamed_addr #2 !dbg !239 {
start:
  %0 = getelementptr inbounds i8, ptr %x, i64 16, !dbg !241
  %len = load i64, ptr %0, align 8, !dbg !241
  %self = load i64, ptr %x, align 8, !dbg !248
  %_6 = sub i64 %self, %len, !dbg !258
  %_4 = icmp ult i64 %_6, 10, !dbg !262
  br i1 %_4, label %bb2, label %bb4, !dbg !263

bb2:
  tail call fastcc void @"alloc::raw_vec::RawVec<T,A>::reserve::do_reserve_and_handle::ha1fc33f26a8560a9"(ptr noalias noundef nonnull align 8 dereferenceable(16) %x, i64 noundef %len), !dbg !264
  %len1.pre = load i64, ptr %0, align 8, !dbg !265
  %self2.pre = load i64, ptr %x, align 8, !dbg !268
  %.pre = sub i64 %self2.pre, %len1.pre, !dbg !275
  %1 = icmp ult i64 %.pre, 10, !dbg !278
  br i1 %1, label %bb3, label %bb4, !dbg !279

bb4:
  ret void, !dbg !280

bb3:
  tail call fastcc void @"alloc::raw_vec::RawVec<T,A>::reserve::do_reserve_and_handle::ha1fc33f26a8560a9"(ptr noalias noundef nonnull align 8 dereferenceable(16) %x, i64 noundef %len1.pre), !dbg !282
  br label %bb4, !dbg !282
}
```

I found this while looking at the existing optimizer hints we have in RawVec. They are placed to optimize out redundant `reserve` calls, except that the hint is actually in the outlined part of `reserve` because of this wrapper that I wrote a while ago: https://github.com/rust-lang/rust/blob/edc4dc337b28a389dbd87b3825d7929381edeb8f/library/alloc/src/raw_vec.rs#L338-L343
Repository: tauri
Issue: [docs] How do I set up a csp to make my iframe access other web pages
Labels: type: question,security: needs feedback

This is my configuration
`
    "security": {
      "csp": "frame-ancestors 'none'",
      "devCsp": "frame-ancestors 'none'"
    },
`

This is my html.
<iframe class="a-iframe" src="https://www.baidu.com" title="baidu page."/>

![image](https://github.com/user-attachments/assets/ead147a6-b9c9-4f56-b316-1b8f6e167b0c)
Repository: godot
Issue: Several await get_tree().physics_frame crashes the project while reloading the tree
Labels: bug,topic:core,topic:gdscript,crash

### Tested versions

-Reproducible in: Godot v4.3.rc2.official [3978628c6]

### System information

Windows 10 - Godot v4.3.rc2

### Issue description

If you use several  ``` await get_tree().physics_frame ``` to create a delay and at the same time restart the project using ``` get_tree().reload_current_scene() ``` command you will get an error: "Invalid access to property or key 'physics_frame' on a base object of type 'null instance'."
I understand that this happens because the tree has not had time to initialize and await cannot bind to the _physics_frame_ signal of this tree. For me this is a very significant error because in my implementation I use queues for drawing/creating objects and await is used as a delay.

### Steps to reproduce

Сode that reproduces the problem:
```gdscript
extends Node

func _input(event: InputEvent) -> void:
	if event is InputEventKey and event.is_pressed():
		if event.keycode == 82: # R
			get_tree().reload_current_scene()

func _ready() -> void:
	for i in 30:
		await get_tree().physics_frame
		await get_tree().physics_frame
		await get_tree().physics_frame
		await get_tree().physics_frame
		await get_tree().physics_frame
		await get_tree().physics_frame
		await get_tree().physics_frame
		
		print(i)
```

### Minimal reproduction project (MRP)

[await_bug.zip](https://github.com/user-attachments/files/16482659/await_bug.zip)
Repository: rust
Issue: False positive `dead_code` for const used as const generic argument during impl marker trait
Labels: A-lints,T-compiler,C-bug,L-dead_code

In the following snippet, `CONST` gets a `dead_code` warning. However, `CONST` is most definitely used and the trait is also pub, so this warning seems incorrect.

Removing `CONST` causes the crate to no longer compile, and removing the impl would be a breaking change.

Adding any function (i.e. `fn method();`) to the trait and implementing it removes the warning as well. However, for marker traits this is not an option. It also clearly demonstrates that `CONST` is considered to be used despite being unaffected by `fn method()`.

Rust version: rustc 1.80.0 (051478957 2024-07-21)

This code compiles without warnings on 1.79.0 (rustc 1.79.0 (129f3b996 2024-06-10))

```rust
pub struct Value<const NUMBER: u8> {}

pub trait Trait {}

const CONST: u8 = 11;

impl Trait for Value<CONST> {}
```

Warning:
```
warning: constant `CONST` is never used
 --> lib.rs:5:7
  |
5 | const CONST: u8 = 11;
  |       ^^^^^
  |
  = note: `#[warn(dead_code)]` on by default
```

Adding `method()` removes the warning:
```rust
pub struct Value<const NUMBER: u8> {}

pub trait Trait {
    fn method();
}

const CONST: u8 = 11;

impl Trait for Value<CONST> {
    fn method() {}
}
```
Repository: stable-diffusion-webui
Issue: [Feature Request]: Add UNET and CLIP temperature
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Provides the ability to set the temperature for both UNET and CLIP.

### Proposed workflow

1. Go to Settings/Stable Diffsuion
2. Move UNET and CLIP sliders


### Additional information

[This extension](https://github.com/Extraltodeus/Stable-Diffusion-temperature-settings) for ComfyUI might help.
Repository: godot
Issue: Warn when disk space is low before installing export templates in the editor
Labels: enhancement,discussion,topic:core,topic:editor,needs testing

### Tested versions

Reproducable in all Godot versions i have tried. like 4.2.2 or 4.2.1

### System information

Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i5-6402P CPU @ 2.80GHz (4 Threads)

### Issue description

When i try to download the export template for Godot, there always comes a bunch of error messages in the console and when i try to export the game it says that the file is curropted.
I have tried to uninstall and download the export files and even Godot several times but it's always the same issue.
i also found out that when Godot "finishes" downloading the files when i look at the file at opens Ableton Live for some reason???

![image](https://github.com/user-attachments/assets/820d5e0e-2126-44f0-b48c-b3286824e1b4)


### Steps to reproduce

I just tried to download the export template files

### Minimal reproduction project (MRP)

N/A
Repository: godot
Issue: Render 3D Transparent Pass takes 80+ ms for a simple empty scene + cube
Labels: bug,topic:rendering,topic:3d,performance

### Tested versions

Godot Engine v4.3.rc2.official.3978628c6 - https://godotengine.org

### System information

 OpenGL API 4.1 Metal - 88 - Compatibility - Using Device: Apple - Apple M1 Pro

### Issue description

The profiler shows a spike in frame time, with `Render 3D Transparent Pass` taking 80+ ms.

I attached a MRP with an empty scene that instantiates a cube when you click with the left mouse button.

The cube is just a MeshInstance3D with a StandardMaterial3D.
It has Transparency = Alpha, and an AnimationPlayer with an animation that pulses the color changing the alpha.

The curious thing is that it only happens in a single frame, after that, the frame time is fine for all the frames.

![Screenshot 2024-08-03 at 8 59 37 PM](https://github.com/user-attachments/assets/9fc6679d-bc1b-4c98-ae86-91b289fef831)
![Screenshot 2024-08-03 at 9 05 47 PM](https://github.com/user-attachments/assets/a311f612-a3d1-48ce-8abc-419e45d835a3)


### Steps to reproduce

1. unzip the MRP
2. open in godot
3. click the play button
4. start the visual profiler
5. go to the game and click with the left mouse button inside the window
6. observe the cube being instantiated
7. observe the spike in frame time in the profiler

### Minimal reproduction project (MRP)

[render-3d-transparent-pass.zip](https://github.com/user-attachments/files/16484288/render-3d-transparent-pass.zip)
Repository: pytorch
Issue: MPS backend leaks memory when input sizes vary
Labels: module: memory usage,triaged,enhancement,module: mps

### 🐛 Describe the bug

Possibly similar to an old issue with the CPU backend: https://github.com/pytorch/pytorch/issues/27971 https://github.com/pytorch/pytorch/issues/32037

In my case both CPU and CUDA work fine, and only MPS has the issue. Is there anything similar to `LRU_CACHE_CAPACITY` but for MPS?

```python
import resource
import torch

device = torch.device("mps")  # no leak on "cpu" or "cuda"
model = torch.nn.Linear(32, 32, device=device)
for i in range(1, 8193):
    _ = model(torch.randn(8192, 32, device=device))  # memory usage fixed at ~176MB
    print(f"(good) {i} / 8192, Memory: {resource.getrusage(resource.RUSAGE_SELF).ru_maxrss}")
for i in range(1, 8193):
    _ = model(torch.randn(i, 32, device=device))  # memory growth up to ~3GB at ~1500 iters
    print(f"(bad) {i} / 8192, Memory: {resource.getrusage(resource.RUSAGE_SELF).ru_maxrss}")
```

### Versions

PyTorch version: 2.4.0
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 14.2 (arm64)
GCC version: Could not collect
Clang version: 15.0.0 (clang-1500.3.9.4)
CMake version: version 3.29.6
Libc version: N/A

Python version: 3.12.3 (main, Apr 15 2024, 17:43:11) [Clang 17.0.6 ] (64-bit runtime)
Python platform: macOS-14.2-arm64-arm-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Apple M1

Versions of relevant libraries:
[pip3] torch==2.4.0
[conda] Could not collect

cc @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen
Repository: rust
Issue: Can't cast a pointer of a trait object newtype to a pointer of that trait object.
Labels: A-raw-pointers,C-discussion,T-types,A-trait-objects

I tried this code:

```rust
trait Trait {}

struct Wrap(dyn Trait);

fn cast(x: *mut Wrap) {
    x as *mut dyn Trait;
}
```

I expected the code to compile. Instead, I got the following error, where it appears that the compiler is trying to do an unsize coercion and failing:

```
   Compiling playground v0.0.1 (/playground)
error[E0277]: the trait bound `Wrap: Trait` is not satisfied
 --> src/lib.rs:6:5
  |
6 |     x as *mut dyn Trait;
  |     ^ the trait `Trait` is not implemented for `Wrap`
  |
help: this trait has no implementations, consider adding one
 --> src/lib.rs:1:1
  |
1 | trait Trait {}
  | ^^^^^^^^^^^
  = note: required for the cast from `*mut Wrap` to `*mut dyn Trait`

error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
 --> src/lib.rs:6:5
  |
6 |     x as *mut dyn Trait;
  |     ^ doesn't have a size known at compile-time
  |
  = help: within `Wrap`, the trait `Sized` is not implemented for `(dyn Trait + 'static)`, which is required by `Wrap: Sized`
note: required because it appears within the type `Wrap`
 --> src/lib.rs:3:8
  |
3 | struct Wrap(dyn Trait);
  |        ^^^^
  = note: required for the cast from `*mut Wrap` to `*mut dyn Trait`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `playground` (lib) due to 2 previous errors
```

Of note, the following code compiles fine:

```rust
trait Trait {}

struct Wrap(dyn Trait);

fn cast(x: *mut Wrap) {
    x as *mut (dyn Trait,);
}
```

Probably related to #128621

### Meta

This issue reproduces on the playground on stable (1.80.0), and nightly (2024-08-02 fd8d6fbe505ecf913f5e).
Repository: PowerToys
Issue: Update failed: An error occurred trying to install this update
Labels: Issue-Bug,Area-Setup/Install,Needs-Triage,Needs-Team-Response

### Microsoft PowerToys version

0.80.1

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

General

### Steps to reproduce

Perform auto update from General page.

### ✔️ Expected Behavior

Launch `powertoyssetup-0.82.1-x64.exe` from `LOCALAPPDATA%\Microsoft\PowerToys\Updates` and begin installation process.

### ❌ Actual Behavior

Nothing happened. After manually running PowerToys, its version is still 0.80.1, mentioning that `An error occurred trying to install this update`. I've checked UpdateLogs, but it has only two lines without any helpful information:
`[2024-08-04 11:41:47.905856] [p-17688] [t-15068] [info] update logger is initialized
[2024-08-04 11:41:50.472172] [p-3480] [t-10040] [info] update logger is initialized`

### Other Software

_No response_
Repository: pytorch
Issue: [BUG+FIX] LibTorch silently fails to find cublas_v2.h for NVHPC
Labels: module: build,module: cuda,triaged,module: cublas

### 🐛 Describe the bug

LibTorch uses a bespoke `FindCUDAToolkit.cmake` script which silently fails to find `cublas_v2.h` file for the NVHPC toolkit. Specifically, the CMake error is below.

```Unable to find cublas_v2.h in either "/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/cuda/12.4/include" or "/opt/nvidia/hpc_sdk/Linux_x86_64/24.5/math_libs/include"```

Indeed, the file is in neither of the above directories but inside `.../math_libs/12.4/include`.

## Fix
This bug has already been patched since CMake 3.26 in this [PR](https://gitlab.kitware.com/cmake/cmake/-/commit/989d50d7fc3369955b1008158a110b77d3693b1a).

### Versions

2.4.0

cc @malfet @seemethere @ptrblck @msaroufim @csarofeen @xwang233
Repository: vscode
Issue: Smooth scroll not working if window.zoomLevel==1
Labels: bug,editor-scrollbar

<!-- ⚠️⚠️ 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.92.0
- OS Version: Win 11 23H2

Steps to Reproduce:

1. set `"window.zoomLevel": 1`
2. smooth scrool will not working
3. However, interestingly, if the zoomlevel is not 1 but rather 1.1, 0.9, or any other number, smooth scrolling works fine.
Repository: godot
Issue: `_UnhandledInput` and Object Picking interact in what seems like an undocumented way
Labels: enhancement,documentation,topic:input,topic:2d

### Tested versions

- Reproducible in `4.2.1.stable.official`
- Reproducible in `4.3.rc1.mono.official`
- Tested with C# and GDScript

### System information

M2 macOS - Sonoma 14.5

### Issue description

When I run the repro, I would expect all four nodes' `_unhandled_input` functions to be hit. However, it's only hit for two nodes: the `Sprite2D` and the `SubViewport` . This seems counter to what's documented [here](https://docs.godotengine.org/en/stable/tutorials/inputs/inputevent.html#how-does-it-work) since:

- I'm never marking any input as handled
- Physics picking should happen _after_ unhandled input is processed
	- Even if physics picking happened beforehand, I don't have any colliders in the scene

### Steps to reproduce

1. Set up this scene tree:
	- `VBoxContainer` (`mouse_filter == MOUSE_FILTER_PASS`)
	  - `SubViewportContainer` (`mouse_filter == MOUSE_FILTER_PASS`)
	    - `SubViewport` (`gui_disable_input == false`, `physics_object_picking == true`)
	      - `Sprite2D`
2. Add a script to each node whose `_unhandled_input` function simply logs the component's name.
3. Right-click in the game window.

What prints is:

```
Sprite2D
SubViewport
```

What I would expect is what happens when `physics_object_picking` is disabled:

```
Sprite2D
SubViewport
SubViewportContainer
VBoxContainer
```

I can't tell if this is a bug, incorrect documentation, or just a poor understanding on my part of what's happening. But I've spent several hours now trying various things out, looking up issues, and looking through the engine code and I still don't have an explanation for why I'm seeing this behavior. 😓

### Minimal reproduction project (MRP)

[viewportrepro.zip](https://github.com/user-attachments/files/16486463/viewportrepro.zip)
Repository: pytorch
Issue: Is torch.compile imprecise, as this 4-year-old comment in amp.grad_scaler claims?
Labels: module: numerical-stability,triaged,module: amp (automated mixed precision)

The grad scaler has [this code from 4 years ago](https://github.com/pytorch/pytorch/blob/2a8e94347fd65cecded303d39b6017d93f7d1ba2/torch/amp/grad_scaler.py#L333-L335):

```
# FP32 division can be imprecise for certain compile options, so we carry out the reciprocal in FP64.
assert self._scale is not None
inv_scale = self._scale.double().reciprocal().float()
```

Is this note about imprecision in torch.compile still true? It was present in [the initial commit](https://github.com/pytorch/pytorch/pull/26512).

Proposed solution: move the calculation of `inv_scale` out of `unscale_()` and put it in `update()` instead. Remove the double cast if not needed. (The current code launches 3 kernels per step for no good reason.)

cc @mcarilli @ptrblck @leslie-fang-intel @jgong5