sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: OpenCL support for smartphones
Labels: triaged

## 🚀 Feature
OpenCL can be used to run AI at Mali GPUs present in top Exynos ARM chips in smart phones. I would be nice to run simple NN like [MTCNN](https://kpzhang93.github.io/MTCNN_face_detection_alignment/) locally without sending images to cloud.

## Motivation

OpenCL is supported by many top smart phones.

## Pitch

It would be nice to used embedded GPUs for AI.

## Alternatives

There is already some implementation of OpenCL tested at Mali GPUs here:

https://github.com/pmarcinkiew/pytorch/tree/opencl_release_1.0

You just need flag for OpenCL:
```
cmake . -DUSE_OPENCL=ON

```
It is necessary to have OpenCL libraries in your system for it to work correctly.
## Additional context

There is some OpenCL code already here:
https://github.com/pytorch/pytorch/tree/master/caffe2/contrib/opencl

but it doesn't compile by default and there are not operators (e.g. convolution)
Repository: vscode
Issue: Setup has detected that setup is currently running
Labels: bug,install-update,windows


Issue Type: <b>Bug</b>

Unexpected since I did not run any setup myself. Shortly before that the (1) badge showed up on the gear icon.

![image](https://user-images.githubusercontent.com/9205389/47920110-8236b080-deb1-11e8-93d5-ab2a3839552c.png)


VS Code version: Code - Insiders 1.29.0-insider (220bff273eed39013f24b6d26fc17f2a742ce10f, 2018-11-02T06:18:20.695Z)
OS version: Windows_NT x64 10.0.17134

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (4 x 2195)|
|GPU Status|2d_canvas: enabled<br>checker_imaging: disabled_off<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>native_gpu_memory_buffers: disabled_software<br>rasterization: unavailable_software<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgl2: enabled|
|Memory (System)|5.98GB (2.91GB free)|
|Process Argv|--inspect-extensions=51039|
|Screen Reader|no|
|VM|100%|

</details><details><summary>Extensions (15)</summary>

Extension|Author (truncated)|Version
---|---|---
remotehub|eam|0.2.0
EditorConfig|Edi|0.12.5
vscode-azureappservice|ms-|0.9.1
vscode-azurefunctions|ms-|0.12.0
vscode-azurestorage|ms-|0.4.2
vscode-cosmosdb|ms-|0.8.0
azure-account|ms-|0.4.3
azurecli|ms-|0.4.2
csharp|ms-|1.17.0
github-issues-prs|ms-|0.9.1
vscode-node-azure-pack|ms-|0.0.4
azurerm-vscode-tools|msa|0.4.2
debugger-for-chrome|msj|4.10.2
vscode-docker|Pet|0.3.1
vscode-open-in-github|sys|1.7.0


</details>
<!-- generated by issue reporter -->
Repository: go
Issue: cmd/link: suspicious use of (*cmd/internal/bio/buf.Reader).Seek
Labels: help wanted,NeedsInvestigation,compiler/runtime

While a running a recent test of vet, it flagged the (*buf.Reader).Seek method as not having a proper return type (int64, error). Instead it handles errors by calling log.Fatal, yet most callers of this function seem to assume it returns a negative number to indicate failure.

Someone who knows this code should probably audit it.
Repository: TypeScript
Issue: Typeguards with destructuring parameters
Labels: Suggestion,Awaiting More Feedback

## Search Terms

Typeguard
type narrowing
destructuring

## Suggestion

It'd be nice to be able to have typeguard functions with destructuring arguments.

## Use Cases

When manipulating tuples or other anonymous structured types, whose typeguard relies only on a small part of the object, it would make the code much easier to read.
Currently, typeguards cannot be used with destructuring arguments, which makes it a weird special case.

## Examples

```ts
const val: Array<[string, boolean]> = ([] as Array<[string | undefined, boolean]>)
    .filter(([foo, bar]: [string | undefined, boolean]): [foo, bar] is [string, boolean] => foo !== undefined);

const val2: Array<[string, boolean]> = ([] as Array<[string | undefined, boolean]>)
    .filter((val: [string | undefined, boolean]): val is [string, boolean] => val[0] !== undefined);
```

https://www.typescriptlang.org/play/index.html#src=const%20val%3A%20Array%3C%5Bstring%2C%20boolean%5D%3E%20%3D%20(%5B%5D%20as%20Array%3C%5Bstring%20%7C%20undefined%2C%20boolean%5D%3E)%0D%0A%20%20%20%20.filter((%5Bfoo%2C%20bar%5D%3A%20%5Bstring%20%7C%20undefined%2C%20boolean%5D)%3A%20%5Bfoo%2C%20bar%5D%20is%20%5Bstring%2C%20boolean%5D%20%3D%3E%20foo%20!%3D%3D%20undefined)%3B%0D%0A%0D%0Aconst%20val2%3A%20Array%3C%5Bstring%2C%20boolean%5D%3E%20%3D%20(%5B%5D%20as%20Array%3C%5Bstring%20%7C%20undefined%2C%20boolean%5D%3E)%0D%0A%20%20%20%20.filter((val%3A%20%5Bstring%20%7C%20undefined%2C%20boolean%5D)%3A%20val%20is%20%5Bstring%2C%20boolean%5D%20%3D%3E%20val%5B0%5D%20!%3D%3D%20undefined)%3B%0D%0A%0D%0Aconst%20val3%3A%20string%5B%5D%20%3D%20(%5B%5D%20as%20Array%3Cstring%20%7C%20undefined%3E)%0D%0A%20%20%20%20.filter((foo%3F%3A%20string)%20%3D%3E%20foo%20!%3D%3D%20undefined)%3B%0D%0A

## Checklist

My suggestion meets these guidelines:
* [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. new expression-level syntax)
Repository: scrcpy
Issue: Multi-tasking windows 
Labels: feature request

It would be great to be able to display each app in a separate window, similarly to Samsung DeX/Sentio/etc.
Repository: vscode
Issue: Not searching some files that aren't in an open folder
Labels: bug,info-needed,search,confirmed

Issue Type: <b>Bug</b>

I've been having this problem for a few weeks - it used to work correctly. I have tested without extensions and it still occurs.

 I open a set of log files (not a folder) and want to search all of them for errors. There are files with *.err file extensions which are repeatedly not getting searched in unless I click to focus them.

Precondition:
  * Create some log files, including one named 'Daily_MR_EX_Load_20181102.err'  with some text contents

Steps:
  * Open VSCode
  * Select several log files (including the one above) and drag them into the VSCode program window
  * Without focusing on the .err log file, search for text that it should contain. It should not appear in the results.
  * Then, focus on the .err file
  * Search again, and the results should change.

![vscode-search-not-working](https://user-images.githubusercontent.com/4432847/47927908-d164ed00-de81-11e8-899d-53a16db8a340.gif)

VS Code version: Code - Insiders 1.29.0-insider (9b2a7f4a83ca6a2d495463276a21157f398b41e7, 2018-11-02T13:42:21.142Z)
OS version: Windows_NT x64 10.0.15063

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|AMD A8-7650K Radeon R7, 10 Compute Cores 4C+6G  (4 x 3292)|
|GPU Status|2d_canvas: enabled<br>checker_imaging: disabled_off<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>native_gpu_memory_buffers: disabled_software<br>rasterization: enabled<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgl2: enabled|
|Memory (System)|14.94GB (4.25GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|

</details><details><summary>Extensions (6)</summary>

Extension|Author (truncated)|Version
---|---|---
gitlens|eam|8.5.6
gc-excelviewer|Gra|2.1.26
git-tree-compare|let|1.4.0
rainbow-csv|mec|0.7.1
mssql|ms-|1.4.0
vscode-spotify|shy|3.0.4


</details>
<!-- generated by issue reporter -->
Repository: vscode
Issue: Keyboard Shortcuts Ide Tab and Browser Pdf Shift+Alt+... entries
Labels: feature-request,keybindings,windows


Issue Type: <b>Bug</b>

The Keyboard Shortcuts ide tab [ Ctrl+K Ctrl+S ] and browser pdf [ Ctrl+K Ctrl+R ] references have a bunch of Shift+Alt+... entries.  For whatever mental reason I, and i'm guessing others, find these really confusing given historically we are used to seeing keyboard shortcuts involving use of Shift key listed as Ctrl+Shift+... and Alt+Shift+....  My recommendation here is that the 1/2 dozen Shift+Alt+... entries i'm seeing in these keyboard shortcut references be updated to use the more expected Alt+Shift+... format unless there was an intentional reason for using non-typical ordering.

VS Code version: Code 1.28.2 (7f3ce96ff4729c91352ae6def877e59c561f4850, 2018-10-17T00:23:51.859Z)
OS version: Windows_NT x64 10.0.17763

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2112)|
|GPU Status|2d_canvas: enabled<br>checker_imaging: disabled_off<br>flash_3d: enabled<br>flash_stage3d: enabled<br>flash_stage3d_baseline: enabled<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>native_gpu_memory_buffers: disabled_software<br>rasterization: enabled<br>video_decode: enabled<br>video_encode: enabled<br>webgl: enabled<br>webgl2: enabled|
|Memory (System)|15.85GB (6.41GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|

</details><details><summary>Extensions (6)</summary>

Extension|Author (truncated)|Version
---|---|---
vscode-css-formatter|aes|1.0.1
vbscript|Dar|1.0.4
nightswitch-lite|gha|2.2.1
csharp|ms-|1.17.0
vsliveshare|ms-|0.3.897
team|ms-|1.142.0


</details>
<!-- generated by issue reporter -->
Repository: rust
Issue: Run specific test by fully qualified name
Labels: C-enhancement,A-libtest,T-testing-devex

Suppose I have two test targets:

1. tests/tests1.rs
```rust
#[test]
fn test1() {
    panic!()
}

#[test]
fn test2() {}
```

2. tests/tests2.rs
```rust
#[test]
fn test1() {}

#[test]
fn test2() {
    panic!()
}
```

I want to run only test1 from tests1 and test2 from tests2. The `--exact` option doesn't help me in this case.

I want to have some option to run a specific test, like this:
```
cargo test --no-fail-fast --test tests1 --test tests2 -- --fqn tests1::test1 --fqn tests2::test2
```
Repository: TypeScript
Issue: Allow setters to return
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.

-->

## Search Terms
Setters cannot return a value
decorators

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion
By default JavaScript does nothing with the return value of a setter, but it isn't an error.

Allow setters to return as the default behaviour and add flag to turn errors on.

<!-- A summary of what you'd like to see added or changed -->

## Use Cases
- Decorators that override the setter and use the original setters return value. 
- Methods that directly call the setter function and expect a return.

<!--
What do you want to use this for?
What shortcomings exist with current approaches?
-->

## Examples
A live example would be [`@computed` from ember-decorators](http://ember-decorators.github.io/ember-decorators/latest/docs/api/modules/@ember-decorators/object#computed), which matches the old behaviour from [ember](https://guides.emberjs.com/release/object-model/computed-properties/#toc_setting-computed-properties).

Code example using legacy decorators (same would be possible with stage 2 decorators):
```ts
function saved (target: {}, key: string | symbol, descriptor: PropertyDescriptor) {
  const savedStore = new WeakMap();

  const oldSet = descriptor.set;
  if (!oldSet) {
    throw new Error('Must be used on setter only');
  }
  const oldGet = descriptor.get;
  return {
    ...descriptor,
    get () {
      let response = savedStore.get(this);
      if (!response && oldGet) {
        response = oldGet.call(this);
      }
      return response;
    },
    set (value: any) {
      const result = oldSet.call(this, value);
      savedStore.set(this, result);
    }
  };
}

class Foo {
  @saved
  get square () {
    // default value of 1 if none is saved
    return 1;
  }
  set square (value: number) {
    return value * value;
  }
}
```

<!-- Show how this would be used and what the behavior would be -->

## Checklist

My suggestion meets these guidelines:
* [x] This wouldn't be a breaking change in existing TypeScript / JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. new expression-level syntax)
Repository: rust
Issue: Tracking issue for `trait alias` implementation (RFC 1733)
Labels: A-trait-system,B-unstable,B-RFC-implemented,C-tracking-issue,S-tracking-needs-summary,T-types,S-types-deferred

This is the tracking issue for **implementing** (*not* discussing the design) RFC https://github.com/rust-lang/rfcs/pull/1733. It is a subissue of https://github.com/rust-lang/rust/issues/41517.

## Current status

Once #55101 lands, many aspects of trait aliases will be implemented. However, some known limitations remain. These are mostly pre-existing limitations of the trait checker that we intend to lift more generally (see each case below for notes).

**Well-formedness requirements.** We currently require the trait alias to be well-formed. So, for example, `trait Foo<T: Send> { } trait Bar<T> = Foo<T>` is an error. We intend to modify this behavior as part of implementing the implied bounds RFC (https://github.com/rust-lang/rust/issues/44491). 

**Trait object associated types.** If you have `trait Foo = Iterator<Item =u32>`, you cannot use the trait object type `dyn Foo`. This is a duplicate of https://github.com/rust-lang/rust/issues/24010.

**Trait object equality.** If you have `trait Foo { }` and `trait Bar = Foo`, we do not currently consider `dyn Foo` and `dyn Bar` to be the same type. Tracking issue https://github.com/rust-lang/rust/issues/55629.

## Pending issues to resolve

 - [x] https://github.com/rust-lang/rust/issues/56006 - ICE when used in a library crate

## Deviations and/or clarifications from the RFC 

This section is for us to collect notes on deviations from the RFC text, or clarifications to unresolved questions.

## PR history

- [x] https://github.com/rust-lang/rust/pull/45047 by @durka 
- [x] https://github.com/rust-lang/rust/pull/55101 by @alexreg 

## Other links

- Test scenarios drawn up by @nikomatsakis from the RFC: [gist](https://gist.github.com/nikomatsakis/e4dd2807581fc868ba308382855e68f6)
Repository: rust
Issue: trait alias `dyn` type equality doesn't work
Labels: A-trait-system,T-compiler,C-bug

If you have `trait Foo { }` and `trait Bar = Foo`, we do not currently consider `dyn Foo` and `dyn Bar` to be the same type.

Subissue of https://github.com/rust-lang/rust/issues/55628
Repository: TypeScript
Issue: infer-from-usage should infer "truthy" when only undefined is available
Labels: Bug,Domain: Quick Fixes

```ts
function f(x, y) {
    if (y) {
        x = 1
    }
    return x
}
f(2)
```

**Expected behavior:**
Run infer-from-usage and get `x: number, y?: boolean | undefined`

**Actual behavior:**
`x: number, y?: undefined`
Repository: go
Issue: cmd/compile: cleanup compiler flag processing
Labels: Suggested,NeedsFix,compiler/runtime

There are (at least) 3 ways in which compiler flags are internally specified and processed. It's a mess. Should clean up and provide a more systematic way of dealing with flags.
Repository: TypeScript
Issue: Can we cut down on `Object.assign` overloads?
Labels: Suggestion,Needs Proposal

[We can convert unions into intersections](https://stackoverflow.com/questions/50374908/transform-union-type-to-intersection-type) (thanks @jcalz!), and we can model variadic args pretty well, so I figured I'd try to model `Object.assign` with a single overload. Here's what I came up with:

```ts
// Maps elements of a tuple to contravariant inference sites.
type MapContravariant<T> = {
    [K in keyof T]: (x: T[K]) => void
}

type TupletoIntersection<T, Temp = MapContravariant<T>> =
    // Ensure we can index with a number.
    Temp extends Record<number, unknown>
        // Infer from every element now.
        ? Temp[number] extends (x: infer U) => unknown ? U : never
        : never;

declare function assign<T extends object, Rest extends object[]>(
    x: T,
    ...xs: Rest
): T & TupletoIntersection<Rest>;
```

Unfortunately this doesn't quite give the right results on the following:

```ts
let asdf = assign({x: "hello"}, Math.random() ? {x: "hello"} : {z: true });
```

Currently the type of `asdf` is:

```
| ({ x: string; } & { x: string; z?: undefined; })
| ({ x: string; } & { z: boolean; x?: undefined; })
```

What a beautiful type! Unfortunately you can see that the second element of the union tries to intersect types with conflicting properties for `x` which is nonsense.

Additionally, @weswigham pointed out that this really won't work for the case where you started off with just a plain array whose elements are eventually spread into `Object.assign`.

I do wonder if there's anything better we can do here.
Repository: terminal
Issue: Problems with font "zooming"
Labels: Product-Conhost,Area-Interaction,Issue-Bug

The first problem is that there's no way to reset it to "100%" -- Frankly, my suggestion is that you should support hotkeys like browsers do: 
- `{Ctrl}+{=}` to zoom in 
- `{Ctrl}+{-}` to zoom out 
- `{Ctrl}+{0}` to reset it to normal...

The second problem is that zooming resizes the window -- which is particularly frustrating when scrolling sends parts of the window off-screen, even though I started out _snapped_ to an edge or corner.

When the window is snapped to the screen edges, the system sizes the window to the screen size, rather than a multiple of the CHARACTER size -- so if the font isn't exactly the perfect size for that, it's forced.  The problem is that if I zoom in, and zoom back out ... it doesn't go back to the _original size_, but instead to the nearest size based on the font!

So if I start out at this size (note the awkward space between the blue timestamp and the scroll bar due to snapping the window):
![image](https://user-images.githubusercontent.com/192942/47948181-3bbd7200-df02-11e8-890a-5559da6bea2c.png)

When I zoom in and zoom back out (or vice-versa) it ends up with that awkward space on the _outside_ of the window:
![image](https://user-images.githubusercontent.com/192942/47948199-82ab6780-df02-11e8-83f1-b356a52658cd.png)

Recorded in action: https://i.imgur.com/nux7AqY.gifv

I *hoped* that unchecking the "Let system position window" in the layout would stop it from doing that, but no such luck. Can we get an extra option in there to control whether zooming resizes the window, or changes the number of characters in the window instead?
Repository: go
Issue: go/types: problem with alias type
Labels: NeedsInvestigation,early-in-cycle

The following code
```Go
package p

type F = func(T)

type T interface {
	m(F)
}

type t struct{}

func (t) m(F) {}

var _ T = &t{}
```
doesn't type-check:
```
y.go:13:11: cannot use &(t literal) (value of type *t) as T value in variable declaration: wrong type for method m
```
but the code is correct (replacing F with func(T) everywhere works).
Repository: rust
Issue: Matching on four consecutive bytes not optimized to matching on unaligned u32
Labels: A-LLVM,I-slow,T-compiler

[Godbolt link](https://rust.godbolt.org/z/zmalWt)

Input
```rust
pub fn check(buf: &[u8]) -> bool {
    if buf.len() < 4 {
    	return false;
    }
    match (buf[0] | 0x20, buf[1] | 0x20, buf[2], buf[3]) {
    	(b'a', b'b', b'+', b'-') => {
            true
        },
    	_ => {
    		false
    	}
    }
}

pub fn check_case_sensitive(buf: &[u8]) -> bool {
    if buf.len() < 4 {
    	return false;
    }
    match (buf[0], buf[1], buf[2], buf[3]) {
    	(b'a', b'b', b'+', b'-') => {
            true
        },
    	_ => {
    		false
    	}
    }
}
```

Output
```asm
example::check:
        cmp     rsi, 3
        ja      .LBB0_2
        xor     eax, eax
        ret
.LBB0_2:
        mov     al, byte ptr [rdi]
        mov     cl, byte ptr [rdi + 1]
        or      al, 32
        or      cl, 32
        mov     dl, byte ptr [rdi + 2]
        mov     sil, byte ptr [rdi + 3]
        xor     al, 97
        xor     cl, 98
        or      cl, al
        xor     dl, 43
        or      dl, cl
        xor     sil, 45
        or      sil, dl
        sete    al
        ret

example::check_case_sensitive:
        cmp     rsi, 3
        ja      .LBB1_2
        xor     eax, eax
        ret
.LBB1_2:
        mov     sil, byte ptr [rdi]
        mov     cl, byte ptr [rdi + 1]
        mov     dl, byte ptr [rdi + 2]
        mov     al, byte ptr [rdi + 3]
        xor     sil, 97
        xor     cl, 98
        or      cl, sil
        xor     dl, 43
        or      dl, cl
        xor     al, 45
        or      al, dl
        sete    al
        ret
```

Expected there to be a single unaligned 32-bit load. Excepted the masking in the first function to be done on a 32-bit value using a 32-bit constant. Expected the comparison to be done with a 32-bit constant.
Repository: rust
Issue: Support for Moxie Virtual CPU
Labels: A-LLVM,T-compiler,C-feature-request

I would like to build a project that runs on the [Moxie Virtual CPU](http://moxielogic.org/blog/pages/about.html) which runs a PowerPC. Moxie has a complete GNU toolchain for C/C++ development. Furthermore there is already a target `powerpc-unknown-linux-gnu` which seems applicable to this situation.

My question is whether rust already supports Moxie and how I would go about using it.