sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: Native CUDA-Aware MPI support for MVAPICH2 and other MPI libraries
Labels: oncall: distributed,module: cuda,needs research

## 🚀 Feature
Adding native support for the CUDA-Aware MVAPICH2 backend, and a build flag which enables torch.distributed to build with CUDA-Aware support.

## Motivation

Given the introduction of deepspeed and an increasing shift to PyTorch, the [MVAPICH ](http://mvapich.cse.ohio-state.edu/) project has received an increasing number of requests for CUDA-Aware MVAPICH2 support for PyTorch. Building PyTorch from source currently disables CUDA-Aware support if OPEN_MPI isn't present, which forces us to manually apply a PyTorch patch which enables CUDA-Aware MPI by default, which is error-prone.

Further, other CUDA-Aware MPI distributions now follow Open-MPI by adding ```MPIX_Query_cuda_support()```, which could be checked by adding a new build flag to PyTorch.

## Pitch

We propose two new functionalities to fix the immediate issue with MVAPICH while allowing PyTorch to detect CUDA-Aware support in other MPI distributions:

1. Add logic to recognize MVAPICH2 CUDA-Aware support. E.g. 

**pytorch/caffe2/mpi/mpi_ops_gpu.cc**
```cpp
38   #elif MVAPICH2_VERSION // !OPEN_MPI
39   #define CAFFE2_MV2_VERSION MVAPICH2_NUMVERSION
40   #if CAFFE2_MV2_VERSION >= 20304000
41   #include "mpi-ext.h"
42   #if MPIX_CUDA_AWARE_SUPPORT
43   #define CAFFE2_HAS_CUDA_MPI_BASICS 1
44   #define CAFFE2_HAS_CUDA_MPI_ALLREDUCE 1
45   #endif // MPIX_CUDA_AWARE_SUPPORT
46   #else //CAFFE2_MV2_VERSION >= 234
47   // In the case of MVAPICH2-GDR before 2.3.4, we don't have compile-time flags
48   // to figure out if CUDA is supported; as a result, we will assume that the
49   // user has built MVAPICH2-GDR with CUDA support.
50   #define CAFFE2_HAS_CUDA_MPI_BASICS 1
51   #define CAFFE2_HAS_CUDA_MPI_ALLREDUCE 1
52   #endif //CAFFE2_MV2_VERSION >= 234
53   #else // !OPEN_MPI && !MVAPICH_GDR
54   // We have not really tested against other MPI environments, so let's go for a
55   // safe path and basically say we don't have cuda-aware functions.
56   #define CAFFE2_HAS_CUDA_MPI_BASICS 0
57   #define CAFFE2_HAS_CUDA_MPI_ALLREDUCE 0
58   #endif // OPEN_MPI
```

2. Add a build flag ```USE_CUDA_AWARE_MPI``` which must be used in conjunction with ```USE_DISTRIBUTED``` and ```USE_MPI```, and would be equivalent to setting:

**pytorch/caffe2/mpi/mpi_ops_gpu.cc**
```cpp
57   #define CAFFE2_HAS_CUDA_MPI_BASICS 1
58   #define CAFFE2_HAS_CUDA_MPI_ALLREDUCE 1
```

Then we could check with ```MPIX_Query_cuda_support()``` whether CUDA-Aware support is present.

We currently have a patch that would add this build flag and MVAPICH2 logic to PyTorch. Once we agree on the high-level strategy of adding this, we can initiate a pull request and review the code.

cc @ngimel @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar @jiayisuse @agolynski
Repository: go
Issue: cmd/go: with -compiler=gccgo should build C files even if CGO_ENABLED=0
Labels: NeedsFix,GoCommand

When using gccgo, it is sometimes necessary to include C files in a package to provide functionality that when using gc would be implemented in assembler.  On tip cmd/go does not build these C files if the environment variable `CGO_ENABLED=0`.  This causes some valid packages to fail to build with gccgo.

The correct fix may be that if the package has an `import "C"`, then C files should not be built if `CGO_ENABLED=0`.  But if the package does not have an `import "C"`, then C files should be built.

An example package that uses this is golang.org/x/sys/unix.  Using the gccgo version of the go tool (I need to use the gccgo version here because https://golang.org/cl/219817 is not yet ported to the main go tool):

```
> go test
PASS
ok  	golang.org/x/sys/unix	0.863s
> CGO_ENABLED=0 gccgoenv go test
# golang.org/x/sys/unix.test
/home/iant/gopath/src/golang.org/x/sys/unix/gccgo.go:48: error: undefined reference to 'golang.x2eorg..z2fx..z2fsys..z2funix.realSyscallNoError'
/home/iant/gopath/src/golang.org/x/sys/unix/gccgo.go:21: error: undefined reference to 'golang.x2eorg..z2fx..z2fsys..z2funix.realSyscallNoError'
/home/iant/gopath/src/golang.org/x/sys/unix/gccgo.go:28: error: undefined reference to 'golang.x2eorg..z2fx..z2fsys..z2funix.realSyscall'
/home/iant/gopath/src/golang.org/x/sys/unix/gccgo.go:35: error: undefined reference to 'golang.x2eorg..z2fx..z2fsys..z2funix.realSyscall'
/home/iant/gopath/src/golang.org/x/sys/unix/gccgo.go:42: error: undefined reference to 'golang.x2eorg..z2fx..z2fsys..z2funix.realSyscall'
/home/iant/gopath/src/golang.org/x/sys/unix/gccgo.go:53: error: undefined reference to 'golang.x2eorg..z2fx..z2fsys..z2funix.realSyscall'
/home/iant/gopath/src/golang.org/x/sys/unix/gccgo.go:21: error: undefined reference to 'golang.x2eorg..z2fx..z2fsys..z2funix.realSyscallNoError'
/home/iant/gopath/src/golang.org/x/sys/unix/gccgo.go:21: error: undefined reference to 'golang.x2eorg..z2fx..z2fsys..z2funix.realSyscallNoError'
collect2: error: ld returned 1 exit status
FAIL	golang.org/x/sys/unix [build failed]
```
Repository: godot
Issue: [4.0] iOS shader validation crash
Labels: bug,platform:ios,topic:rendering,confirmed,crash

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
`master` branch.
Bisected the issue down to this commit: d0bddf53c5415c1f127d51dba5f94dd485def0e3

**OS/device including version:**
iOS device with Vulkan renderer

**Issue description:**

**Important note**: crashes only on debug mode with `Metal API Validation` enabled. Disabling `Metal API Validation` in schema allows to run application and doesn't result in a crash.

Crash on application startup after specific shader compiles:

Crash log:
```
2020-10-02 21:16:04.467528+0300 godot_app[29739:11131332] [Metal Compiler Warning] Warning: Compilation succeeded with: 

program_source:221:12: warning: unused variable 'shadow_vertex'
    float2 shadow_vertex = vertex0;
           ^
program_source:222:11: warning: unused variable 'normal_depth'
    float normal_depth = 1.0;
          ^
program_source:220:12: warning: unused variable 'light_vertex'
    float3 light_vertex = float3(vertex0, 0.0);
           ^
program_source:219:12: warning: unused variable 'screen_uv'
    float2 screen_uv = float2(0.0);
           ^
program_source:229:12: warning: unused variable 'base_color'
    float4 base_color = color;
           ^
validateNewTexture:74: failed assertion `Offset of a buffer-backed texture with pixelFormat(MTLPixelFormatRGBA32Float) must be aligned to 64 bytes, found offset(1086800)'
```

**Steps to reproduce:**
- Create a new clean exported iOS App for any project from current `master`
- Run it in Xcode with **default** settings.
Repository: pytorch
Issue: Complex Number support for distributed
Labels: oncall: distributed,module: bootcamp,triaged,module: complex,pt_distributed_rampup,module: c10d

## 🚀 Feature
As per title, complex numbers should be supported in `torch.distributed`.

## Motivation

Distribute computing support for complex numbers came up in conversations with people at Argonne National Laboratory and Flatiron Institute. Currently, some of them use Uber's Horovod library for distributed computing. The operations that they commonly use are all_reduce and broadcasting operations.

## Pitch

1. NCCL only defines floating and integer data types, so one way to get complex working with NCCL is by viewing complex tensors as real using torch.view_as_real(complex_tensor) which returns an equivalent R^2 floating point tensor. Since the view shares the same storage with the original complex tensor, we probably don’t need to convert it back to complex. If needed, `torch.view_as_complex` can be used to convert the real tensor back to complex tensor.
2. Both torch.view_as_real and torch.view_as_complex are view operations and O(1).
```
    >>>z=torch.randn(4, dtype=torch.cfloat) 
    >>>torch.view_as_real(z)
    tensor([[-0.4226, 0.5459],
            [ 0.9385, 1.1723],
            [-0.9454, -0.3572],
            [ 0.0624, 1.0193]])
```
3. Ops that should work with complex:
    1. [torch.distributed.all_reduce](https://github.com/pytorch/pytorch/blob/6acd7b686c73a1ad3f7e67883ddcdd1fbc4ee043/torch/distributed/distributed_c10d.py#L909)
    2. [torch.distributed.all_gather](https://github.com/pytorch/pytorch/blob/6acd7b686c73a1ad3f7e67883ddcdd1fbc4ee043/torch/distributed/distributed_c10d.py#L909) 
4. Testing
    1. https://github.com/pytorch/pytorch/blob/master/test/distributed/test_c10d.py
    2. https://github.com/pytorch/pytorch/blob/master/torch/testing/_internal/distributed/distributed_test.py

cc @ezyang @anjali411 @dylanbespalko @mruberry @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar @jiayisuse @agolynski
Repository: vscode
Issue: Add when clause context for language at active cursor
Labels: feature-request,languages-basic

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
I would like a new [when clause context](https://code.visualstudio.com/docs/getstarted/keybindings#_when-clause-contexts) for the language ID at the active cursor position within the document. Right now, we have `editorLangId` which only uses the language ID of the editor itself, but documents can have other languages embedded in them defined in the [`contributes.grammars`](https://code.visualstudio.com/api/references/contribution-points#contributes.grammars).

I'm not sure about the full extent of how the embedded language is used, but I've seen it used for some built-in features like language snippets and the built-in commands that toggle language comments. I can also see the language present in the inspector for the command `editor.action.inspectTMScopes`. Since it's clearly seen as useful for this built-in functionality and has implementations demonstrating how it can be used, it should also be clear that it would be useful to have access to this in the `when` clause.
Repository: pytorch
Issue: resize_(0) is very expensive
Labels: module: performance,triaged

Internal only link: https://fb.workplace.com/groups/pytorch.dev/permalink/754045421840607/

@bwasti and the static runtime team observed that `resize_(0)` slows down static runtime 12% when you do it. This is almost definitely due to dispatcher overhead. There are probably ways to reduce this overhead, for example, when no reallocation is necessary, resize can be done without a dynamic dispatch. Take a look close to this under callgrind.

`resize_(0)` matters because it is the preferred intermediate step to get legacy behavior of resizing a tensor to a different size while preserving memory.

cc @VitalyFedyunin @ngimel
Repository: PowerToys
Issue: [FZ Editor] Add error window
Labels: FancyZones-Editor,Product-FancyZones,Area-Quality,Area-User Interface

Whenever FZ editor crashes, it generates a log file and a dialog that tells the user where to find it.

What's annoying, is that you need to navigate to the file manually (there's no way to copy-and-paste the path).

PT Run has an error window that has some benefits:
1) Shows you the error so you don't need to open the log file.
2) The log file path is can be selected (and copied).
3) Inline link to this repository so users know where to post the issue

![ReportWindow](https://user-images.githubusercontent.com/9866362/89685886-851fca00-d8fd-11ea-96ec-9c5399470afb.gif)


Not a huge priority obviously.

---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: pytorch
Issue: `defineMethodsInModule` no longer exists
Labels: module: docs,triaged

## 📚 Documentation

This [section](https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/OVERVIEW.md#ir-emitter) in `OVERVIEW.md` states that the main entrypoint to IREmitter is `defineMethodsInModule`. However, this method does not exist anymore (tested with `grep -Rl "defineMethodsInModule" .`). Update the documentation to reflect the current structure of IREmitter.


cc @jlin27 @mruberry
Repository: flutter
Issue: Provide some way to make an `Image` widget that is "offstage" to release its image resources.
Labels: c: new feature,framework,a: images,perf: memory,P3,team-framework,triaged-framework

We do something close to this when the `TickerMode` is disabled, but in addition to that this change would involve getting rid of the image reference itself and then re-obtaining it if the image came back "onstage".

/cc @ds84182
Repository: go
Issue: x/website: command to update PATH only works on cmd.exe on windows
Labels: OS-Windows,NeedsInvestigation,website

Error on page https://golang.org/doc/tutorial/compile-install

In step 3, the Windows command needs double quotes around the path to work.

![image](https://user-images.githubusercontent.com/52059945/94970720-1ce30400-04ba-11eb-8994-816d6c284ac5.png)
Repository: TypeScript
Issue: Broken autoimport of module without index reexport
Labels: Suggestion,Experience Enhancement,Domain: Auto-import

Demo: https://github.com/zerkalica/ts-references-autoimport-bug/tree/no-autoimport-wo-index

TypeScript Version: 4.0.2
VSCode Version: 1.49.2
OS: Ubuntu 20.04.1 LTS

## Example 1

Package 'b' depends on 'a', but 'a' has no index.ts and types in package.json.

Steps to reproduce

1. clone, switch to no-autoimport-wo-index, yarn install
2. Open lib/b/b.ts in vscode, type `someA`
3. Expected: autoimport suggest `import { someA } from '@some/lib-a/a'`, actual: no autoimport

## Example 2

Package 'd' depends only on 'c', 'c' depends on 'a', but 'a' has no index.ts and types in package.json.

Steps to reproduce

1. clone, switch to no-autoimport-wo-index, yarn install
2. Open lib/d/d.ts in vscode, type `someA`
3. Expected: no someA in autoimport, actual: autoimport suggests broken `import { someA } from '../a/a'`
Repository: create-react-app
Issue: :global sass doesn't work, even from module.scss file
Labels: stale,needs triage,issue: bug report

### Describe the bug

When using the :global() function to wrap a css name in an scss file, that symbol will not import correctly.

### Environment

This can be reproduced in codesandbox

https://codesandbox.io/s/interesting-oskar-1hz20

### Steps to reproduce

Create the files App.module.scss and App.tsx and make similar edits to below

App.module.scss:
  .App_local { ... }
  :global(.App_global) { ... }

App.tsx:
  import style from App.module.scss
  ...
  className={style.App_local} <--- works
  className={style.App_global} <--- doesn't work
  className="App_global" <-- works


### Expected behavior

Expected that the style labeled as :global() would be accessible to the importing code.

### Actual behavior

It is as though the style.App_global (in the example above) doesn't exist and results in no className being used.  However, it is included in the generated css since it is still possible to use the name as an explicit string.

### Reproducible demo

https://codesandbox.io/s/interesting-oskar-1hz20
Repository: material-ui
Issue: [LoadingButton] LoadingButton accessibility of the pending state
Labels: new feature,component: button

First off, I love the new `<LoadingButton />` component and I'm excited to use it!

- [x] The issue is present in the latest release.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯
The `<LoadingButton />` is currently in the `disabled` state when `pending` is applied and is not marked `aria-busy` (not sure if this is necessary or appropriate for this use-case).

## Expected Behavior 🤔
Because disabling the button would revert focus back to the document body, I would expect that there would be another way to prevent form submission or clicks without disabling the button itself. I also wonder if it's appropriate to add an `aria-busy` designation.

## Steps to Reproduce 🕹
This can be seen [in the docs](https://next.material-ui.com/components/buttons/#loading-buttons).

## Proposal
One thing I've tried is adding `aria-busy` and updating the click handler as to prevent the default behavior on click:
```js
onClick={e => {
  if (pending) {
    // Prevent form submission
    e.preventDefault();
    return;
  }

  onClick(e);
}}
```
Repository: TypeScript
Issue: [typescript] removing a bracket loses all folded areas
Labels: Suggestion,Experience Enhancement

*TS Template added by @mjbvz*

**TypeScript Version**: 4.1.0-dev.20201002

**Search Terms**
- folding / folds
- getOutlineSpans

([see my comment for a self contained example](https://github.com/microsoft/TypeScript/issues/40920#issuecomment-703012426))

---

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->
<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ -->

<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.47.0
- OS Version: Windows 10 Verison 1909

Steps to Reproduce:

1. make an error on the code with all lines collapsed.
2. It will automatically expand all the codes. Which is annoying. Bcuz I have to collapse it automatically.

<!-- Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes
Repository: godot
Issue: AnimationPlayer misnaming all animations after renaming an animation
Labels: bug,topic:editor

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:** 3.2.2
<!-- Specify commit hash if using non-official build. -->


**OS/device including version:** Windows 10
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->


**Issue description:** Created a new animation, then renamed it, shifting it's order to the top alphabetically.  AnimationPlayer shifted the names but not any of the animation tracks, causing all animations between the new and original position to become misnamed. 

Was solved by manually renaming and re-saving all animations, but thought could be of interest. 
<!-- What happened, and what was expected. -->


**Steps to reproduce:** Unsure how to reproduce. 


**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Repository: youtube-dl
Issue: Cookies cache?
Labels: question

- [x] I'm asking a question
- [x] I've looked through the README and FAQ for similar questions
- [x] I've searched the bugtracker for similar questions including closed ones (just a glance at first page's results)


## Question

I do not know how youtubeDL accesses and saves the videos, so I ask this:
When I download a youtube video, are cookies saved in my computer?
Also, seeing youtube needs javascript to even work nowadays, I assume youtube's javascripts are downloaded, but are they cached?

I apologize for taking your time for such a simple question, given there are so many issues :(
Repository: TypeScript
Issue: Add TS Server command for 'add all missing imports'
Labels: Suggestion,Domain: Quick Fixes

## Search terms
- code action
- source action 
- Add missing imports
- getCombinedCodeFix

## Feature request
Add a new TS Server command that triggers 'add all missing imports' for a given file. 

## Use case
VS Code allows users to [configure code actions that are run on save](https://code.visualstudio.com/Docs/languages/javascript#_code-actions-on-save). One of the supported code actions is `source.addMissingImports` which attempts to add all missing imports in a file. Users can also setup keybindings for these specific actions

To implement this, right now we request all code actions for the file and then try fetching the 'add all missing imports' combined fix for one of them. This is complicated and results in the TS Server doing extra work.

It would be better for us if we could ask the Typescript server: give me the edits that add the missing imports in this file
Repository: TypeScript
Issue: Add TS server command for removing all unused code in a file
Labels: Suggestion,Domain: Quick Fixes

## Search terms
- code action
- source action 
- getCombinedCodeFix

## Feature request
Add a new TS Server command that removes all unused code in a file. This should only perform 'safe' removals, such as:

- Unreachable code
- Unused imports
- Unused declarations

We should likely not remove unused parameters. Not sure about removing unused variable since removing them can also have side effects 

## Use case
VS Code allows users to [configure code actions that are run on save](https://code.visualstudio.com/Docs/languages/javascript#_code-actions-on-save). One of the supported code actions is `source.removeUnused` which attempts to remove unused code in a file

On the VS Code side, we can't implement this very well since unused code often ends up overlapping with other unused code and we don't have much insight into what is "safe" to remove and what is not
Repository: flutter
Issue: No longer able to use "flutter drive" to run integration tests with multiple devices attached to the host machine
Labels: a: tests,tool,framework,t: flutter driver,a: existing-apps,P2,team-framework,triaged-framework

Repro Steps:

1) attach an Android device to the host machine (mine is a Mac)
2) bring up an iOS simulator (mine is the "iPhone X 12.2")
3) open a terminal window and then navigate to the "module" folder in your app
4) run the command line below:

flutter attach -d "iPhone X"

5) launch your app in the iOS simulator and then invoke a Flutter UI that you want to test
6) you will see something like this in the terminal window in Step 4: 

An Observatory debugger and profiler on iPhone X is available at: http://127.0.0.1:57394/SmkDaniLTTU=/

7) open another terminal window and then navigate to the "module" folder in your app
8) run your integration tests with the command line below:

flutter drive --driver=<test_file_patth> --use-existing-app=http://127.0.0.1:57394/SmkDaniLTTU=/

[Expected Result]
Integration tests should be running.

[Actual Result]
I am getting the following output instead:

Multiple devices found:
SM G950U (mobile) • 98897a445150574e5a                   • android-arm64 • Android 9 (API 28)
iPhone X (mobile) • 0DDF4B41-4E38-4B7F-BDD2-02FCC385B076 • ios           • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator)
[0]: SM G950U (98897a445150574e5a)
[1]: iPhone X (0DDF4B41-4E38-4B7F-BDD2-02FCC385B076)
Please choose one (To quit, press "q/Q"):

[Comment]
This used to work fine for us with Flutter SDK "1.19.0-4.1.pre-beta".  But it becomes broken once we upgraded to Flutter SDK "1.22.0-12.2.pre-beta".  The current workaround is just to simply make sure there is no any other device attached to the host machine.  In my case, I just unplug my Android device from Mac first before running my tests.