sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Large overhead (7 microseconds) for PyTorch operation
Labels: module: performance,triaged

## 🐛 Bug

Hi, I am new to PyTorch so apologies if I am missing something obvious! My use case involves narrow models with small input dimension (<100). After noticing slower training time than expected, I did some profiling and found that there seems to be an overhead of ~7 microseconds for the simplest tensor operations.

```
import torch
import time

x = torch.ones(1, requires_grad=True)

start = time.time()
for _ in range(1000000):
    y = 2*x
    
print(time.time() - start)
```
gives an output of 6.8 seconds for 1 million operations. It is only a bit faster with `requires_grad=False` (still 5 microseconds per operation).

Some research into PyTorch overhead turned up this thread from 2017: https://github.com/pytorch/pytorch/issues/2518, which discusses a fix that was intended to reduce overhead down to 1 microsecond. Has there been a regression since then?

Is it feasible to reduce this overhead / is this in the roadmap for PyTorch? Curious to better understand why the overhead is as large as it is; even with dynamic memory allocations to expand the compute graph I would expect something on the order of hundreds of nanoseconds. Thank you for your time!

cc @VitalyFedyunin @ngimel
Repository: godot
Issue: Safe save fails way too often
Labels: bug,platform:windows,topic:editor,confirmed

Couldn't find any potential dupes.

**Godot version:**
3.2.1.stable
3.2.2.stable
These two versions of Godot are the only ones I've ever used, and it happens on both of them.

**OS/device including version:**
Microsoft Windows NT Version 10.0.18363.900 running on an Intel Core i3 and integrated graphics,
This is not a visual problem.


**Issue description:**
I keep experiencing a certain issue, and I'm getting sick of it.
It happens sometimes when I do one or more of these things:
- Run the project
- Export the project
- Save a change while it's running
- Save a change while it's not running (although it happens less often when not running!)
- Adding a file to the project
The issue I'm experiencing is this:
`ERROR: Safe save failed. This may be a permissions problem, but also may happen because you are running a paranoid antivirus. If this is the case, please switch to Windows Defender or disable the 'safe save' option in editor settings. This makes it work, but increases the risk of file corruption in a crash.`
Firstly, no, Switching to Windows Defender doesn't solve the issue.
Secondly, my antivirus isn't picking up Godot.
And lastly, disabling safe save doesn't help.
What I think the issue is is that it's trying to write to a file that's in use.


**Steps to reproduce:**
I think you have the best chance at getting this when saving a change to scene X while it's using scene X.

**Minimal reproduction project:**
N/A
Repository: pytorch
Issue: About the description of the mathematical formula of nn.RNN, I think it is wrong
Labels: module: docs,triaged

## 📚 Documentation
![image](https://user-images.githubusercontent.com/33288114/87407914-60ce1780-c5f5-11ea-80eb-4fdb8c374463.png)

This formula confuses me because this formula does not look like a matrix formula. I can't determine whether W or x is a matrix or a vector.I think your formula does not consider the consistency of matrix dimensions.

According to the relevant weights and input dimensions provided by the official documentation ， I think the correct formula should be:
![image](https://user-images.githubusercontent.com/33288114/87409139-1e0d3f00-c5f7-11ea-953e-3fe0ffcb727f.png)




cc @jlin27
Repository: flutter
Issue: [engine] Inconsistent documents of build env on Windows host
Labels: engine,platform-windows,P2,team-engine,triaged-engine

**Should `GYP_MSVS_VERSION` be empty, `2017` or `2019`?**

- compiling-for-windows

According to https://github.com/flutter/flutter/wiki/Compiling-the-engine#compiling-for-windows, there no need for `GYP_MSVS_VERSION`

```cmd
DEPOT_TOOLS_WIN_TOOLCHAIN=0
GYP_MSVS_OVERRIDE_PATH="C:\Program Files (x86)/Microsoft Visual Studio/2019/Community" (or your location for Visual Studio)
WINDOWSSDKDIR="C:\Program Files (x86)\Windows Kits\10" (or your location for Windows Kits)
```

- compiling-for-the-web-on-windows

According to https://github.com/flutter/flutter/wiki/Compiling-the-engine#compiling-for-the-web-on-windows, there a version conflict in `GYP_MSVS_OVERRIDE_PATH` and `GYP_MSVS_VERSION`

```cmd
GYP_MSVS_OVERRIDE_PATH = "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community"
GYP_MSVS_VERSION = 2017
```

- buildroot/build/vs_toolchain.py

As to https://github.com/flutter/buildroot/blob/f9331b6af6e690516a2ffdc14622c768977e3c97/build/vs_toolchain.py#L93-L97, `GYP_MSVS_VERSION` could be inferred from `GetVisualStudioVersion()` and left `empty`

```python
  elif sys.platform == 'win32' and not depot_tools_win_toolchain:
    if not 'GYP_MSVS_OVERRIDE_PATH' in os.environ:
      os.environ['GYP_MSVS_OVERRIDE_PATH'] = DetectVisualStudioPath()
    if not 'GYP_MSVS_VERSION' in os.environ:
      os.environ['GYP_MSVS_VERSION'] = GetVisualStudioVersion()
```
Repository: godot
Issue: Crash when running project while renaming AnimationTree nodes
Labels: bug,topic:editor,confirmed,crash,topic:animation

**Godot version:** 3.2

**OS/device including version:** Windows 10 64-bit

**Issue description:**
If you run the project while you are in the middle of renaming/have renamed (but not committed) an AnimationTree graph node, the editor will crash.
(Saving the project with CTRL-S while still inside the field also will not commit the new name, it'll still crash)

**Steps to reproduce:**
- Create a simple AnimationTree node and add any subnode
- Alter the name, hit F5 while the text field is still focused
Repository: TypeScript
Issue: Experimental Decorators don't work in `export` statements
Labels: Suggestion,Waiting for TC39

<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->

**TypeScript Version:**  JavaScript + ESNext

**Search Terms:** export+experimental+decorators+export

**Code**

```js
export default
@x
class A {
}
```


[❌  ]  The above does not work.



```js
@x
class A {}

export default A;
```

[👌 ] It does work when going with the old syntax, that is splitting `export` statement and `class` expression. I.e. this works fine:

**Expected behavior:**

The syntax should be valid, according to [@babel/plugin-proposal-decorators](https://babeljs.io/docs/en/babel-plugin-proposal-decorators#decoratorsbeforeexport), which is also in line with tc39, [as discussed here](https://github.com/tc39/proposal-decorators/issues/69).

**Actual behavior:**

The first `@` raises:

> Expression expected. ts(1109)



**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->

https://www.typescriptlang.org/play/?target=99&ts=4.0.0-dev.20200714&useJavaScript=true#code/KYDwDg9gTgLgBAE2AMwIYFcA2MBQABGVAcwAoByYAYwFsBaUMTVASwDtgoyBKfGYaxqj7kAPAmYA3AHwiA9OOncclJgGdVcALIBPAMIQBcUH1YINAZUzNqcAN44AvkA

**Related Issues:** <!-- Did you find other bugs that looked similar? -->

I previously posted on VSCode issues and was sent here:

* https://github.com/microsoft/vscode/issues/102386
Repository: godot
Issue: Particles2D and CPUParticles2D's `preprocess` property does nothing
Labels: bug,topic:particles

<!-- Please search existing issues for potential duplicates before filing yours:	
https://github.com/godotengine/godot/issues?q=is%3Aissue	
-->
Probably related to #34610


**Godot version:**
<!-- Specify commit hash if using non-official build. -->
3.2.2

**OS/device including version:**
Windows 10, GTX1070


**Issue description:**
particles (CPU or GPU) preprocessing has no effect.


**Steps to reproduce:**
create particles and run

**Minimal reproduction project:**
[test_particle_preprocess.zip](https://github.com/godotengine/godot/files/4918295/test_particle_preprocess.zip)
Repository: godot
Issue: Godot file manger is shown upside-down (Y flipped) and icons are missing [Oracle VM]
Labels: bug,platform:windows,topic:rendering,confirmed,topic:thirdparty

<!-- Please search existing issues for potential duplicates before filing yours:	
https://github.com/godotengine/godot/issues?q=is%3Aissue	
-->

**Godot version:**
v3.2.2.stable.official (reproducible also v3.2.1.stable.official)


**OS/device including version:**
Virtual box 6.1: Host Win10 x64, Guest Win10 x64 (on the guest Linux Ubuntu 18.04 is not reproducible)
Godot Engine v3.2.2.stable.official - https://godotengine.org
OpenGL ES 2.0 Renderer: SVGA3D; build: RELEASE;
OpenGL ES 2.0 Batching: ON


**Issue description:**
The file manager is shown upside-down with strange localization.

![image](https://user-images.githubusercontent.com/3696772/87418738-7ed65080-c5d2-11ea-871c-72b734347f8b.png)

**Steps to reproduce:**
Just run Godot.


**Minimal reproduction project:**
Just run Godot.
Repository: rust
Issue: Borrow compilation error with `vec.swap(0, vec.len() - 1)`, while `vec.push(vec.len())` works.
Labels: A-borrow-checker,T-compiler,C-bug

I tried compiling this code (here is the [playgound link](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=041100f41b68065df13e143d640893a0)):
```rust
fn main() {
    let mut vec = vec![];
    
    vec.push(vec.len());
    vec.push(vec.len() - 1);    // This works!
    vec.swap(0, vec.len() - 1); // Error
}
```

I expected a  **Successful compilation**, but _this_ happened:


```
error[E0502]: cannot borrow `vec` as immutable because it is also borrowed as mutable
```
```rust
 --> src/main.rs:6:17
  |
6 |     vec.swap(0, vec.len() - 1);
  |     --- ----    ^^^ immutable borrow occurs here
  |     |   |
  |     |   mutable borrow later used by call
  |     mutable borrow occurs here
```

Note 1: that the line above the error also contains `vec.len()`, but it compiles.
Note 2: `vec.swap(0, vec.len());` produces the same error (nothing to do with ` - 1`).

### Meta

`rustc --version --verbose`:
```
rustc 1.44.1
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.44.1
LLVM version: 10.0
```

Also confirmed in the [playground](https://play.rust-lang.org/) against _Nightly_ and _Beta_.
Repository: pytorch
Issue: Bottleneck when publishing the model using flask about 3 times slower.
Labels: module: performance,module: cpu,triaged

## 🐛 Bug

When I publish the model using flask, it takes 3 times longer than the normal run. My model takes about 36 sec to run, but when I converted it to an API it took 122 sec

## To Reproduce
I've confirmed this problem when running your launched model at the tutorials [here](https://pytorch.org/tutorials/intermediate/flask_rest_api_tutorial.html).

The result of the profiling is the python3.7/site-packages/torch/nn/modules/conv.py file is the one which take the most time (and hence 3 duplicates of the time when it's an API)
Steps to reproduce the behavior:

1. Calculate the time the function `get_prediction` (in the link above) takes  when it's an API (for me was 0.6 sec)
1. Comment the API code and call the `get_prediction` function normally with passing an image
1. Calculate the time of the last step (for me was 0.2 sec) 

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

I was expecting that both have a close running time, not 3x time

## Environment
Collecting environment information...
PyTorch version: 1.2.0
Is debug build: No
CUDA used to build PyTorch: 10.0.130

OS: Ubuntu 18.04.4 LTS
GCC version: (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
CMake version: version 3.10.2

Python version: 3.7
Is CUDA available: No
CUDA runtime version: No CUDA
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA

Versions of relevant libraries:
[pip] numpy==1.18.1
[pip] torch==1.2.0
[pip] torchvision==0.4.0a0
[conda] _pytorch_select           0.2                       gpu_0  
[conda] blas                      1.0                         mkl  
[conda] cudatoolkit               10.0.130                      0  
[conda] mkl                       2020.1                      217  
[conda] mkl-service               2.3.0            py37he904b0f_0  
[conda] mkl_fft                   1.0.15           py37ha843d7b_0  
[conda] mkl_random                1.1.1            py37h0573a6f_0  
[conda] numpy                     1.18.1           py37h4f9e942_0  
[conda] numpy-base                1.18.1           py37hde5b4d6_1  
[conda] pytorch                   1.2.0           cuda100py37h938c94c_0  
[conda] torchvision               0.4.0           cuda100py37hecfc37a_0



cc @VitalyFedyunin @ngimel
Repository: go
Issue: runtime/pprof: provide method to dump cpu profile as plain text
Labels: NeedsInvestigation,compiler/runtime

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.13.12 darwin/amd64
</pre>

### Does this issue reproduce with the latest release?

Y

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env

</pre></details>

### What did you do?

use runtime/pprof to dump cpu/mem/goroutine profile.

### What did you expect to see?

All types of profiles should have plain text output, eg 

I can write memory or any other profile as plain text:

```go
pprof.Lookup("heap").WriteTo(&buf, 1) 
```

But it's really hard to get a plain text CPU profile, especially when there is no executable go or pprof binary and no internet connection.

### What did you see instead?

There is no way to dump cpu profile directly in plain text.
Repository: flutter
Issue: Requesting vertical/horizontal split layout widget
Labels: c: new feature,framework,c: proposal,P3,team-framework,triaged-framework

I came across flutter devtools project, @DaveShuckerow did
implement [split widget](https://github.com/flutter/devtools/commit/4384ed3cf23a2cb30d4be108fc40ad2049a4db22) that looks like Qsplitter provided by QT
Repository: pytorch
Issue: test_jit.py fails on Power
Labels: oncall: jit,triaged

## 🐛 Bug

Various tests from test_jit.py fail on Power. This might be related to  #41186 as some tests have similar names to the ones failing there.

The failing tests are:
- test_solve_batched_broadcast_A_cpu (__main__.TestJitGeneratedAutogradCPU)
- test_solve_batched_broadcast_b_cpu (__main__.TestJitGeneratedAutogradCPU)
- test_solve_batched_cpu (__main__.TestJitGeneratedAutogradCPU)
- test_solve_batched_dims_cpu (__main__.TestJitGeneratedAutogradCPU)
- test_solve_cpu (__main__.TestJitGeneratedAutogradCPU)
- test_nn_conv_transpose3d (__main__.TestJitGeneratedFunctional)
- test_dcgan_models (jit.test_models.TestModels)
- test_vae (jit.test_models.TestModels)

## To Reproduce

Steps to reproduce the behavior:

1. python run_tests.py

The errors are a bit more descriptive as in the other issue. Some examples:

```
AssertionError: False is not true : Tensors failed to compare as equal! With rtol=1e-07 and atol=1e-07, found 9 element(s) (out of 100) whose difference(s) exceeded the margin of error (including 0 nan comparisons). The greatest difference was 1.7090110120655737 (2.232483364960445 vs. 0.5234723528948716), which occurred at index (0, 1, 4, 4).

AssertionError: False is not true : Tensors failed to compare as equal! With rtol=1e-07 and atol=1e-07, found 5 element(s) (out of 100) whose difference(s) exceeded the margin of error (including 0 nan comparisons). The greatest difference was 0.6121940686973842 (1.2383958096589895 vs. 0.6262017409616053), which occurred at index (0, 0, 4, 2).

AssertionError: False is not true : Tensors failed to compare as equal! With rtol=1e-07 and atol=1e-07, found 13927 element(s) (out of 18225) whose difference(s) exceeded the margin of error (including 0 nan comparisons). The greatest difference was 47.19980373887701 (46.73646571072269 vs. -0.4633380281543156), which occurred at index (3, 4, 3, 4, 4).
```

The failing tests are not consistently the same and (opposed to #41186) this doesn't get solved by using pytest instead.

## Environment

PyTorch version: 1.6.0-rc2
Is debug build: No
CUDA used to build PyTorch: 10.1

OS: Red Hat Enterprise Linux Server release 7.6 (Maipo)
GCC version: (GCC) 8.3.0
CMake version: Could not collect

Python version: 3.7
Is CUDA available: Yes
CUDA runtime version: 10.1.243
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

Nvidia driver version: 440.64.00
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.17.3
[pip3] torch==1.6.0


cc @suo @gmagogsfm
Repository: godot
Issue: Certain child node properties not editable in the inspector while parent node is being animated
Labels: bug,topic:editor

**Godot version:**
3.2.2-stable

**OS/device including version:**
Windows 10
AMD Radeon Vega 10 Graphics

Using GLES2 graphics

**Issue description:**
A Sprite's position is being animated by an AnimatedPlayer node and a CPUParticles2D node is a child of that sprite, and moves along with it. While the animation is playing, certain properties of the particles node aren't editable in the inspector. They can be selected but are immediately deselected. When the animation is stopped, the properties behave like normal.

The uneditable properties I tried belong to a Gradient created in the particles Color/ColorRamp property. i.e. if I click on either of the Gradient's PoolColorArray colors, the color picker appears for a split second and then disappears.

In my experience any other properties of the CPUParticles2D node work like normal, even while the animation is playing.

![godot_bug](https://user-images.githubusercontent.com/57452270/87453146-b986bb80-c5c7-11ea-9978-4f2597c51168.gif)
Repository: pytorch
Issue: [jit] `set` builtin support
Labels: oncall: jit,weeks,TSUsability,TSRootCause:UnsupportedConstructs

We support `List` and `Dict`, we should support `Set` as well. This is a low-pri request from PyPER.

cc @suo @gmagogsfm
Repository: pytorch
Issue: [jit] support for generators and `yield`
Labels: oncall: jit,months,TSUsability,TSRootCause:UnsupportedConstructs

Background on what generators are: https://wiki.python.org/moin/Generators

The use cases for TorchScript are 
1. some classes want to use generates to implement `__iter__` and such, especially in Torchtext
2. the PyTorch optimizers make use of generators 

cc @suo @gmagogsfm
Repository: pytorch
Issue: [jit] support class polymorphism
Labels: oncall: jit,months,TSRootCause:DynamicBehaviors,TSUsability,TSRootCause:UnsupportedConstructs

Today, classes cannot inherit from other classes. This is a surprising limitation for people who want to use inheritance for code re-use, or are scripting already-existing codebases that use inheritance. Also: the PyTorch optimizers are polymorphic.

cc @suo @gmagogsfm
Repository: pytorch
Issue: [jit] support `rpc_remote` and `rpc_sync`
Labels: oncall: jit,days

We registered the `rpc_async` in TorchScript, but not `rpc_remote` and `rpc_sync`. We should register these two as well, as they are exactly the same semantics with `rpc_async`. This is a mid-pri request from PyPER

cc @suo @gmagogsfm
Repository: pytorch
Issue: [jit] Support NamedTuple in tracing
Labels: oncall: jit,module: bootcamp,days

We should be able to take `NamedTuples` as input and output of traced modules. As a starting point, can look at https://github.com/pytorch/pytorch/pull/29751 for a rough implementation

cc @suo @gmagogsfm
Repository: TypeScript
Issue: No error using imports/exports with --module=none and --target=es2015+
Labels: Bug,Breaking Change,Rescheduled

<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ

Please fill in the *entire* template below.
-->

<!--
Please try to reproduce the issue with the latest published version. It may have already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
-->
**TypeScript Version:**  4.0.0-dev.20200713

<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** module none target

**Code**

```ts
// @module: none
// @target: es2015
export class Foo {}
```

**Expected behavior:**

`TS1148 Cannot use imports, exports, or module augmentations when '--module' is 'none'` and emits `export class Foo {}`

**Actual behavior:**

No error, and emits as CommonJS.

**Playground Link:** https://www.typescriptlang.org/play/?module=0#code/KYDwDg9gTgLgBAYwDYEMDOa4DEITgbwF8AoIA

**Related issues:** #39597
Repository: pytorch
Issue: Add a done() API to torch.futures.Future and ProcessGroup::Work
Labels: oncall: distributed,triaged

Discussion in https://discuss.pytorch.org/t/how-to-check-if-irecv-got-a-message/55725 asks for an API to check the completion of a `ProcessGroup::Work` from `isend` / `irecv`.  A temporary solution would be implementing the `isCompleted` API properly, which is already exposed to Python.

https://github.com/pytorch/pytorch/blob/e2c4c2f102af3bf81b1a7a7e4d2165cebda4995b/torch/lib/c10d/ProcessGroup.hpp#L43

https://github.com/pytorch/pytorch/blob/e2c4c2f102af3bf81b1a7a7e4d2165cebda4995b/torch/csrc/distributed/c10d/init.cpp#L660-L674

In the long run, as we are going to replace `ProcessGroup::Work` with `torch.futures.Future`, we should also add a [`done`](https://docs.python.org/3/library/asyncio-future.html#asyncio.Future.done) API to the Future type.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar @jiayisuse @agolynski