sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [MPS] sum on a size=1 dim is ~5x slower than squeeze
Labels: module: performance,triaged,module: mps

### 🐛 Describe the bug

For a dimension with size 1, MPS's implementation of sum is ~5x slower than squeeze. This becomes more painful when the tensor is larger, as shown in the benchmarks below.

## Proposed Solution:
Would it help to have MPS's kernel for sum call squeeze when the size of the sum'd dimension is already 1 (for the case where dimensions should not be kept)? --> I have not checked whether this is already the case.

## Benchmarks
![image](https://user-images.githubusercontent.com/31798555/196279577-d624549b-ce8c-47d8-9058-df4702194020.png)
[sum_benchmark.txt](https://github.com/pytorch/pytorch/files/9804411/sum_benchmark.txt) --> changed this to a TXT so GH would let me upload it, but to run, change the extension back to .py.


### Versions

master
```
Collecting environment information...
PyTorch version: 1.14.0a0+gitb40f443
Is debug build: True
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: macOS 12.5 (arm64)
GCC version: Could not collect
Clang version: 14.0.0 (clang-1400.0.29.102)
CMake version: version 3.22.1
Libc version: N/A

Python version: 3.10.6 (main, Oct  7 2022, 15:17:36) [Clang 12.0.0 ] (64-bit runtime)
Python platform: macOS-12.5-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: False

Versions of relevant libraries:
[pip3] numpy==1.23.1
[pip3] torch==1.14.0a0+gitb40f443
[conda] numpy                     1.23.1          py310h220015d_0  
[conda] numpy-base                1.23.1          py310h742c864_0  
[conda] torch                     1.14.0a0+gitb40f443           dev_0    <develop>
```

cc @msaroufim @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen @razarmehr @abhudev
Repository: pytorch
Issue: torch.clamp does not clamp out of -0 from 0 when ran on the CPU
Labels: triaged,module: numpy,module: edge cases

### 🐛 Describe the bug

when ran on the CPU, `torch.clamp` does not clamp out of -0 from 0 (i.e. when min is 0, it does not change -0 to 0 as it should). 
- output on cpu: -0.
- output on gpu: 0.
- output with numpy: 0.

See this code snippet to produce the bug:
```
import torch
import numpy as np

torch.manual_seed(420)
torch.cuda.manual_seed_all(420)
x = torch.tensor([-0., 0., 0.])
y = torch.clamp(x, min=0, max=1)  # prints [-0., 0., 0.]
print(y)

x = x.cuda()
y = torch.clamp(x, min=0, max=1)  # prints [0., 0., 0.]
print(y)

x = np.array([-0., 0., 0.])
y = np.clip(x, 0, 1)
print(y)  # prints [0., 0., 0.]
```

### Versions

torch 1.12.1

cc @mruberry @rgommers
Repository: flutter
Issue: Create fuzzing tests for semantics
Labels: a: tests,engine,a: accessibility,P2,team-engine,triaged-engine

See for example https://github.com/flutter/flutter/issues/110671

We should provide invalid/unexpected inputs to the semantics builder and make sure it doesn't result in crashes for each a11y implementation.
Repository: flutter
Issue: Create fuzzing tests for text input
Labels: a: tests,a: text input,engine,P2,team-engine,triaged-engine

Similar to https://github.com/flutter/flutter/issues/113571

We've definitely had issues in the past around invalid/unexpected values supplied in text input bridge. We should add fuzzing tests.
Repository: godot
Issue: v4.0-beta3 editor crash with project upgrade from v3.4.4.
Labels: bug,topic:editor,confirmed,topic:2d

### Godot version

v4.0-beta3

### System information

Windows 10

### Issue description

Converted my project and receive this error in the logs which (seemingly) causes Godot to crash

```
ERROR: Cannot create tile. The tile is outside the texture or tiles are already present in the space the tile would cover.
   at: (scene/resources/tile_set.cpp:4020)
ERROR: The TileSetAtlasSource atlas has no tile at (0, 0).
   at: (scene/resources/tile_set.cpp:4429)
```

Not sure what specifically I have to do to my TileSet to avoid this

### Steps to reproduce

import project using a tileset into godot 4 beta 3, can supply my .tscn file if it helps

### Minimal reproduction project

_No response_
Repository: deno
Issue: REPL throws parse error when breaking code line at `.`
Labels: bug,repl

This code

```
const plantarray = (await Promise.all((plants.map(p => getplantcharacteristics(p)))))
        .map(a => a.filter(a => {return desiredattributes.includes(a.PlantCharacteristicName)}))
        .map(f => f.filter(a => a.CultivarName === null));
```
and this code
```
const plantarray = (await Promise.all((plants.map(p => getplantcharacteristics(p))))).
map(a => a.filter(a => {return desiredattributes.includes(a.PlantCharacteristicName)})).
map(f => f.filter(a => a.CultivarName === null));

```
causes parse error: Unexpected token `.`.... when running in deno repl.
Works when file is executed with deno run 

Works in REPL as single line: (no breaks)

`const plantarray = (await Promise.all((plants.map(p => getplantcharacteristics(p))))).map(a => a.filter(a => {return desiredattributes.includes(a.PlantCharacteristicName)})).map(f => f.filter(a => a.CultivarName === null));
`

deno --version
deno 1.26.1 (release, x86_64-pc-windows-msvc)
v8 10.7.193.3
typescript 4.8.3
Repository: flutter
Issue: Flutter Demo App running in Chrome goes blank when dragging the window from one external monitor to another.
Labels: engine,platform-web,e: web_canvaskit,P2,team-web,triaged-web

I encountered this issue while running the Flutter demo counter app in Chrome. This issue does not occur on the iOS simulator, android emulator, or desktop.

Chrome version: Version 106.0.5249.103 (Official Build) (arm64)
MacBook Pro (16-inch, 2021), 16 GB, macOS 12.6

**External Monitor 1 (HDMI via USB-C):** Samsung U28R550UQN - 28.5" (3840 x 2160)
**External Monitor 2 (HDMI):** Asus ZenScreen Touch MB16AMT (Portable monitor) - 15.4" (1920 x1080)

_**Workaround:** Refresh the browser or drag the window back to monitor 1._

Note: Launching the app on monitor 2 will display the app as expected, but dragging it to monitor 1 and then back to monitor 2 exhibits the same unexpected behavior.

https://user-images.githubusercontent.com/233583/196306592-63f1701e-bcb2-420e-b26f-84c91816d674.mp4
Repository: create-react-app
Issue: TypeError: match.loader.options.plugins is not a function
Labels: needs triage,issue: bug report

I am facing "TypeError: match.loader.options.plugins is not a function" this error in react 18.2.0 . I am also getting error after reinstallation of node modules
Repository: tauri
Issue: [feat] Automatically select and obtain desktop or tab page data flow
Labels: type: feature request

### Describe the problem

Electron can get stream use [navigator.mediaDevices.getUserMedia](https://www.electronjs.org/zh/docs/latest/api/desktop-capturer),Do not choose to share data stream when configuring appropriate parameters，Get the screen data stream directly as follows。
`navigator.mediaDevices.getUserMedia({
        audio: false,
        video: {
          cursor: "never",
          mandatory: {
            chromeMediaSource: 'desktop',
            chromeMediaSourceId: "screen:0:0",
          }
        }
      })
        .then(stream => {
          call.answer(stream);
          setData(data => {
            return {
              ...data,
              mediaChan: call
            }
          });
        })
        .catch(e => {
          console.log(e);
        })`，
But you must click "Select the content to share" in tauri. I hope you can skip this step

### Describe the solution you'd like

Encapsulate the appropriate API

### Alternatives considered

_No response_

### Additional context

_No response_
Repository: stable-diffusion-webui
Issue: ENHANCEMENT / FEATURE REQUEST: Color picker/restrictor
Labels: enhancement

Is there a current way to consistently restrict the color set in a way separate from prompt-language?

By that I mean:
Saying "monochrome" or "monochromatic" gets a good result but saying "monochromatic canary yellow" does not because it will have a hard time associating "canary yellow" together.

Suggestion:
In a separate action allow for the color parameters to be passed as colors, specifically, from a pick list

Feature 1:
Pick the "Fuzziness"
If you picked RGB 255,0,0 or hex FF0000 red, fuzziness would randomize usage of that value by the fuzziness by some factor

Pick featured/suppressed color
If you picked RGB 255,0,0/FF0000 you could make it more prominent (featured) or negate it (mute/remove)

Pick 1-n# of colors
Pick a set of colors, directly, that the palette is restricted to
Repository: pytorch
Issue: New APIs for cuda graph inspection and manipulation
Labels: triaged,module: cuda graphs

A stalled #85519 adds capabilities to dump cuda graphs for inspection. We would like to extend it to
1) provide a way to get all nodes from the graph
2) modify nodes to patch in addresses for the inputs to avoid copying inputs. Note, this is more complicated than just comparing old and new pointers and swapping one for another because kernels could operate on input slices, so one would need to inspect if kernel argument falls within the range of the original input tensor and, if so, replace it with the corresponding new address + offset. 

cc @mcarilli @ezyang @eqy
Repository: rust
Issue: rustdoc adds 'static lifetime for consts and statics since 1.64.0
Labels: T-rustdoc,regression-from-stable-to-stable,C-bug

Since [1.17.0](https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1170-2017-04-27), one doesn't have to put `'static` in consts any more, the lifetime is implied to be static.

Rustdoc has respected this in printing, by omitting the `'static` lifetime when printing a `const` or `static`. This has regressed recently in the 1.64.0 release. Compare for example this rustc rustdoc for [1.63.0](
https://doc.rust-lang.org/1.63.0/nightly-rustc/rustc_lint/types/static.IMPROPER_CTYPES_DEFINITIONS.html) with [1.64.0](
https://doc.rust-lang.org/1.64.0/nightly-rustc/rustc_lint/types/static.IMPROPER_CTYPES_DEFINITIONS.html).

You can reproduce this locally:

```rust
pub const FOO: &str = "hi";
```

@rustbot modify labels: +regression-from-stable-to-stable +T-rustdoc
Repository: stable-diffusion-webui
Issue: Support for TPU
Labels: enhancement

Can it support Google TPU(like Google Colab)
Repository: rust
Issue: Should unwind add no_default_flags when target is android and use ndk?
Labels: A-linkage,O-android,T-libs

I discuss it in https://github.com/rust-lang/cc-rs/issues/731#issuecomment-1281809211

I found that in cmake-rs set no_default_flags when use ndk, and I found that in ndk25, flag_if_supported always return false because of it check -luwind use the default flag `--target=aarch64-linux-android` cause compile failed.
Repository: pytorch
Issue: torch.linalg.cond gives inconsistent results on CPU/CUDA
Labels: triaged,module: NaNs and Infs,module: linear algebra

### 🐛 Describe the bug

`torch.linalg.cond` computes the conditional number of a matrix. But if the matrix is not invertiable it should give back infinity but we can get different results on cpu and gpu:
- CPU: 1.4825e+08
- GPU: 9.8031e+14
- numpy: inf

Code to reproduce:
```
import torch
import numpy as np

torch.manual_seed(420)
torch.cuda.manual_seed_all(420)
input = torch.ones(2, 2)
output = torch.linalg.cond(input)

cuda_input = torch.ones(2, 2).cuda()
cuda_output = torch.linalg.cond(cuda_input)

print(output) # gives large number (1.4825e+08)
print(cuda_output) # gives even larger number (9.8031e+14)
print(np.linalg.cond(input)) # gives inf
```


### Versions

torch 1.12.1+cu113

cc @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @Lezcano
Repository: pytorch
Issue: Unstable results in sin/arcsin/arccos calls
Labels: module: numerical-stability,triaged,module: edge cases

### 🐛 Describe the bug

I get unstable results when sin, arcsin, arccos are called sequentially. sin followed by arcsin should give by the same value, however the calculation is not exactly the same and we get unstable results after arccos: `0.0003` on CPU and `nan` on CUDA.

Here is the code to reproduce the issue:
```
import torch

x = torch.ones(2)
y = torch.sin(x)
y = torch.arcsin(y)  # inverse operations, gives [1.0000, 1.0000]
y = torch.arccos(y)
print(y) # gives [0.0003, 0.0003]

x1 = x.clone().cuda()
y1 = torch.sin(x1)
y1 = torch.arcsin(y1) # gives [1.0000, 1.0000]
y1 = torch.arccos(y1)
print(y1) # gives [nan, nan]
```

### Versions

1.12.1+cu113
Repository: vscode
Issue: [Bug] Failed to open a jpg file in mergeEditor
Labels: feature-request,merge-editor

<!-- ⚠️⚠️ 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: 
<img width="515" alt="image" src="https://user-images.githubusercontent.com/13031838/196362532-8cc37a0f-8b1d-4dcb-8859-f7e8b502c44d.png">

- OS Version: Codespace

Steps to Reproduce:
- clone https://github.com/zWingz/dev.git
- git checkout image-a
- git checkout image-b
- git merge image-a

<img width="521" alt="image" src="https://user-images.githubusercontent.com/13031838/196363030-733369ce-b316-49e0-a72b-9d9601f31c78.png">

<img width="893" alt="image" src="https://user-images.githubusercontent.com/13031838/196363065-59cd86da-c50b-494a-9038-001d323bd3f4.png">
Repository: TypeScript
Issue: Consult `package.json` contents when creating `tsconfig.json` under `tsc --init` to determine better defaults
Labels: Suggestion,Awaiting More Feedback

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms
tsc init module commonjs
<!--
  What search terms did you use when trying to find an existing bug report?
  List them here so people in the future can find this one more easily.
-->

### 🕗 Version & Regression Information
4.9.0-dev.20221017

### ⏯ Playground Link
n/a
### 💻 Code
#### `package.json`
```json
{
  "name": "asdf",
  "version": "1.0.0",
  "description": "",
  "author": "",
  "license": "ISC",
  "type": "module",
  "devDependencies": {
    "typescript": "^4.9.0-dev.20221017"
  }
}
```

### 🙁 Actual behavior
```
> npx tsc --init

Created a new tsconfig.json with:                                                                                       
                                                                                                                     TS 
  target: es2016
  module: commonjs
  strict: true
  esModuleInterop: true
  skipLibCheck: true
  forceConsistentCasingInFileNames: true


You can learn more at https://aka.ms/tsconfig
```

### 🙂 Expected behavior
it should check the `package.json` to determine that `module` should be `nodenext` or something
Repository: PowerToys
Issue: Border around pinned window is not visible on some windows when using 1px border
Labels: Issue-Bug,Product-Always On Top,Priority-3

### Microsoft PowerToys version

0.63.0

### Installation method

PowerToys auto-update

### Running as admin

- [X] Yes

### Area(s) with issue?

Always on Top

### Steps to reproduce

When border is set to 1 pixel width, I cannot see it on any "Skype for Business" windows, but I can see it on other applications, e.g. Chrome or regular "Skype". When I move the "Skype for Business" window, I can see the border following the window, but then it hides behind it when the window position settles.
I must set it to at least 2px in order to see the border (1px of it) on "Skype for Business".
This issue started recently. In some of the previous versions, I could see 1px border without issues on "Skype for Business".

1px:
![image](https://user-images.githubusercontent.com/3052522/196370221-b24e1699-bcce-489c-8815-2f551dde4544.png)

2px:
![image](https://user-images.githubusercontent.com/3052522/196370532-d319883f-86b9-4b56-b5a3-26de47a8ed89.png)



### ✔️ Expected Behavior

I expect to be able to see 1px border on "Skype for Business" windows, as it was in the previous versions.

### ❌ Actual Behavior

I cannot see 1px border on "Skype for Business" windows.

### Other Software

_No response_
Repository: pytorch
Issue: The autogenerated out variants via `autogen:` do not check that the dtype of the `out` kwarg via `canCast`.
Labels: triaged,module: codegen

### 🐛 Describe the bug

As per title. cc @ezyang @bhosmer @bdhirsh 

### Versions

master
Repository: ant-design
Issue: Notification 的标题属性 message 可否增加 title 别名
Labels: Inactive

### What problem does this feature solve?

解决认知矛盾

### What does the proposed API look like?

message -> title

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: vscode
Issue: Renames returning empty placeholders are not handled correctly
Labels: under-discussion,rename

The below code creates a rename provider that returns an _empty string_ as its placeholder. It's not clear if this is valid or not (I think it should be, because that could support "renaming" things that have no aliases to have one, for example `import`s), but even if it's not this behaviour seems incorrect.

Right now, the edit box is populated with the text from the _range_ that's provided (rather than being empty, as the placeholder defines):

![Screenshot 2022-10-18 at 12 15 26](https://user-images.githubusercontent.com/1078012/196414937-8a2f1e2f-d553-4424-9988-77f8d3ef2e7f.png)

However, changing the field and pressing `<enter>` _never calls_ the `provideRenameEdits` function. It just silently _does nothing_.

Either, it should call `provideRenameEdits`, or it should never have opened the edit field in the first place. It doesn't make sense to prompt the user for a new name and then throw it away and never let an extension handle it.

My preferred behaviour would be:

- open the edit box with an empty placeholder (as returned by the extension)
- pass the new name to the extension in `provideRenameEdits`

This supports languages that want to allow renaming items that currently have no name as a way to add one. For example:

```
import 'foo';
```

Could be renamed to give it a name:

```
import 'foo' as foo;
```

Which would also update all uses of symbols from that library. While this could also be achieved with a code action, LSP does not support interacting with the user (asking for a new name) so that would rely on custom extension code. It would be much better if rename supported (it feels like an unnecessary restriction to not).

Alternatives fixes could be:

1. don't open the edit label at all if the placeholder is an empty string (assuming VS Code deems this invalid)
2. open the edit label populated with the text from the `Range`, but then _do_ call `provideRenameEdits`


```
export async function activate(context: vscode.ExtensionContext) {

	context.subscriptions.push(vscode.languages.registerRenameProvider({ scheme: "untitled" }, {
		async provideRenameEdits(document, position, newName, token): Promise<vscode.WorkspaceEdit | undefined> {
			vscode.window.showInformationMessage("this is never called");
			return undefined;
		},
		prepareRename(document, position, token) {
			return {
				range: document.getWordRangeAtPosition(position)!,
				placeholder: "a",
			};
		},
	}));

	const doc = await vscode.workspace.openTextDocument(vscode.Uri.parse("untitled:foo"));
	const editor = await vscode.window.showTextDocument(doc);
	editor.edit((edit) => {
		edit.insert(new vscode.Position(0, 0), "renameme");
	});
}
```

When you invoke the rename, VS Code pops open the edit box (and does not show a "you can't rename this" message):
Repository: rust
Issue: Redundant closure works, but fn item doesn't
Labels: A-type-system,A-associated-items,C-discussion,T-types

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code [[Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=de57999cc0ff59a10c1932482811bfc0)]:

```rust
fn fn_item<'a>(values: impl Iterator<Item = Option<&'a u32>> + 'a) -> impl Iterator<Item = Option<u32>> + 'a {
    values.map(Option::copied)
}

fn closure<'a>(values: impl Iterator<Item = Option<&'a u32>> + 'a) -> impl Iterator<Item = Option<u32>> + 'a {
    values.map(|o| o.copied())
}
```

I expected to see this happen:

Both should compile, because the compiler should have the same information in both cases.

Instead, this happened: 

```
error[E0034]: multiple applicable items in scope
 --> src/lib.rs:2:24
  |
2 |     values.map(Option::copied)
  |                        ^^^^^^ multiple `copied` found
  |
  = note: candidate #1 is defined in an impl for the type `Option<&T>`
  = note: candidate #2 is defined in an impl for the type `Option<&mut T>`
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

(nightly, and stable)

`rustc --version --verbose`:
```
rustc 1.65.0-nightly (fa6ee9375 2022-09-12)
binary: rustc
commit-hash: fa6ee9375242ae784dab1837dfc0b92f43e787ce
commit-date: 2022-09-12
host: x86_64-unknown-linux-gnu
release: 1.65.0-nightly
LLVM version: 15.0.0
```