sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: How to run two different jit models in two GPUs respectively in one scrip?
Labels: oncall: jit,triaged

I have an encoder-decoder model.  After converted encoder and decoder model into jit models, I want to load encoder on GPU:0 and the encoder outputs **Keys** and **Value**. Then I move the **Keys** and **Values** to GPU:1 since the decoder is loaded on GPU:1. 

    encoder = torch.jit.load(feat_model).cuda(0)
    gru_decoder = torch.jit.load(gru_model, map_location=torch.device("cpu")).cuda(1)

    loader = getLoader(data_path, batch_size)
    for data in loader:
        audio, label = data
        batch_size = audio.size(0)
        k, v = encoder(audio.type("torch.FloatTensor").cuda(0))
        k = k.cuda(1)
        v = v.cuda(1)
        hidden = torch.zeros(1, batch_size, 512).type("torch.FloatTensor").cuda(1)
        target = torch.tensor(sos_id).repeat(batch_size).cuda(1)

        for step in range(k.size(1)):
            probs, hidden = gru_decoder(target, hidden, k, v)
            target = torch.argmax(probs, dim=-1)
I have checked that target, hidden, k, v are on GPU:1. However, an error occurs:

    arguments are located on different GPUs at /pytorch/aten/src/THC/generic/THCTensorIndex.cu:519:
    operation failed in interpreter:
    op_version_set = 0
    def forward(self,
        target: Tensor,
        hx: Tensor,
        keys: Tensor,
        values: Tensor) -> Tuple[Tensor, Tensor]:
        input_1 = torch.to(target, dtype=4, layout=0, device=torch.device("cuda"), non_blocking=False, copy=False)
        _0 = torch.embedding(self.classifier.embedding.weight, input_1, -1, False, False)
            ~~~~~~~~~~~~~~~ <--- HERE
        input_2 = torch.unsqueeze(_0, 1)
        _1 = [self.classifier.rnn.weight_ih_l0, self.classifier.rnn.weight_hh_l0, self.classifier.rnn.bias_ih_l0, self.classifier.rnn.bias_hh_l0]
        querys, _2 = torch.gru(input_2, hx, _1, True, 1, 0., False, False, True)
        _3 = torch.matmul(keys, torch.permute(querys, [0, 2, 1]))
        input_3 = torch.div(_3, CONSTANTS.c0)
        attn_w = torch.softmax(input_3, 1)
        sums = torch.matmul(torch.permute(attn_w, [0, 2, 1]), values)
        input_4 = torch.view(torch.add(querys, sums, alpha=1), [-1, 512])
       input = torch.addmm(self.classifier.h.bias, input_4, torch.t(self.classifier.h.weight), beta=1, alpha=1)

It seems that the embedding layer in decoder is on GPU:0. But I have already set decoder on CUDA:1. 
Does anyone have any solutions or ideas? Thanks a lot.

cc @suo
Repository: flutter
Issue: Allow control over TextField labelText spacing
Labels: a: text input,c: new feature,framework,f: material design,a: typography,P3,team-text-input,triaged-text-input

I need to implement a design where text field labels are farther up from the text field top.
I don't see any way Flutter allows this.
The closest thing is labelStyle height but it breaks label completely when it needs to wrap horizontally.
Repository: flutter
Issue: [web] SelectableText doesn't show toolbar
Labels: platform-ios,framework,f: material design,a: quality,a: typography,platform-web,has reproducible steps,P2,found in release: 3.3,found in release: 3.5,team-design,triaged-design

## Problem

> Flutter 1.10.14 • channel dev

- flutter for web
Want to copy String_data in the flutter for web.

- clipboard
When trying clipboard in the flutter web , cant copy the text.
```
import 'package:flutter/services.dart';


Clipboard.setData(ClipboardData(text: 'data'));
```

- SelectableText
When tap it, do not appear toolbar.

```
SelectableText(
          'SelectableText',
          showCursor: true,
          enableInteractiveSelection: true,
          toolbarOptions: ToolbarOptions(copy: true),
          style: TextStyle(height: 2),
        ),
```
Repository: rust
Issue: Mark Result::{ok,err} as #[must_use]
Labels: T-libs-api,C-feature-request

In a discussion in our Rust group, someone incorrectly uses `ok()` without checking its return value, causing confusing issue. As `Result::{is_ok, is_err}` are already marked `#[must_use]` in #59610, I don't see any reason `Result::{ok, err}` shouldn't be.

cc #48926
Repository: opencv
Issue: CV_OCL_RUN_ (the default implementation) should not swallow exceptions
Labels: category: ocl,RFC

##### System information (version)
- OpenCV => master branch

##### Detailed description

CV_OCL_RUN_ should not swallow exceptions. It gets called when running OpenCL kernels, so when doing GPU acceleration (I was using BackgroundSubtractorMOG2). This is how it is now implemented by default:

```.cpp
#define CV_OCL_RUN_(condition, func, ...)                                   \
try \
{ \
    if (cv::ocl::isOpenCLActivated() && (condition) && func)                \
    {                                                                       \
        CV_IMPL_ADD(CV_IMPL_OCL);                                           \
        return __VA_ARGS__;                                                 \
    } \
} \
catch (const cv::Exception& e) \
{ \
    CV_UNUSED(e); /* TODO: Add some logging here */ \
}
```

From: https://github.com/opencv/opencv/blob/5dd46b54c10b4d18041598eb0f96d062cc8420fe/modules/core/include/opencv2/core/opencl/ocl_defs.hpp

There are some guilty feelings already, expressed in the todo ;-) Imo, it should not catch exceptions at all, let them roll upwards instead and let the caller handle it.
Repository: flutter
Issue: Expose Skia Paint.getFillPath
Labels: c: new feature,engine,c: proposal,P3,team-engine,triaged-engine

Please expose Skia Paint getFillPath
https://skia.org/user/api/SkPaint_Reference#SkPaint_getFillPath

## Use case

Multiple, we can draw the stroke path outline, check point on path
Repository: flutter
Issue: [web] Virtual Keyboard on Raspberry Pi
Labels: a: text input,e: device-specific,d: stackoverflow,customer: crowd,platform-web,P3,team-web,triaged-web

I am still struggling with this issue.  I saw this issue that seemed somewhat related:

https://github.com/flutter/flutter/issues/32763

So if flutter web is used on an iphone, the virtual keyboard sounds like it will come up?  I'm wondering then how does flutter know when you're in an environment with or without a physical keyboard?  If I'm running in a web browser for example on a raspberry pi, and there is no keyboard plugged in (I haven't gotten hardware to try this yet...) then does the virtual keyboard come up?  

Is there a way to force flutter to think I do NOT have a physical keyboard?  If I test this on my laptop, the flutter web app works great with my physical keyboard, but I'd like to test with virtual and ultimately I want to us it on a pi with a touch screen so that may already work?
Repository: kubernetes
Issue: apiserver http healthcheck
Labels: sig/api-machinery,kind/feature,lifecycle/frozen

<!-- Please only use this template for submitting enhancement requests -->

**What would you like to be added**:

Apiserver endpoint serving `/healthz` over HTTP, no TLS.

**Why is this needed**:

Coming out of this issue: https://github.com/kubernetes/kubernetes/issues/43784

Running our own, self-signed PKI - we can only use TCP healthchecks for GCP LoadBalancer. It would be great to be able to point the LB healthcheck at a http port exposing the healthcheck.

/sig api-machinery
Repository: pytorch
Issue: RuntimeError: CUDA out of memory with available GPU memory
Labels: module: cuda,module: memory usage,triaged

I'm running Pytorch bert with adam optimizer. I get a CUDA OOM: 

`RuntimeError: CUDA out of memory. Tried to allocate 352.00 MiB (GPU 0; 7.92 GiB total capacity; 1.67 GiB already allocated; 156.00 MiB free; 124.28 MiB cached)`

but I actually I have some GiG available:

```
Traceback (most recent call last):
 File "train.py", line 156, in <module>
   train(model, train_iter, optimizer, criterion)
 File "train.py", line 29, in train
   optimizer.step()
 File "/usr/local/lib/python3.6/dist-packages/torch/optim/adam.py", line 77, in step
   state['exp_avg_sq'] = torch.zeros_like(p.data)
RuntimeError: CUDA out of memory. Tried to allocate 352.00 MiB (GPU 0; 7.92 GiB total capacity; 1.67 GiB already allocated; 156.00 MiB free; 124.28 MiB cached)
```

where when the error came out I had

```
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 418.87.01    Driver Version: 418.87.01    CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1080    On   | 00000000:01:00.0 Off |                  N/A |
| 73%   82C    P2   138W / 200W |   5560MiB /  8111MiB |     94%      Default |
+-------------------------------+----------------------+----------------------+
|   1  GeForce GTX 1080    On   | 00000000:03:00.0 Off |                  N/A |
| 66%   68C    P2   108W / 210W |   5261MiB /  8119MiB |     95%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      1264      G   /usr/lib/xorg/Xorg                            39MiB |
|    0      1461      G   /usr/bin/gnome-shell                          11MiB |
|    0     29120      C   python                                      5497MiB |
|    1     29607      C   python                                      5249MiB |
+-----------------------------------------------------------------------------+
```
Repository: bitcoin
Issue: Doc: Consolidate documentation of functional test parameters.
Labels: Feature,Docs,Tests

**Context:**

The `BitcoinTestFramework` test parameters are set in `set_test_params()`, but there are additional test [run-time settings](https://github.com/bitcoin/bitcoin/blob/master/test/functional/test_framework/test_framework.py#L134) which can be passed in through the command-line. The latter are documented with the command-line help strings. Note that there are command-line arguments which differ in naming compared to the class member where they are set:

	- `--tracerpc` vs `BitcoinTestFramework.options.trace_rpc`
	- `--portseed` vs `BitcoinTestFramework.options.port_seed`

The `TestShell` is a `BitcoinTestFramework` child class, and allows all test parameters to be passed in `setup(**test_args)`. The keys for `test_args` are identical to the respective parent class members to simplify argument forwarding.

	- `TestShell.setup(trace_rpc= …)` vs. `BitcoinTestFramework.options.trace_rpc`
	- `TestShell.setup(port_seed= …)` vs. `BitcoinTestFramework.options.port_seed`

However, by extension, `test_args` are now inconsistent with the command-line args of its parent class.

**Issue:**

The TestShell [documentation](https://github.com/bitcoin/bitcoin/blob/master/test/functional/test_framework/test_framework.py#L134) currently covers TestShell-specific argument keys, which don’t entirely translate to the BitcoinTestFramework documentation as mentioned above. It would be nice to find a way to neatly consolidate both in one place.
Repository: vscode
Issue: SCM - enable extensions to provide timeline information
Labels: feature-request,scm

Right now each SCM extension is responsible to provide own file history, e.g. gitlens has https://github.com/eamodio/vscode-gitlens#file-history-view-. But others, like for Mercurial don't have it. Even if it would have it won't provide coherent UX. Would it be possible to have built-in file history view which can be enhanced by scm extensions?
Repository: pytorch
Issue: Add instructions for building torch.distributed on macOS
Labels: oncall: distributed,module: docs,triaged

## 🐛 Bug

These instructions are missing and we should add them.

Basically:
* Install pkg-config
* Install libuv
* Compile with `USE_LIBUV=ON`

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528
Repository: go
Issue: go/types: investigate commit bdd0ff08 effect on type-checking outcome
Labels: NeedsInvestigation

Follow-up on #33279. Investigate impact of commit bdd0ff08 on this piece of code:
```Go
package pkg

func fn() {
	func(arg int) []int {
		_ = arg
		return nil
	}(0)[0]++
}
```
Repository: flutter
Issue: Consider listing only missing VS components
Labels: tool,platform-windows,a: desktop,a: build,P3,team-windows,triaged-windows

Currently when VS is missing any components needed for targeting Windows, we list all of them. This makes it harder for people to understand what exactly they are missing, especially given that there are so many cases where components differ only by version numbers. (See #44184 for an example, but it's happened a number of times.)

We should consider, for doctor output specifically, having a method that finds just the missing components. Unfortunately I'm not sure there's a good way to do that other than running the query once for each component separately, since the tool that lists all installed components isn't installed by default. We could look into potentially bundling/downloading that told though.
Repository: godot
Issue: TileSet methods `tile_get_texture(id).get_size()` and `tile_get_texture(id).get_data()` return wrong data
Labels: bug,topic:core,confirmed,topic:2d

**Godot version:**
 v3.2.beta1
**OS/device including version:**
Mac OS X Mojave

**Issue description:**
TileSet methods `tile_get_texture ( id ).get_size() `and `tile_get_texture ( id ).get_data()` return the complete TileSet size and texture, instead of the individual tile size and texture as specified by `id`.

**Steps to reproduce:**
Create a Node2d scene and add a TileMap node. Add the tileset sheet (see below) to the tilemap and edit, slicing out a couple of individual tiles. Add the script below to the TileMap node.

```python
extends TileMap

func _ready() -> void:
	var ts: TileSet=$".".tile_set
	var ids=ts.get_tiles_ids ( )
	var img: Image
	var texture: Texture
	for id in ids:
		print("id=",id, 
			", Name=",ts.tile_get_name ( id ),
			", Tile Region=",ts.tile_get_region ( id ),
			", Tile Size=",ts.tile_get_texture ( id ).get_size())
		img=ts.tile_get_texture ( id ).get_data()
		img.save_png("user://"+ts.tile_get_name ( id )+".png")
	pass # Replace with function body.
```

**I have selected three tiles from tilesheet below and I get this output:**
id=0, Name=tilesheet1.png 0, Tile Region=(0, 0, 64, 64), Tile Size=(1408, 768)
id=1, Name=tilesheet1.png 1, Tile Region=(64, 0, 64, 64), Tile Size=(1408, 768)
id=2, Name=tilesheet1.png 2, Tile Region=(128, 0, 64, 64), Tile Size=(1408, 768)

And each one of the saved png files is the complete tilesheet map instead of the individual tiles.

**Tilesheet Sample**

![image](https://user-images.githubusercontent.com/930478/68229757-ce856680-ffc5-11e9-9c48-5b278f00826b.png)
Repository: flutter
Issue: [web] Make `felt` rebuilds interruptible
Labels: engine,a: quality,platform-web,c: proposal,P3,team-web,triaged-web,e: engine-tool

When a file or multiple files change, the `felt build --watch` command automatically rebuilds the web engine sources. If during the rebuild, another file changes, that change will be queued and wait for the previous rebuild to complete before a new rebuild can start.

This issue is suggesting that we add support for interrupting a rebuild to start a new one immediately.
Repository: go
Issue: runtime: should checkptrArithmetic accept a uintptr instead of unsafe.Pointer?
Labels: NeedsInvestigation

Two instances of

```
runtime: bad pointer in frame runtime_test.testSetPanicOnFault at 0xc000206de0: 0x1
fatal error: invalid pointer found on stack
```

darwin-amd64-race: https://build.golang.org/log/05f53140b89337ef848d51e83ffb8e19aabd27e0
linux-amd64-race (trybot): https://storage.googleapis.com/go-build-log/7828558a/linux-amd64-race_de2789c5.log
Repository: flutter
Issue: "flutter logs" do not show logs on iOS 13+ physical device
Labels: c: regression,platform-ios,tool,P3,team-ios,triaged-ios

## Steps to Reproduce

1. Attach iOS 13+ device
2. `flutter logs`

No logs are printed.
See https://github.com/flutter/flutter/issues/41133
Repository: rust
Issue: Warn that  `*const T as *mut T` is Undefined Behavior
Labels: A-lints,T-lang,C-feature-request

Casting a `*const T` to `*mut T` may lead to memory corruption since it allows mutation of shared state. Even if the `*const T` happened to be unique, it is still undefined behavior and the optimizer may break such code in interesting ways. In a nutshell, this is as bad as transmuting a `&` into `&mut`. The compiler should warn against doing this.

*Update: as [pointed out below](https://github.com/rust-lang/rust/issues/66136#issuecomment-550003651), there are cases when that does not immediately trigger UB, but in those cases there is no reason to do this in the first place.*

This often occurs when people try to consume a data structure and create a new one from it, e.g. 

```rust
let new_slice = core::slice::from_raw_parts_mut(old_slice.as_ptr() as *mut B, len)
```
in which case the proper solution is to rewrite it as 

```rust
let new_slice = core::slice::from_raw_parts_mut(old_slice.as_mut_ptr(), len)
```

This also may happen when people try to mutate shared state through a `&`, in which case they need a `Cell`, `RefCell` or an `UnsafeCell` instead.

Playground with a real-world snippet that fails MIRI: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=b28a15e3d99616b03caafdd794550946

This pattern seems to be quite widespread - quoting @RalfJung on Zulip:

> I have seen at least 2 or 3 cases over the last few weeks for a const-to-mut raw ptr cast being the give-away for mutation of shared data

I have already requested [a Clippy lint](https://github.com/rust-lang/rust-clippy/issues/4774) for this, but this looks important enough to warn against by default, without relying on optional tooling to catch this.
Repository: go
Issue: cmd/go: document that go mod download -json uses exit code 1 when at least one JSON entry contains non-zero Error
Labels: Documentation,NeedsInvestigation,GoCommand

[`go mod download -json`](https://golang.org/cmd/go/#hdr-Download_modules_to_local_cache) documentation says:

> [...] The -json flag causes download to print a sequence of JSON objects to standard output, describing each downloaded module (or failure), corresponding to this Go struct:
>
> ```Go
> type Module struct {
> 	...
> 	Error string // error loading module
> 	...
> }
> ```

### What did you do?

I tried to execute `go mod download -json` and interpret its results programmatically.

### What did you expect to see?

I expected non-zero exit code to mean a fatal problem occurred and that I should not expect valid JSON output.

### What did you see instead?

There are 3 possible scenarios:

1. When there are no errors, `go mod download -json` emits exit code 0 and prints JSON.

2. When there are errors downloading some modules, `go mod download -json` emits exit code 1 and prints JSON that has some entries with non-empty Error fields.

    <details><summary>Example</summary><br>

    An example of such an error is when GOPROXY is set to off; it results in "module lookup disabled by GOPROXY=off" errors:

    ```
    $ cat go.mod
    module example.com/m
    require golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a
    $ echo $GOPROXY
    off
    $ go mod download -json
    {
    	"Path": "golang.org/x/sys",
    	"Version": "v0.0.0-20190215142949-d0b11bdaac8a",
    	"Error": "module lookup disabled by GOPROXY=off"
    }
    $ echo $?
    1
    ```

    </details>

3. When there are some other type of errors, `go mod download -json` emits exit code 1 and does not print JSON.

    <details><summary>Example</summary><br>

    Examples of other errors include a syntax error in the current go.mod file, or a replace directive pointing to a directory without a go.mod file.

    ```
    $ cat go.mod
    bad
    $ go mod download -json
    go: errors parsing go.mod:
    /tmp/issue35380/go.mod:1: unknown directive: bad
    $ echo $?
    1
    ```

    </details>

In two of the scenarios the exit code is 1. One of them emits JSON. That is challenging for a tool that needs to parse the output; it's hard to be sure it's safe to expect/parse JSON on stdout when exit code is non-zero.

/cc @jayconrod @bcmills @marwan-at-work
Repository: flutter
Issue: Retain cache when switching Flutter channels
Labels: c: new feature,tool,P3,team-tool,triaged-tool



## Use case
Sometimes I may need to switch from master to stable, which, in this case is unchanged, to test something out. In cases where I have no internet connection or slow or metered internet, this is either inconvenient or impossible. Further, it leaves flutter in an unusable state, since it seems that the previous data is erased. So now I'm stuck. 
<!--
     Please tell us the problem you are running into that led to you wanting
     a new feature.

     Is your feature request related to a problem? Please give a clear and
     concise description of what the problem is.

     Describe alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal
Can we have a flag to keep the latest versions of the SDK and binaries and only have them removed if upgrading and only after the upgrade has successfully replaced the old one?
<!--
     Briefly but precisely describe what you would like Flutter to be able to do.

     Consider attaching images showing what you are imagining.

     Does this have to be provided by Flutter directly, or can it be provided
     by a package on pub.dev/flutter? If so, maybe consider implementing and
     publishing such a package rather than filing a bug.
-->
Repository: go
Issue: crypto/cipher: optimize safeXORBytes
Labels: Suggested,Performance,help wanted,NeedsInvestigation

The discussion at https://github.com/golang/go/issues/31586 includes several techniques for optimizing xor of byte slices, including using encoding/binary (with native endianness) and loop unrolling. It'd be nice to apply them to `safeXORBytes`, which is used on many non-amd64 platforms. An optimized `safeXORBytes` might even be fast enough that we could delete `fastXORBytes`.

Somewhat related: #30553

cc @nhooyr
Repository: kubernetes
Issue: Remove handling of legacy firewall rule names in GCE ILB code
Labels: kind/bug,sig/network,area/platform/gce,area/provider/gcp,lifecycle/frozen

PR https://github.com/kubernetes/kubernetes/pull/84622 adds code to rename ILB rules using the right format. There is code to handle legacy firewall rules and rename/delete them. This needs to be removed after k8s 1.19 once all firewall rules have been created with the new name.

/area platform/gce
/assign
Repository: create-react-app
Issue:  Add support for webpackPrefetch
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

I would like to use `webpackPrefetch`:

    import(/* webpackPrefetch: true */ 'LoginModal');

### Additional context

https://github.com/facebook/create-react-app/issues/5925
Repository: pytorch
Issue: Add support for ivalue float scalars
Labels: oncall: jit,triaged

## 🚀 Feature
Currently ivalue only supports for double scalars, but we would like to use float scalars,

## Motivation

As our original data is in floats, so incurring conversion can cause tricky-to-debug issues and performance problems

## Pitch

Add  float (32 bit) constructor to ivalue, toFloatValue() etc.

## Alternatives
 
N/A

## Additional context

N/A

cc @suo