sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Pytorch AMP performance issue.
Labels: triaged,module: memory format,module: amp (automated mixed precision)

### 🐛 Describe the bug

I found that different models have large speed differences between AMP and FP32 training configurations with NHWC and NCHW data types. pytorch seems to only optimize matmul and conv2d, while batchnorm support for nhwc is poor. The batchnorm layer of nhwc is very slow, and the speed recovers after freezing the bn layers. In addition, the transpose of nchw also consumes 10% of the latency. I collected performance data.



Demo codes:
`
```
import torch
import torch.nn as nn
import time
import torch.backends.cudnn as cudnn
from torchvision.models import resnet101
cudnn.benchmark=True/False

class SimpleLayer(nn.Module):
    def __init__(self):
        super(SimpleLayer, self).__init__()
        self.conv1=nn.Sequential(nn.Conv2d(192,192,3,1,1),nn.ReLU(),nn.Conv2d(192,192,3,1,1),nn.ReLU(),nn.Conv2d(192,192,3,1,1),nn.ReLU(),nn.Conv2d(192,192,3,1,1),nn.ReLU())

    def forward(self,x):
        return self.conv1(x)

Model=SimpleLayer/resnet101().to("cuda:0", memory_format=torch.channels_last)
Model.eval()
Data=torch.randn(8,3,224,224).to("cuda:0", memory_format=torch.channels_last)

while True:
    stimes=time.time()
    with torch.amp.autocast(device_type='cuda'):
        for _ in range(10):
            _=Model(Data)
    torch.cuda.synchronize()
    times=time.time()-stimes
    print(10/times)
```
`

Speed SimpleLayer
![image](https://user-images.githubusercontent.com/4530735/213177319-2ea9a3e4-f807-4c94-aea7-9a3a45bc579c.png)
VGG19
![image](https://user-images.githubusercontent.com/4530735/213177361-e2ada260-7688-4e5d-badb-74f6513967ac.png)
Resnet101
![image](https://user-images.githubusercontent.com/4530735/213177393-8b918186-e250-4afe-b13b-4b8805af32fb.png)
EfficientNet-B6
![image](https://user-images.githubusercontent.com/4530735/213177434-cc6ac25b-b7ca-40cb-8a52-cdc81f31bca3.png)
SwinBase
![image](https://user-images.githubusercontent.com/4530735/213177470-eeab7372-a714-4677-97fd-b35421b79bc7.png)

resnet101-cudnn-amp-nchw
![image](https://user-images.githubusercontent.com/4530735/213177559-b83a0a7f-659b-4e76-9b1a-ac568e7799fc.png)
resnet101-cudnn-amp-nhwc
![image](https://user-images.githubusercontent.com/4530735/213177568-264d9cf6-d275-4e80-8d6d-8891c03015f6.png)



### Versions

Pytorch 1.11 Cudnn 11.6

cc @jamesr66a @mcarilli @ptrblck @leslie-fang-intel @jgong5
Repository: electron
Issue: [Feature Request]: Enable whole-program optimization in node headers config
Labels: enhancement :sparkles:

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Problem Description

Changes introduced by this [PR](https://github.com/nodejs/node-gyp/pull/2497) made native modules to be built using config.gypi  provided by electron node headers. This config generated without whole-program optimization makes native module binaries not optimized and big in size.

### Proposed Solution

Enable whole program optimization in generation of config.gypi by default.

### Alternatives Considered

Alternative is to keep default behaviour and make electron users to be responsible in enabling whole-program optimization. However, it is highly likely electron user will prefer optimized binaries by default over non-optimized.

### Additional Information

_No response_
Repository: rust
Issue: Diagnostics around implementing mutable iterators should be improved
Labels: C-enhancement,A-diagnostics,T-compiler,D-newcomer-roadblock

Recently I have seen a lot of (new) users struggle with code like this:

```rust
pub struct IterMut<'a, T> {
    inner: &'a mut Vec<T>,
    index: usize,
}

impl<'a, T> Iterator for IterMut<'a, T> {
    type Item = &'a mut T;

    fn next(&mut self) -> Option<Self::Item> {
        let item = self.inner.get_mut(self.index);
        self.index += 1;
        item
    }
}
```

This doesn't compile, of course:

```rust
error: lifetime may not live long enough
  --> src/lib.rs:12:9
   |
6  | impl<'a, T> Iterator for IterMut<'a, T> {
   |      -- lifetime `'a` defined here
...
9  |     fn next(&mut self) -> Option<Self::Item> {
   |             - let's call the lifetime of this reference `'1`
...
12 |         item
   |         ^^^^ associated function was supposed to return data with lifetime `'a` 
but it is returning data with lifetime `'1`
```

This is often seen as a shortcoming of the language, as a pattern that is correct but the compiler doesn't understand - which in this case, is not untrue. But in many impls do involve overlapping mutable references, which would be unsound. 

As for improvements, I have some ideas:
- Reassure the user that they really do need that lifetime, and that they didn't put a wrong lifetime somewhere. Say something like  "The contract of `Iterator::next` demands an item with at least the lifetime 'a"
- Explain [splitting borrows](https://doc.rust-lang.org/nomicon/borrow-splitting.html#splitting-borrows). In my experience this clicks well, and users are often surprised they don't need to reach for unsafe code. We should explain this in-line or link to the nomicon.
- Explain why the iterator trait has the lifetime requirements that it has ,e.g. "`the_iter.collect();` is a thing"
Repository: PowerToys
Issue: One of the windows on the desktop will become always on top without any reason.
Labels: Issue-Bug,Needs-Triage,Needs-Team-Response

### Microsoft PowerToys version

0.65.0

### Installation method

Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

Always on Top

### Steps to reproduce

Sometimes , one of my windows will become always on top automatically . If I change my focus to it and press Win + Ctrl + T 
 ( the default hot key of the function AlwaysOnTop ) , It will become normally .

### ✔️ Expected Behavior

I expect the function will be trigger only when I want it trigger.

### ❌ Actual Behavior

Sometimes , one of my windows will become always on top automatically . If I change my focus to it and press Win + Ctrl + T 
 ( the default hot key of the function AlwaysOnTop ) , It will become normally .

### Other Software

_No response_
Repository: rust
Issue: Unable to instrument rust debug software
Labels: O-macos,C-bug

<!--
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.
-->

When trying to instrument rust software built in debug mode under macOS, the instrument tool will throw `Required kernel recording resources are in use by another document`. Essentially you can't do any advanced instrumentation with debug executables built by rustc because rustc is not adding the proper entitlements to the built binary. It actually needs to add the get-task-allow entitlement when building in debug.

### 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.
-->

`rustc --version --verbose`:
```
rustc 1.66.1 (90743e729 2023-01-10)
binary: rustc
commit-hash: 90743e7298aca107ddaa0c202a4d3604e29bfeb6
commit-date: 2023-01-10
host: aarch64-apple-darwin
release: 1.66.1
LLVM version: 15.0.2
```

### Workaround

Currently it is possible to workaround the issue but it's a pain. it's not possible to integrate this in Cargo as it requires accessing zsh.

Paste the following code in a zsh terminal opened at the target directory:

```
codesign -s - -v -f --entitlements =(echo -n '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd"\>
<plist version="1.0">
    <dict>
        <key>com.apple.security.get-task-allow</key>
        <true/>
    </dict>
</plist>') testbin
```

Unfortunately you must run the same pain every time you build the software.
Repository: kubernetes
Issue: WaitFor<something> + ExpectError anti-pattern
Labels: sig/storage,kind/feature,help wanted,sig/testing,triage/accepted

### What would you like to be added?

While working on https://github.com/kubernetes/kubernetes/pull/114825 I found tests that used `WaitForPodRunning` followed by `ExpectError` because they create a pod that is not supposed to get started.

A better approach is to `gomega.Consistently` for `pod is pending`:
```diff
diff --git a/test/e2e/common/node/expansion.go b/test/e2e/common/node/expansion.go
index 1b0b13bf287..07e55dfad63 100644
--- a/test/e2e/common/node/expansion.go
+++ b/test/e2e/common/node/expansion.go
@@ -29,6 +29,7 @@ import (
        admissionapi "k8s.io/pod-security-admission/api"
 
        "github.com/onsi/ginkgo/v2"
+       "github.com/onsi/gomega"
 )
 
 // These tests exercise the Kubernetes expansion syntax $(VAR).
@@ -267,8 +268,8 @@ var _ = SIGDescribe("Variable Expansion", func() {
                podClient := e2epod.NewPodClient(f)
                pod = podClient.Create(ctx, pod)
 
-               err := e2epod.WaitTimeoutForPodRunningInNamespace(ctx, f.ClientSet, pod.Name, pod.Namespace, framework.PodStartShortTimeout)
-               framework.ExpectError(err, "while waiting for pod to be running")
+               getPod := e2epod.Get(f.ClientSet, pod)
+               gomega.Consistently(ctx, getPod).WithTimeout(framework.PodStartShortTimeout).Should(e2epod.BeInPhase(v1.PodPending))
 
                ginkgo.By("updating the pod")
                podClient.Update(ctx, pod.ObjectMeta.Name, func(pod *v1.Pod) {
```

I know of at least two more tests which I haven't changed yet:
- PersistentVolumes-local Local volume that cannot be mounted [Slow] should fail due to non-existent path
- PersistentVolumes-local Local volume that cannot be mounted [Slow] should fail due to wrong node

Besides fixing those two tests, we also need to think about how we can find other instances and how to guide developers towards writing better tests.

Perhaps `framework.ExpectError` should be deprecated? If an error is expected, shouldn't the test ensure that *the* expected error occurred and not *some* error?

### Why is this needed?

- test semantic more obvious
- gomega.Consistently integrates better with test execution
Repository: stable-diffusion-webui
Issue: [Bug]: Can't pass to, or open image to be source in img2img tab
Labels: bug-report

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

When pressing "send to img2img", or trying to load image from disk as source image for img2img I get this error:

```
Traceback (most recent call last):
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 337, in run_predict
    output = await app.get_blocks().process_api(
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1015, in process_api
    result = await self.call_function(
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 833, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "<private>/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "<private>/stable-diffusion-webui/modules/generation_parameters_copypaste.py", line 116, in send_image_and_dimensions
    img = image_from_url_text(x)
  File "<private>/stable-diffusion-webui/modules/generation_parameters_copypaste.py", line 62, in image_from_url_text
    filedata = base64.decodebytes(filedata.encode('utf-8'))
  File "/usr/lib/python3.10/base64.py", line 562, in decodebytes
    return binascii.a2b_base64(s)
binascii.Error: Incorrect padding
```
"private" - my edit of actual path (contain local username).

### Steps to reproduce the problem

1. Go to img2img tab
2. Try to load any image.


### What should have happened?

Normal image loading into img2img source.

### Commit where the problem happens

a4291fe99b94899b92bcc4e7637dd106168da866

### What platforms do you use to access UI ?

Linux

### What browsers do you use to access the UI ?

Google Chrome

### Command Line Arguments

```Shell
--lowvram --precision full --no-half --no-half-vae --opt-split-attention --xformers --enable-console-prompts --api --deepdanbooru --use-cpu interrogate
```


### Additional information, context and logs

_No response_
Repository: material-ui
Issue: Slider mark click not accurate 
Labels: component: slider

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Steps to reproduce 🕹

Link to live example:

Steps:

1. Click on text of mark
2. The thumb move top of click position not mark exact value


### Current behavior 😯

_No response_

### Expected behavior 🤔

_No response_

### Context 🔦

_No response_

### Your environment 🌎

_No response_
Repository: react-native
Issue: [0.71] Debug-iphoneos/YogaKit/YogaKit.modulemap not found
Labels: p: Expo,Partner,Needs: Triage :mag:

### Description

When reading React native guide to set up environment and try to run on my physical device connected by USB i get this error:

```
/Users/myname/Library/Developer/Xcode/DerivedData/workout-dpldhexrxtuscggmgtdlyzjyzzzs/Build/Intermediates.noindex/workout.build/Debug-iphoneos/workout.build/DerivedSources/workout_vers.c module map file '/Users/myname/Library/Developer/Xcode/DerivedData/workout-dpldhexrxtuscggmgtdlyzjyzzzs/Build/Products/Debug-iphoneos/YogaKit/YogaKit.modulemap' not found
```



### Version

0.71.0

### Output of `npx react-native info`

```markdown
System:
    OS: macOS 13.1
    CPU: (8) arm64 Apple M1 Pro
    Memory: 2.44 GB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.16.0 - ~/.asdf/installs/nodejs/16.16.0/bin/node
    Yarn: 1.19.1 - ~/.asdf/shims/yarn
    npm: 8.11.0 - ~/.asdf/plugins/nodejs/shims/npm
    Watchman: 2022.11.14.00 - /opt/homebrew/bin/watchman
  Managers:
    CocoaPods: 1.11.3 - /Users/myname/.asdf/shims/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.1, iOS 16.1, macOS 13.0, tvOS 16.1, watchOS 9.1
    Android SDK: Not Found
  IDEs:
    Android Studio: 2021.3 AI-213.7172.25.2113.9014738
    Xcode: 14.1/14B47b - /usr/bin/xcodebuild
  Languages:
    Java: Not Found
  npmPackages:
    @react-native-community/cli: Not Found
    react: 18.2.0 => 18.2.0
    react-native: 0.71.0 => 0.71.0
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found
```

### Steps to reproduce

After checking that I have ruby and node installed
```markdown
node -v
ruby -v
```

I run
```markdown
npx react-native init workout
```

After that, I open `.xcworkspace` and try to build and run.

### Snack, code example, screenshot, or link to a repository

It is run on my local machine.

![image](https://user-images.githubusercontent.com/43933775/213197821-a79b2001-2afd-482c-9ac7-c7d0076c3a3a.png)
Repository: flutter
Issue: [web] icons.dart.lib.js is taking too much time to load
Labels: tool,c: performance,P3,team-tool,triaged-tool

## Details

Im having an issue with loading icons.dart.lib.js. Its taking almost 3 seconds to load.

![image](https://user-images.githubusercontent.com/21202757/213199314-9963f98b-800e-4aa6-97d4-33b67885fedd.png)

Im not sure why is it loading in the first place since i dont use Material Icons at all. Can someone please explain why is it loading it in the first place and maybe has a solution for this issue.

## Flutter doctor
[✓] Flutter (Channel stable, 3.0.3, on Microsoft Windows [Version 10.0.19044.2486], locale en-US)
    • Flutter version 3.0.3 at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 676cefaaff (7 months ago), 2022-06-22 11:34:49 -0700
    • Engine revision ffe7b86a1e
    • Dart version 2.17.5
    • DevTools version 2.12.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at C:\Users\pc\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.17)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.32630.194
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 2021.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)

[✓] VS Code (version 1.74.3)
    • VS Code at C:\Users\pc\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.56.0

[✓] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19044.2486]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 109.0.5414.75
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 109.0.1518.55

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
Repository: rust
Issue: Debug escaping is confusingly inconsistent
Labels: A-Unicode,T-libs

The behaviors of `char::escape_debug`, `str::escape_debug`, and `<str as Debug>::fmt` are confusingly inconsistent with each other, and the inconsistencies are poorly documented.

```rust
fn main() {
    let wat = "a\u{301}'";

    println!("{:?}", wat);
    println!("\"{}\"", wat.escape_debug());
    println!(
        "\"{}\"",
        wat.chars()
            .flat_map(|ch| ch.escape_debug())
            .collect::<String>()
    );
}
```

```
"a\u{301}'"
"á\'"
"a\u{301}\'"
```

It seems defensible that `char::escape_debug` escapes single-quotes while `<str as Debug>::fmt` doesn't, since `char_escape_debug` doesn't know whether it's being used to escape a character literal or a string literal. But if a difference is going to exist, it's less defensible that `str::escape_debug` should follow the behavior of `char::escape_debug` rather than the behavior of `<str as Debug>::fmt`.

`str::escape_debug` and `<str as Debug>::fmt`'s differing behavior on grapheme extenders makes no sense at all. Furthermore, if the escaping of grapheme extenders is going to be position-dependent (a bad idea IMO), then the rule should be that they are unescaped only if they are preceded by an unescaped character. The current rule gives absurd results in cases like

```rust
fn main() {
    println!("{}", "\u{301}\u{301}".escape_debug());
}
```

```
\u{301}́
```
Repository: PowerToys
Issue: Keyboard Manager - Rebind Mouse Buttons
Labels: Needs-Triage

### Description of the new feature / enhancement

Keyboard manager could be used to rebind mouse buttons -- especially side mouse buttons, to specific functions just like the current functionality for keyboard buttons.

### Scenario when this would be used?

This would allow for unused or underused mouse buttons, such as mouse4 and mouse5 on the side of mice, to be able to be reprogrammed to more useful functions like controlling media playback, muting a microphone, or opening programs.

### Supporting information

This exact same functionality is built into many different mouse brand's control software and even some third party software, ex. reWASD. The problem is that those other software solutions are often bloated and consume more system resources than keyboard manager.
Repository: go
Issue: x/build: no space left on device on builders
Labels: NeedsInvestigation

```
#!watchflakes
post <- log ~ `no space left on device`
```

This is an issue to capture flaky failures due to builder running out of disk space.
Currently this happens on the aix-ppc64 builder (#57900 ). We can close this once it is fixed, and reopen if this occurs again on some (other) builder.
Repository: stable-diffusion-webui
Issue: [Bug]: Consuming a byte in the end state
Labels: bug-report

### Is there an existing issue for this?

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

### What happened?

![image](https://user-images.githubusercontent.com/40886260/213213430-c3070144-0d64-401b-819a-cf025c8932bc.png)

![image](https://user-images.githubusercontent.com/40886260/213213501-7663d470-1e39-4145-83c6-77471e5c60ab.png)


No clue why this automatically stopped working. 

Command used: 

python launch.py --share --hide-ui-dir-config --opt-sub-quad-attention --gradio-auth "user!@123:user!@123" --theme "dark"

### Steps to reproduce the problem

Nothing just run it as usual with the following parameters

--share --hide-ui-dir-config --opt-sub-quad-attention --gradio-auth "user!@123:user!@123" --theme "dark"

### What should have happened?

It should have run as normal as per the requirements and expected results

### Commit where the problem happens

d97f467c0d27695d23edad5e4f8898a57e0ccb00

### What platforms do you use to access UI ?

Linux

### What browsers do you use to access the UI ?

Mozilla Firefox, Google Chrome, Brave, Microsoft Edge

### Command Line Arguments

```Shell
python launch.py --share --hide-ui-dir-config --opt-sub-quad-attention --gradio-auth "user!@123:user!@123" --theme "dark"
```


### Additional information, context and logs

_No response_
Repository: PowerToys
Issue: Changing Display scaling on one monitor affects **some** window sizes on another monitor
Labels: Issue-Bug,Product-FancyZones,Needs-Triage

### Microsoft PowerToys version

0.64.1 & 0.66.0

### Installation method

GitHub, PowerToys auto-update

### Running as admin

None

### Area(s) with issue?

FancyZones

### Steps to reproduce

1. Have multiple monitors connected set each display to 100% scaling
2. Snap MS Paint (or Notepad++ or the Excel VBA Editor [these are the 3 I've noticed so far]) to a FancyZone
3. Change the windows display scaling on another monitor 
4. MS Paint is now the incorrect size

[Screenshots](https://drive.google.com/drive/folders/1tFWuILfGe4C9PyMM1FaTTP2sjKrvpZGR?usp=sharing)

### ✔️ Expected Behavior

The windows should stay the same size 

### ❌ Actual Behavior

Some windows change size

### Other Software

_No response_