sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Backward pass over torch.nn.functional.pad is extremely slow with half tensors
Labels: module: performance,module: cuda,triaged,module: half

## 🐛 Bug

The backward pass over `torch.nn.functional.pad` is more than 300x slower with half tensors compared to fp32 tensor for the example below.

## To Reproduce

```
import torch
import time

def exec(x):
  y=torch.nn.functional.pad(x,pad=(47,48,47,48),mode="replicate")
  torch.cuda.synchronize()
  tic=time.time()
  y.sum().backward()
  torch.cuda.synchronize()
  return time.time()-tic

x=torch.rand(4,2048,1,1, requires_grad=True).cuda()
print("fp32: {}".format(exec(x)))
print("fp16: {}".format(exec(x.half())))

```

My output:
```
fp32: 0.14527177810668945
fp16: 50.3135507106781
```

## Expected behavior

At least as fast as fp32.

## Environment
PyTorch version: 0.4.1
Is debug build: No
CUDA used to build PyTorch: 9.2.148

OS: Ubuntu 18.04.1 LTS
GCC version: (Ubuntu 7.3.0-16ubuntu3) 7.3.0
CMake version: Could not collect

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 9.2.148
GPU models and configuration: 
GPU 0: Tesla V100-SXM2-32GB
GPU 1: Tesla V100-SXM2-32GB
GPU 2: Tesla V100-SXM2-32GB
GPU 3: Tesla V100-SXM2-32GB
GPU 4: Tesla V100-SXM2-32GB
GPU 5: Tesla V100-SXM2-32GB
GPU 6: Tesla V100-SXM2-32GB
GPU 7: Tesla V100-SXM2-32GB

Nvidia driver version: 396.37
cuDNN version: Probably one of the following:
/usr/local/cuda-9.2/lib64/libcudnn.so.7.2.1
/usr/local/cuda-9.2/lib64/libcudnn_static.a

Versions of relevant libraries:
[pip] Could not collect
[conda] cuda92                    1.0                           0    pytorch
[conda] pytorch                   0.4.1           py37_cuda9.2.148_cudnn7.1.4_1  [cuda92]  pytorch
[conda] torchfile                 0.1.0                     <pip>
[conda] torchnet                  0.0.4                     <pip>
[conda] torchvision               0.2.1                    py37_1    pytorch


cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @anjali411 @ngimel @VitalyFedyunin
Repository: angular
Issue: Multiple Methods with Same HostListener
Labels: type: bug/fix,freq2: medium,area: core,core: host and host bindings,P4


## I'm submitting a...
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
</code></pre>

## Current behavior
Attaching HostListeners with the same event to multiple methods within a component results in only the latest one being fired.  HostListener methods higher up in the file are never fired.

## Expected behavior
Intuitively, multiple HostListener decorators would register multiple listeners for the same event, and fire all of their associated methods.


## Minimal reproduction of the problem with instructions
Here is a stackblitz with the problem demonstrated.  Press a key anywhere, and the console will only show listener2 being fired, even there are two listener methods.

https://stackblitz.com/edit/angular-hpxlzb

## What is the motivation / use case for changing the behavior?
My application has multiple methods that need to listen to the same event for different reasons.  I can add another function that delegates for now, but it's not intuitive that this use-case doesn't work.

## Environment

<pre><code>
Angular version: 7.0.0

Browser:
- [x] Chrome (desktop) version 69.0.3497.100
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
 
For Tooling issues:
- Node version: v8.11.3
- Platform:  Mac
</code></pre>
Repository: create-react-app
Issue: Add versioning to docs
Labels: tag: documentation

Adding a placeholder for this so we don't forget about it. Original discussion here: https://github.com/facebook/create-react-app/issues/5238#issuecomment-432428041
Repository: react
Issue: Receive previous state in getDerivedStateFromError
Labels: Type: Feature Request

<!--
  Note: if the issue is about documentation or the website, please file it at:
  https://github.com/reactjs/reactjs.org/issues/new
-->

**Do you want to request a *feature* or report a *bug*?**

This is feature request.

**What is the current behavior?**

`getDerivedStateFromError` hook receives `error` and doesn't have access to `state` or component instance. This limits possible ways in which it could be used and requires to additionally use other hooks to derive the state:

```js
class App extends Component {
  state = {}

  static getDerivedStateFromError(error) {
    return { error }
  }

  static getDerivedStateFromProps(props, state) {
    // do we really need this?
    // the state is derived from error, not props
    if (state.error)
      return remapStateToPreferredStructure(state);
  }

  render() { /* ... */ }
}
```

**What is the expected behavior?**

`getDerivedStateFromError` is expected to receive previous state and have

```
getDerivedStateFromError(error, state)
```
signature to be consistent with related static hook, `getDerivedStateFromProps`. This `getDerivedStateFromError` signature is backward compatible with existing one (React 16.6.0).


**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

React 16.6.0
Repository: kubernetes
Issue: RFE: Remove Provider Specific details from e2e tests
Labels: kind/feature,sig/testing,lifecycle/frozen,sig/cloud-provider,area/e2e-test-framework,needs-triage

**Is this a FEATURE REQUEST?**:
The e2e tests have details baked in that have existed since the early days around providers.  Recent refactoring has exposed brittleness in how we invoke the tests and TBH provider specific behavioral tests that depend on non-standard APIs should be moved outside of tree.

/kind feature
/sig testing 
/cc @neolit123 @pohly @BenTheElder @kubernetes/cncf-conformance-wg @kubernetes/sig-testing @kubernetes/k8s-infra-team
Repository: react
Issue: onMouseEnter does not fire on an underlaying element if an element above is removed
Labels: Component: DOM,Type: Needs Investigation

**Do you want to request a *feature* or report a *bug*?**

Bug - I did do some searching around the issues to see if there was a similar/dupe, but I could not find one.

**What is the current behavior?**

With 2 elements overlaying on top of each other, if the upper element gets removed while the cursor is over both elements, mouse enter never fires on the element below. I compared this to native browser events and the issue does not appear to persist there (native browser events appear to fire mouse enter for the underlying div when the overlaying div gets removed).

**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.**

[CodeSandbox Example](https://codesandbox.io/s/wonqx3lo7)

I provided a top level boolean constant to switch between using react's synthetic events and the native browser events. In the console I keep track of state updates as console logs. The simple way to test - open the console, mouse over the upper div in a position that is also on top of the lower div, click to remove the upper div, the lower div SHOULD fire mouse enter. It does not with synthetic events, but it does with browser events.

**What is the expected behavior?**

Expected behavior for me would be if react would fire mouse enter on the underlaying div when the upper div is removed.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

```
"dependencies": {
    "react": "16.5.2",
    "react-dom": "16.5.2",
  },
```

I have not had a chance to test previous versions.
Repository: go
Issue: cmd/go, cmd/link: use Windows response files for gcc/g++ to avoid arg length limits
Labels: help wanted,NeedsFix,compiler/runtime

### What version of Go are you using (`go version`)?
1.11.1

### Does this issue reproduce with the latest release?
yes

### What operating system and processor architecture are you using (`go env`)?
windows 386/amd64

### What did you do?

Tried to compile a cgo program.

```go
package main

import (
	"fmt"
	"io/ioutil"
	"os"
	"os/exec"
	"path/filepath"
)

func main() {
	testCgo("c")
	testCgo("cpp")
}

func testCgo(ending string) {
	tmpdir, _ := ioutil.TempDir("", "cgo_resp_issue")
	defer os.RemoveAll(tmpdir)

	ioutil.WriteFile(filepath.Join(tmpdir, "gofile.go"), []byte(fmt.Sprint("package main\nimport \"C\"\nfunc main(){}")), 0644)
	for i := 0; i < 1000; i++ {
		ioutil.WriteFile(filepath.Join(tmpdir, fmt.Sprintf("cfile_%v."+ending, i)), []byte(fmt.Sprintf("void func_%v(){}", i)), 0644)
	}

	cmd := exec.Command("go", "build", "-v", "-x", "-ldflags=all=\"-extldflags=-v\"")
	cmd.Dir = tmpdir
	if out, err := cmd.CombinedOutput(); err != nil {
		println("failed:", ending, err.Error(), string(out))
	}
}
```
### What did you expect to see?
a successful compilation

### What did you see instead?

`gcc: error: CreateProcess: No such file or directory`
and/or
`g++: error: CreateProcess: No such file or directory`

### Possible solution?

This patch works for my needs.
It's mostly a copy of: https://go-review.googlesource.com/c/go/+/110395
But I also needed to escape the backslashes to make it work.

```
[patch omitted]
```

### More info

The issue is related to: https://github.com/golang/go/issues/18468
and https://github.com/golang/go/blob/master/src/cmd/go/internal/work/exec.go#L2851

The problem is caused by the 32K character limit on windows
https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-createprocessasuserw

>The maximum length of this string is 32K characters.

---

Also, once there is support for msvc on windows (https://github.com/golang/go/issues/20982) it might be good idea to whitelist `cl` as well.
Repository: rust
Issue: Improve diagnostic when writing signature `for<'_> Foo<'_>`
Labels: C-enhancement,A-diagnostics,A-lifetimes,P-low,T-compiler,A-suggestion-diagnostics,D-papercut

When encountering the following case

```
error[E0637]: `'_` cannot be used here
  --> $DIR/underscore-lifetime-binders.rs:24:21
   |
LL | fn meh() -> Box<for<'_> Meh<'_>>
   |                     ^^ `'_` is a reserved lifetime name

error[E0106]: missing lifetime specifier
  --> $DIR/underscore-lifetime-binders.rs:24:29
   |
LL | fn meh() -> Box<for<'_> Meh<'_>>
   |                             ^^ help: consider giving it a 'static lifetime: `'static`
   |
   = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
```

emit a more targeted diagnostic, along the lines of

```
error[E0637]: `'_` cannot be used here
  --> $DIR/underscore-lifetime-binders.rs:24:21
   |
LL | fn meh() -> Box<for<'_> Meh<'_>>
   |                     ^^      -- `'_` can also not be used here
   |                     |
   |                     `'_` is a reserved lifetime name
help: give it a name instead
   |
LL | fn meh<'a>() -> Box<for<'a> Meh<'a>>
   |       ^^^^              ^^      ^^
```

Without emitting the E0106.
Repository: svelte
Issue: clientWidth on video tag doesn't always return proper value, doesn't change `onupdate` for percentages
Labels: stale-bot,temp-stale

If I set a video to have `height: 100%` and `width: auto` so that it fills its parent div fully and auto-expands its width, the value I get back from binding `clientWidth` to it is 1.125 larger than in actuality.

You can reproduce this with the following code in the REPL. `clientWidth` should be `800` but it comes out to `900`. If you set the CSS dimensions to a fixed value, they return correctly

```html
<div style="width:800px;height:450px;background-color:#f0c;">
	<video controls src="https://archive.org/download/ElephantsDream/ed_1024_512kb.mp4" bind:clientWidth></video>
</div>

<style>
	video {
		width: auto;
		height: 100%;
	}
</style>
<script>
export default {
	onupdate() {
		const { clientWidth } = this.get();
		alert(clientWidth) // Should be 800 but comes to 900
	}
}
</script>
```

Also, viewable in [this REPL link](https://svelte.technology/repl?version=2.14.3&gist=51070954364b06e769a683c7ca4e4326), when width and height are `100%`, `onupdate` does not fire on resize.
Repository: angular
Issue: Introduce `scrollPositionRestoration` for `NavigationExtras`
Labels: feature,area: router,feature: under consideration

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Performance issue
[x] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
</code></pre>

## Current behavior
In `angular 6` You introduced great new feature `scrollPositionRestoration` in router.
When it is enabled it **always** scroll to top on navigation change.
But sometimes we don't need it (example with nested router-outlets or query change for search feature). 

How about introducing new `NavigationExtras` param: `scrollPositionRestoration`.
It will enable or disable default behaviour only for that navigation change.
Repository: puppeteer
Issue: Support extensions with createIncognitoBrowserContext
Labels: feature,upstream,chromium

### Steps to reproduce

**Tell us about your environment:**

* Puppeteer version: ^1.6.2
* Platform / OS version: OSX
* Node.js version: v8.11.3

**What steps will reproduce the problem?**

_Please include code that reproduces the issue._

1. Use `createIncognitoBrowserContext`
2. Try to enable an extension using `--load-extension` and `--disable-extensions-except`

**What is the expected result?**

I expect the extension to work in incognito mode. This extension works well with `Allow in incognito` switched on in Google Chrome, outside of Puppeteer.

**What happens instead?**

Got error `net::ERR_BLOCKED_BY_CLIENT at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/popup.html`
Repository: vscode
Issue: MSIX installer
Labels: feature-request,install-update,windows

After 2 years of conversation in issue #10759 (Release in the Windows Store) I think this is the right time to reevaluate the request.

What we originally wanted is all the goodness of UWP lifecycle management (clean install/uninstall and updates received in the background without having to run the app), but now it's possible outside of the Store with MSIX packaging without having to comply with some of the stricter rules of the Store and resource/capability management of UWP apps.

So the proposal is simple: **Please make an MSIX installer for VS Code** even if it's not distributed through the Store (for numerous technical reasons).

As a first step, Windows 10 users would benefit from it, later, as MSIX is designed to be cross-platform, it can evolve into the only installer format on all platforms (Linux, macOS, Windows 7+) and as the Store evolves, it can be a good foundation to potentially publish VS Code to the Store.
Repository: pytorch
Issue: warning: attribute namespace "clang" is unrecognized; High Sierra / Fedora compilation with clang results in spurious clang errors in nvcc
Labels: module: build,module: cuda,triaged,module: build warnings

## 🚀 Feature
Building for mac os generates a lot of new warnings related to C10_NODISCARD macro
(part of the change to make TensorOptions immutable #12630 )

e.g.
pytorch/aten/src/ATen/core/TensorOptions.h(120): warning: attribute namespace "clang" is unrecognized
pytorch/aten/src/ATen/core/TensorOptions.h(129): warning: attribute namespace "clang" is unrecognized
..
pytorch/aten/src/ATen/core/TensorOptions.h(173): warning: attribute namespace "clang" is unrecognized

is there a way to turn these off or fix some error i'm making in setup
thanks
Repository: pytorch
Issue: [caffe2]  incompatible constructor arguments
Labels: caffe2

 hi guys i try to run the example for caffe2 ;
https://github.com/caffe2/tutorials/blob/master/Loading_Pretrained_Models.ipynb
and i have this problem in shell


File "test1.py", line 128, in <module>
    p = workspace.Predictor(init_net, predict_net)
  File "/home/celestial/.virtualenvs/env4/lib/python3.6/site-packages/caffe2/python/workspace.py", line 159, in Predictor
    return C.Predictor(StringifyProto(init_net), StringifyProto(predict_net))
TypeError: __init__(): incompatible constructor arguments. The following argument types are supported:
    1. caffe2.python.caffe2_pybind11_state.Predictor(arg0: bytes, arg1: bytes)
Repository: go
Issue: all: ensure that tests do not write to the current directory
Labels: Testing,help wanted,NeedsFix

In #27957, @hyangah noticed that the tests for `compress/bzip2` fail when `GOROOT` is not writable, and those tests are run whenever we run `go test all` in module mode (which is intended to be a useful default).

As noted in #28386, tests should not assume that they can write to the current directory. We should ensure that none of the tests in the standard library make that mistake.
Repository: go
Issue: x/build: add a "small" builder with limited resources
Labels: Builders,NeedsFix,FeatureRequest,new-builder

Starting a new issue from #27739.

We tend to see issues building Go and running the tests if someone's machine has limited resources. For example, in #26867 I reported how `go test net` OOM'd with a few gigabytes of available memory.

We already have special builders like `linux-amd64-noopt`, so I propose adding a `linux-amd64-small`. Alternatively, we could add these qualities to an existing builder like `linux-amd64-noopt`, like @bradfitz suggested.

Some ideas to start with:

* limiting the total memory to 4GB
* limiting the total disk size to 10GB
* limiting the CPU power, e.g. to dual-core 1GHz

With time, if the builder is stable, we could lower those numbers and add more restrictions, such as:

* lowering the maximum number of open file descriptors
* lowering the size of /tmp
* lowering the maximum number of processes created by the user

/cc @dmitshur @bradfitz @andybons
Repository: godot
Issue: Missing license details for mono module dependencies
Labels: enhancement,topic:dotnet

Right now, the mono module has two dependencies: Mono itself, and DotNet.Glob.

The license details for these dependencies is not being included in the generated header `core/license.gen.h`. This information is displayed in the editor About dialog and returned from `Engine.get_license_info()`.

The `license.gen.h` header is generated with the information from `COPYRIGHT.txt` (also `LICENSE.txt` which is Godot's license). My idea is to make the build script also search for `modules/*/COPYRIGHT.txt` files when generating this header. It should make sure the modules being included are enabled.
Repository: go
Issue: text/template: allow callers to override IsTrue
Labels: NeedsDecision,FeatureRequest

The `IsTrue`, which is used in templates to determine if `if` and `when` etc. conditionals should be invoked makes sense in most situations. Some examples:

```go
package main

import (
	"fmt"
	"text/template"
	"time"
)

func main() {

	type s struct{}

	printIsTrue(1)         // true
	printIsTrue(0)         // false
	printIsTrue(-1)        // true
	printIsTrue(s{})       // true
	printIsTrue(&s{})      // true
	printIsTrue((*s)(nil)) // false
	printIsTrue(nil)       // false
	printIsTrue("")        // false
	printIsTrue("foo")     // true

	printIsTrue(time.Now())  // true
	printIsTrue(time.Time{}) // true

}

func printIsTrue(in interface{}) {
	b, _ := template.IsTrue(in)
	fmt.Println(b)
}
```

My main challenge with the above is that `Struct values are always true`-- even the zero `time.Time` value above.

It would be useful if the above method could check some additional `truther` interface:

```bash
type truther interface {
	IsTrue() bool
}
```

If the above is considered a breaking change, an alternative suggestion would be to make the `template.IsTrue` function settable.
Repository: flutter
Issue: [Suggestion] Installing the Android environment via CLI flutter
Labels: c: new feature,tool,a: first hour,P3,team-tool,triaged-tool

As we are getting to Release 1.0, would you like to know if there is any plan to facilitate the complete installation of the development environment with CLI `flutter`?

The Flutter environment is dependent on Android Studio, which makes startup time-consuming and a bit tricky.

I took a look at other cross-platform development frameworks, and found the way the initial install is awesome. With just 3 lines you already have the entire Android environment installed and a new application running on your smartphone or emulator.

I would like to give 3 suggestions

1. Installation of the `flutter` command line via` npm`:
I noticed that there is already a third party project for this, but it does not appear in the official Flutter documentation:
https://www.npmjs.com/package/flutter-cli

2. Install the Android SDK during `flutter create` if it does not exist:
It's very interesting how they solved this in Windows, they are using Chocolatey to install the Android SDK and JDK, in this way, everything is automated and incredibly easy to start on the platform

3. Automatic installation of extensions in IDEs available on the user's machine (I do not know if it's possible)
Repository: pytorch
Issue: arm64 port for PyTorch, libtorch
Labels: module: ci,triaged,enhancement,module: arm

## 🚀 Feature

Port the PyTorch and libtorch codes to arm64, and provide easy to use binary downloads for user of those systems.

## Motivation

As requested in https://github.com/WorksOnArm/cluster/issues/115 and as mentioned at #12339. The likely target hardware that's in wide use is the Jetson boards.

## Pitch

Provide arm64 builds of PyTorch to enable machine learning applications on ARM systems like NVIDIA Jetson TX2 or AGX Xavier, or Raspberry Pis, which power self driving car and IOT applications.

## Alternatives

Individual users can try to build from source and maintain their own patches to make this happen, but that's not terribly efficient in the long term compared to a supported build.

## Additional context

The Works on Arm project is prepared to provide access to an arm64 server (initially one provided by Ampere) to assist in the port.

cc @seemethere @malfet @pytorch/pytorch-dev-infra