sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: `masked_fill` with `FloatTensor` mask will never mask but fails silently.
Labels: triaged,module: correctness (silent),module: masked operators

### 🐛 Describe the bug

Passing `bool` or `int` tensors as a mask input to `masked_fill` returns the excepted result, but a `float` tensor will not mask and returns input tensor silently.

```
import torch

x = torch.rand(4, 4)
m = torch.rand(4, 4) > 0.5

print(m, '\n')
print(x.masked_fill(m , 0.), '\n')
print(x.masked_fill(m.int() , 0.), '\n')
print(x.masked_fill(m.float() , 0.), '\n')
```

Output:
```
tensor([[False, False,  True,  True],
        [ True, False, False, False],
        [ True,  True, False, False],
        [ True,  True, False, False]])

tensor([[0.8455, 0.7714, 0.0000, 0.0000],
        [0.0000, 0.1767, 0.9352, 0.1114],
        [0.0000, 0.0000, 0.7616, 0.2102],
        [0.0000, 0.0000, 0.4796, 0.1690]])

tensor([[0.8455, 0.7714, 0.0000, 0.0000],
        [0.0000, 0.1767, 0.9352, 0.1114],
        [0.0000, 0.0000, 0.7616, 0.2102],
        [0.0000, 0.0000, 0.4796, 0.1690]])

tensor([[0.8455, 0.7714, 0.7397, 0.3867],
        [0.8923, 0.1767, 0.9352, 0.1114],
        [0.9112, 0.1297, 0.7616, 0.2102],
        [0.9136, 0.0941, 0.4796, 0.1690]])
```

I feel this behaviour is inconsistent with python's behaviour: `bool(0.0) == False` and `bool(1.0) == True` and should return the same as the other two examples. In any case, it should at least fail when a `FloatTensor` is passed as a mask.

### Versions

```
$ python collect_env.py
Collecting environment information...
PyTorch version: 1.13.0
Is debug build: False
CUDA used to build PyTorch: 11.8
ROCM used to build PyTorch: N/A

OS: Arch Linux (x86_64)
GCC version: (GCC) 12.2.0
Clang version: 14.0.6
CMake version: version 3.24.3
Libc version: glibc-2.36

Python version: 3.10.8 (main, Nov  1 2022, 14:18:21) [GCC 12.2.0] (64-bit runtime)
Python platform: Linux-6.0.8-arch1-1-x86_64-with-glibc2.36
Is CUDA available: True
CUDA runtime version: 11.8.89
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: NVIDIA GeForce GTX 1080 Ti
Nvidia driver version: 520.56.06
cuDNN version: Probably one of the following:
/usr/lib/libcudnn.so.8.6.0
/usr/lib/libcudnn_adv_infer.so.8.6.0
/usr/lib/libcudnn_adv_train.so.8.6.0
/usr/lib/libcudnn_cnn_infer.so.8.6.0
/usr/lib/libcudnn_cnn_train.so.8.6.0
/usr/lib/libcudnn_ops_infer.so.8.6.0
/usr/lib/libcudnn_ops_train.so.8.6.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy==0.982
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.23.4
[pip3] rotary-embedding-torch==0.1.5
[pip3] torch==1.13.0
[pip3] torchtext==0.10.0a0+0d670e0
[conda] nomkl                     3.0                           0
```

I also reproduced this on a Ubuntu 20 internal node, but don't have access to the env right now.
Repository: rust
Issue: Remove unreachable constant data from binary 
Labels: I-heavy,C-optimization

Take the following code i.e.:
```rust
// main.rs
const VAL: &[u8] = {
    ArrayVec::<u8, 1>::new()
        .push(42)
        .as_slice()
};

pub struct ArrayVec<T, const CAP: usize> {
    array: [std::mem::MaybeUninit<T>; CAP],
    len: usize,
}

impl<T: Copy, const CAP: usize> ArrayVec<T, CAP> {
    pub const fn new() -> Self { 
        Self {
            array: [std::mem::MaybeUninit::uninit(); CAP],
            len: 0,
        }
    }

    pub const fn push(mut self, value: T) -> Self {
        self.array[self.len] = std::mem::MaybeUninit::new(value);
        self.len += 1;
        self
    } 

    pub const fn as_slice(&self) -> &[T] {
        unsafe {
            std::slice::from_raw_parts(&self.array as *const _ as *const _, self.len)
        }
    }
}

fn main() {
    println!("{VAL:?}");
}
```

Running `rustc -OOO ./main.rs` results in a binary of size `4 MB`. Increasing the capacity of the array to i.e. `100000000` results in a binary of size `100 MB`, even though the resulting slice still only contains one element.  The same happens with `cargo` and/or `LTO` enabled. Switching to a `static` does not help either.

It would be pretty nice if the compiler could remove this excess capacity from the resulting binary. Especially, since a similar pattern is often used when implementing constant/more powerful versions of `stringify`, `concat`, `format`, ...

I'm not sure, however, if that is considered backwards compatible since it's currently possible to access values outside the slice range within the array using `get_unchecked`. 
I would argue, that doing so is unsound since it relies on the compiler not performing a reasonable optimization.

#### Meta
```
rustc 1.67.0-nightly (83356b78c 2022-11-17)
binary: rustc
commit-hash: 83356b78c4ff3e7d84e977aa6143793545967301
commit-date: 2022-11-17
host: x86_64-unknown-linux-gnu
release: 1.67.0-nightly
LLVM version: 15.0.4
```
Repository: react
Issue: Bug: Streamed hydration hangs when consecutive Suspense boundaries suspend during streaming
Labels: Status: Unconfirmed,Type: Needs Investigation

When streaming from the server, I've encountered a bug where client-side hydration with `hydrateRoot()` will seemingly "pause" and never complete, leaving html tags with `hidden` and `id` attributes hanging around. Any user events cause [this error](https://github.com/facebook/react/issues/24959#issuecomment-1317309116) to show, likely because the app still thinks it's in the middle of hydrating. Interestingly enough, if you switch the promise timeouts in `routeConfig` so that `post` resolves earlier than `posts`, then you will not have this issue. So to summarize for this example: if only one boundary suspends, all is well, but if two boundaries suspend, we see this bug.

Hoping this is something stupid on my part, but stuck nonetheless.

React version: 18.2.0

## Steps To Reproduce

1. Load the example at https://stackblitz.com/github/tanstack/router/tree/beta/examples/react/basic-ssr?file=src%2FApp.tsx
2. Paste `/posts/1` into the preview URL to trigger a server-side load of that full URL
3. Inspect the dom

Link to code example:

https://stackblitz.com/github/tanstack/router/tree/beta/examples/react/basic-ssr?file=src%2FApp.tsx

## The current behavior

The markup is not visible (some of it is hidden)

## The expected behavior

All of the markup should be visible
Repository: deno
Issue: 'npm:graphql-tag' does not provide an export named 'gql'
Labels: needs investigation,node compat

This is my TS script:

```
import { gql } from "npm:graphql-tag";

gql;
```

When I run it with `deno run -A main.ts`, I get this error:

```
error: Uncaught SyntaxError: The requested module 'npm:graphql-tag' does not provide an export named 'gql'
import { gql } from "npm:graphql-tag";
```

This is anormal because the graphql-tag does export a gql object.
Repository: three.js
Issue: Offloading the Hosting and Maintenance of the Non-English Docs
Labels: Documentation,Manual

I propose that the Non-English docs be hosted elsewhere -- and maintained by others.

Being responsible for ensuring the English and non-English docs remain in sync is not an efficient use of the three.js maintainers' time.

Furthermore, it is a burden that is only going to increase as more languages are supported and the docs become more complete.

This thread is for discussing how offloading the hosting and maintenance of the Non-English docs may best be accomplished.

It would be helpful if someone would be willing to take responsibility for this task. 😇
Repository: angular
Issue: `inject` function does not correctly infer the return type when used with generic classes/abstract classes
Labels: area: core,core: di,cross-cutting: types,P4,bug

### Which @angular/* package(s) are the source of the bug?

core

### Is this a regression?

No

### Description

If we use the `inject` function with a generic class (or abstract class), the return type won't be properly inferred:

```ts
import { inject } from '@angular/core';

class C<T extends number> {}

const c1 = inject(C); // type: C<any>
const c2 = inject(C<1>) // type: C<any>

abstract class AC<T extends string> {}

const ac1 = inject(AC); // type: AC<any>
const ac2 = inject(AC<'ng'>); // type: AC<any>
```

Typing issue is due to the AbstractType interface. It's currently defined as follows:

```ts
interface AbstractType<T> extends Function {
  prototype: T;
}
```

To solve this typing bug, `AbstractType` can be defined as follows:

```ts
type AbstractType<T> = abstract new (...args: unknown[]) => T;
```

Here is the [Stackblitz playground](https://stackblitz.com/edit/angular-qldklj-4f7htw?file=src%2Fapp%2Finject-typing-demo.ts) containing the `typedInject` function that solves this issue.

---

**This fix would introduce a breaking change.**

---

**If accepted, I'll create a PR for this bug.**

### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/angular-qldklj?file=src%2Fapp%2Finject-typing-demo.ts

### Please provide the exception or error you saw

_No response_

### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 15.0.0
```


### Anything else?

As a workaround, we can explicitly set the return type:

```ts
class C<T extends number> {}

const c = inject<C<number>>(C);
```
Repository: TypeScript
Issue: Intrinsic types remove widening on literal types
Labels: Suggestion,Needs Proposal

# Bug Report

### 🔎 Search Terms

intrinsic, uppercase, lowercase, widening

### 🕗 Version & Regression Information

Occurs in Nightly (5.0.0-dev.20221118) and every version I tried going back to 4.1.5

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=5.0.0-dev.20221118&ssl=16&ssc=69&pln=1&pc=1#code/CYUwxgNghgTiAEYD2A7AzgF3gDwFzwCMkkIQoUBuAKCtKwHM4QMBLFegRngF54AiABYgIEJH2pUWAMwAU2AJTwA3lXjxGIZm049+9YsAIBPEOPgB6c-DhQ0aFvRQBbECixQRSAO4hgAOioAXxpaZnUmVnYAJl0wKAAHFgwPFgAvEBlBYVE+eQlpOUUVNQ0taNiEpJT0zP0kQxNc6mCqUEhYBCkAVxQwVlRESuSINJAAHgAVeBBsDFdgNHhMGG0APhkk-An5fABhIerxidWKIA)

### 💻 Code

```ts
declare const x: boolean;
declare function capitalize<T extends string>(it: T): Capitalize<T>;

// example 1
let greeting1 = "hello";
if(x) {
  greeting1 = "goodbye"; // allowed
}

// example 2
let greeting2 = capitalize("hello");
if(x) {
  greeting2 = capitalize("goodbye"); // type error
}

```

This example is adapted from @RyanCavanaugh's example [here](https://github.com/microsoft/TypeScript/issues/44268#issuecomment-1320597906).

### 🙁 Actual behavior

Reassigning a new string to `greeting1` succeeds, but reassigning one to `greeting2` fails.

### 🙂 Expected behavior

The widening behavior for standard literal types (like `"hello"`) should not be different from the behavior of the type produced by `Capitalize<"hello">`; if the widening behavior were the same, `greeting2` would also have its type inferred as `string`, and would accept a new string being assigned to it.

Having inconsistent widening like this seems unintuitive and possibly unintentional. Concretely, it also makes it impossible to use an intrinsically-typed value in a `let` statement (as shown), which creates a similar problem in @RyanCavanaugh's original example in #44268.
Repository: stable-diffusion-webui
Issue: [Feature Request]: Resize & Fill direction options
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 ?

If i use `Resize and fill` it seems to resize from the centre outwards where sometimes I just want to fill eg downwards. I'm not sure Outpainting seems to work the same way otherwise I'd use that

thanks

### Proposed workflow

1. Go to img2img
2. Press "Resize & fill"
3. Select directions Up / Down / Left / Right ... by default all will be selected

alternatively maybe an anchor eg Top Left, Top, Top Right, Centre Centre etc

thanks


### Additional information

_No response_
Repository: godot
Issue: Vulkan: OmniLight3D Shadow Mode Cube is broken (Intel macOS driver bug)
Labels: bug,platform:macos,topic:rendering,topic:thirdparty,needs testing

### Godot version

4.0 beta5

### System information

macOS 11.7.1 Intel-iris-GPU Forward+ Mobile

### Issue description

OmniLight3D Shadow Mode Cube is broken in both of Forward+ and Mobile backend, btw I'm not sure this is a mac intelGPU issue or not, need testing from different platform user's and different macOS version/different mac device.

Cube
![Screen Shot 2022-11-19 at 1 46 46 PM](https://user-images.githubusercontent.com/64188282/202836483-52b2a866-798d-4496-8d9f-784a0bf9a4ac.png)

Dual Paraboloid
![Screen Shot 2022-11-19 at 1 50 40 PM](https://user-images.githubusercontent.com/64188282/202836623-28e71bc6-d5a2-4ae8-9127-afb63fbbd33f.png)



### Steps to reproduce

see minimal reproduction project

### Minimal reproduction project

[Godot4Beta5Forward.zip](https://github.com/godotengine/godot/files/10046187/Godot4Beta5Forward.zip)
Repository: godot
Issue: Vulkan: OmniLight3D light textures projector looks incorrect
Labels: bug,topic:rendering,topic:3d

### Godot version

4.0 beta5

### System information

macOS 11.7.1 Intel-iris-GPU Forward+ Mobile

### Issue description

when setting OmniLight3D's projector with a texture, it looks incorrect.also after first time setting projector, the Editor is different from Runtime, but close the scene and reopen the scene, this difference will be fixed.

_first time setting projector_
![Screen Shot 2022-11-19 at 2 07 16 PM](https://user-images.githubusercontent.com/64188282/202837256-811e4539-f12b-41f7-bbd2-7c33a6a84ba3.png)

_runtime_
![Screen Shot 2022-11-19 at 2 07 23 PM](https://user-images.githubusercontent.com/64188282/202837273-ba256c3b-e69b-4f3b-b050-f33e6d7f0a9c.png)

_reopen scene_
![Screen Shot 2022-11-19 at 2 10 35 PM](https://user-images.githubusercontent.com/64188282/202837282-f4014a09-cfad-4c53-86b5-e1fa5246d192.png)







### Steps to reproduce

add a OmniLight3D to Scene
add a meshinstance
setting a texture to projector
see the result

### Minimal reproduction project

[Godot4Beta5Forward.zip](https://github.com/godotengine/godot/files/10046227/Godot4Beta5Forward.zip)
Repository: neovim
Issue: diagnostic sort by source
Labels: enhancement,diagnostic

### Feature already in Vim?

Not that I am aware of.

### Feature description

Currently we have severity_sort, which makes it possible to sort diagnostics by severity. I propose we also allow sorting by diagnostic source. According to this [person](https://github.com/neovim/neovim/issues/15685#issuecomment-921918266), a function was deemed unneeded here, however this additional use case might encourage the use of a generic sort function.

**Wish statement**
I'd like to be able to sort diagnostic messages by their source, prioritizing, for example, those messages that come from typescript over those that come from eslint.
Repository: pytorch
Issue: torch.mm: Exceptions thrown on the CPU and GPU are inconsistent
Labels: module: cuda,module: error checking,triaged

### 🐛 Describe the bug

Example 1:

        Test on the CPU:
        
            import torch
            input = torch.rand([5, 3], dtype=torch.float32)
            mat2 = torch.rand([64, 1], dtype=torch.float32)
            resCPU = torch.mm(input, mat2)
        
        result: RuntimeError: mat1 and mat2 shapes cannot be multiplied (5x3 and 64x1)
        
        Test on the GPU:
        
            import torch
            input = torch.rand([5, 3], dtype=torch.float32).cuda()
            mat2 = torch.rand([64, 1], dtype=torch.float32).cuda()
            resCPU = torch.mm(input, mat2)
        
        result: RuntimeError: mat1 dim 1 must match mat2 dim 0

Example 2:

        Test on the CPU:
        
            import torch
            input = torch.rand([2], dtype=torch.float32)
            mat2 = torch.rand([64, 1], dtype=torch.float32)
            resCPU = torch.mm(input, mat2)
        
        result: RuntimeError: self must be a matrix
        
        Test on the GPU:
        
            import torch
            input = torch.rand([2], dtype=torch.float32).cuda()
            mat2 = torch.rand([64, 1], dtype=torch.float32).cuda()
            resCPU = torch.mm(input, mat2)
        
        result: RuntimeError: tensors must be 2-D


As we can see, torch.mm running the same code on the CPU and GPU throws different exceptions.

torch.matmul and torch.bmm also have the same situation.

### Versions

pytorch: 1.8.0
Python version: 3.8
CUDA/cuDNN version: cuDNN 11.1
GPU models and configuration: RTX3060
Operating System：Windows 

cc @ngimel
Repository: godot
Issue: Audio does not stop when pausing the project from the editor
Labels: bug,confirmed,topic:audio

### Godot version

4.0 beta5

### System information

Windows10, AMD Ryzen 9 3900XT, RTX3070, Vulkan

### Issue description

When audio is being played from an AudioStreamPlayer and the game is started, upon pausing the game from the Editor (see image), the audio keeps playing. This is especially problematic when the audio timing is critical for a game (i.e. Rythm games). The same happens when playing the audio from an Audio Playback Track of an animation player, even though the animation itself pauses and resumes properly, any audio just goes on.

![image](https://user-images.githubusercontent.com/53947784/202872875-007b0ef4-7115-47b3-80ff-673a83000b0a.png)


### Steps to reproduce

- Create a new scene
- Add an AudioStreamPlayer and attach some long enough track to it
- Set Audio StreamPlayer to autoplay
- Run the project from the editor
- Pause the project from the editor

### Minimal reproduction project

[AudioStreamOnPause.zip](https://github.com/godotengine/godot/files/10047984/AudioStreamOnPause.zip)
Repository: PowerToys
Issue: Apply button's theme issue in power rename window when either nothing is entered in search for box or the text typed in search for box does not match any file selected.
Labels: Issue-Bug,Product-PowerRename,Area-User Interface,Priority-3,Area-Accessibility

### Microsoft PowerToys version

0.64.1

### Installation method

GitHub

### Running as admin

Yes

### Area(s) with issue?

PowerRename

### Steps to reproduce

1. Right click a file.
2. Click PowerRename.
3. Either do not enter anything in the search box or type something in the search for box which does not match to any file selected. 
4. See theme issue

![image](https://user-images.githubusercontent.com/114980232/202842940-a49f4bb5-58c2-4d9a-9d72-e136f47111a7.png)

[PowerToysReport_2022-11-19-14-08-05.zip](https://github.com/microsoft/PowerToys/files/10046523/PowerToysReport_2022-11-19-14-08-05.zip)

### ✔️ Expected Behavior

The theme of the apply button is proper when either nothing is entered in search for box or the text typed in search for box does not match any file selected so that it is easily visible.

### ❌ Actual Behavior

The theme of the apply button is not proper when either nothing is entered in search for box or the text typed in search for box does not match any file selected and that's why it is not easily visible.

### Other Software

_No response_
Repository: godot
Issue: Godot 4.0: Wrong VIEW vector in light() shader
Labels: enhancement,topic:rendering,documentation,topic:shaders,topic:3d

### Godot version

4.0.dev (84c404f), and same for 4.0b4

### System information

MacOS Monterey 12.0.1, Intel Iris Graphics 550 1536 MB

### Issue description

For orthogonal camera, VIEW vector in light() part of shader should be equal vec3(0.0, 0.0, 1.0), but in real this vector has different direction

### Steps to reproduce

Add camera, sphere and source of light in your project, add this shader to sphere:
```
shader_type spatial;

void light() {
	DIFFUSE_LIGHT += vec3( pow( dot(VIEW, NORMAL), 3.0) );
}
```
in editor result will be fine:
<img width="1028" alt="Screenshot 2022-11-19 at 16 21 57" src="https://user-images.githubusercontent.com/4573901/202842151-35d8dba7-1217-44db-afb3-c07096a6cb8f.png">

but in camera view:
<img width="1025" alt="Screenshot 2022-11-19 at 16 21 42" src="https://user-images.githubusercontent.com/4573901/202842172-c0511f4f-e8a8-45c8-83f0-0db10d4989a1.png">

As a temporary solution can use just vector vec3(0.0, 0.0, 1.0) instead VIEW

### Minimal reproduction project

[test_view.7z.zip](https://github.com/godotengine/godot/files/10046512/test_view.7z.zip)
Repository: pytorch
Issue: AdaptiveAvgPool1d throws different exceptions when using the gpu
Labels: module: nn,module: cuda,module: error checking,triaged,actionable,module: pooling

### 🐛 Describe the bug

Test on the CPU:

    import torch
    m = torch.nn.AdaptiveAvgPool1d(-2)
    input = torch.rand([1, 64, 8], dtype=torch.float32)
    m(input)

result: RuntimeError: Trying to create tensor with negative dimension -2: [1, 64, 1, -2]

Test on the GPU:

    import torch
    m = torch.nn.AdaptiveAvgPool1d(-2).cuda()
    input = torch.rand([1, 64, 8], dtype=torch.float32).cuda()
    m(input)

result:RuntimeError: setStorage: sizes [1, 64, -2], strides [64, 1, 1], storage offset 0, and itemsize 4 requiring a storage size of 244 are out of bounds for storage of size 0

As we can see, torch.nn.AdaptiveAvgPool1d running the same code on the CPU and GPU throws different exceptions.

### Versions

pytorch: 1.8.0
Python version: 3.8
CUDA/cuDNN version: cuDNN 11.1
GPU models and configuration: RTX3060
Operating System：Windows 

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are @ngimel
Repository: pytorch
Issue: AdaptiveAvgPool1d failed in the lower version
Labels: module: nn,triaged,module: pooling

### 🐛 Describe the bug

pytorch 1.8 :

    import torch
    m = torch.nn.AdaptiveAvgPool1d(5)
    input = [torch.randn(1, 64),]
    print(m(*input))

result: RuntimeError: Expected 3-dimensional tensor, but got 2-dimensional tensor for argument #1 'self' (while checking arguments for adaptive_avg_pool1d)

pytorch 1.12 :

    import torch
    m = torch.nn.AdaptiveAvgPool1d(5)
    input = [torch.randn(1, 64),]
    print(m(*input))

result: tensor([[-0.2048,  0.0213,  0.1549,  0.5774, -0.3389]])

It is not clear why an exception is raised in pytorch 1.8, but not in other versions.




### Versions

pytorch: 1.8.0
Python version: 3.8
CUDA/cuDNN version: cuDNN 11.1
GPU models and configuration: RTX3060
Operating System：Windows 

pytorch: 1.12
Python version: 3.9
CUDA/cuDNN version: cuDNN 11.6
GPU models and configuration: RTX3060
Operating System：Windows 

cc @albanD @mruberry @jbschlosser @walterddr @kshitij12345 @saketh-are
Repository: godot
Issue: Canvasitem size is not always reported correctly when displayed first time 
Labels: bug,needs testing,topic:gui

### Godot version

4.0 beta 5 mono

### System information

macOS Ventura 13.0

### Issue description

Control's size is not reported correctly in some situations, see the example project.

In the example project the control which size is reported incorrectly is inside of an another scene. I didn't manage to reproduce the problem if the control was inside the same scene but not sure if that is the actual problem here.

The root control is a MarginContainer with some margin values set. The problem won't appear if the margin values are zero.

### Steps to reproduce

1. Run the included project.
2. Check the control's height that is printed to the console.
3. Select another tab and then again the first tab.
4. Check the height in the console again.

Expected: The height is same every time.

Actual: The height is different. First time it is larger and after that every time same but different than the first time.

### Minimal reproduction project

[tabContainerSizeTest.zip](https://github.com/godotengine/godot/files/10046950/tabContainerSizeTest.zip)