sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/cover: use different //line comment for code that does not come from source file
Labels: help wanted,NeedsFix,compiler/runtime

### What version of Go are you using (`go version`)?
go version go1.10.1 darwin/amd64

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?
GOARCH="amd64"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GORACE=""
GOTMPDIR=""
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/m6/vs051rl54k3_sgxr94ylcz5h0000gn/T/go-build238749509=/tmp/go-build -gno-record-gcc-switches -fno-common"

### What did you do?
```
git clone git@github.com:linzhp/go_examples.git
cd go_examples/hyphen
go tool cover -mode set -var Var_power-driven -o power-driven-gen.go power-driven.go
go run main.go
```

### What did you expect to see?
An error pointing to the right line of `power-driven-gen.go`

### What did you see instead?
`power-driven.go:7:14: expected ';', found '-'`

However, `power-driven.go` has less than 7 lines.
Repository: TypeScript
Issue: JSDoc referencing non-global class: Namespace 'X' has no exported member 'MyClass' 
Labels: Bug,Domain: JSDoc,Domain: JavaScript

**TypeScript Version:**  2.9.0-dev.20180430

**Code**

```js
class Circle {};
class Rectangle {};
const Shapes = {Circle, Rectangle};

// `Shapes` imported into another file

class Square extends Shapes.Rectangle {
    /**
     * @param {Shapes.Circle} circle
     */
    intersects(circle) {
        //
    }
}
```

Typecheck using:

```
tsc --checkjs --allowjs --noemit sample.js
```
**Actual behavior:**

```
sample.js(10,23): error TS2694: Namespace 'Shapes' has no exported member 'Circle'.
```
Repository: three.js
Issue: Optimization: Output flags on materials to avoid material switching for specialized outputs.
Labels: Suggestion

##### Description of the problem

So I am interested in quickly switching between different outputs of a shader without having to create new materials to just get different outputs.

One area in particular were this would be useful (there are many) is in the shadowing code.  It would allow us to not have to create a library of cached depth materials just for shadows.  Instead we could keep the original materials but just change the flag for an early out after writing the depth.  Basically it would deal with this complex caching situation here: https://github.com/mrdoob/three.js/blob/dev/src/renderers/webgl/WebGLShadowMap.js#L56

This is a huge time saver when you have complex shaders that have bones, displacement, normal maps, etc.

It would be an optional feature.  Something like:

```
#ifdef OUTPUT_FLAGS

#define OUTPUTFLAG_NONE 0x0000
#define OUTPUTFLAG_DIFFUSE_DIRECT 0x0001
#define OUTPUTFLAG_DIFFUSE_INDIRECT 0x0002
#define OUTPUTFLAG_DIFFUSE ( OUTPUTFLAG_DIFFUSE_INDIRECT | OUTPUTFLAG_DIFFUSE_DIRECT )
#define OUTPUTFLAG_SPECULAR_DIRECT 0x0004
#define OUTPUTFLAG_SPECULAR_INDIRECT 0x0008
#define OUTPUTFLAG_SPECULAR ( OUTPUTFLAG_SPECULAR_DIRECT | OUTPUTFLAG_SPECULAR_INDIRECT )
#define OUTPUTFLAG_ALBEDO 0x0016 // pre-shading value
#define OUTPUTFLAG_ALPHA 0x0016 // pre-shading value
#define OUTPUTFLAG_METALNESS 0x0016 // pre-shading value
#define OUTPUTFLAG_ROUGHNESS 0x0016 // pre-shading value
#define OUTPUTFLAG_SHADOW_DIRECT 0x0032
#define OUTPUTFLAG_SHADOW_INDIRECT 0x0064 // Include ambient
#define OUTPUTFLAG_LIGHT_DIRECT 0x0128
#define OUTPUTFLAG_NORMAL 0x0256  // Includes bump
#define OUTPUTFLAG_DEPTH 0x0512
#define OUTPUTFLAG_POSITION 0x1024

uniform int outputFlags;

#endif
```

It would also enable, as you can surmise by looking at my desired output flags, nice deferred workflows via multi-pass rendering.

I would implement it as a uniform flag so that we could change outputs without a recompile.  That is key to performance because I would like to switch each material multiple times per render.

PS. I wonder if there is a way to incorporate multi-target rendering in this somehow.  I just do not know how to specify optional packing of these outputs.  MAybe when there is multi-target support, we can specify multiple output flags?  Or that would just be a completely different type of output speification.

/ping @WestLangley @takahirox @tschw 

##### Three.js version

- [x] Dev

##### Browser

- [x] All of them

##### OS

- [x] All of them

##### Hardware Requirements (graphics card, VR Device, ...)
Repository: rust
Issue: Unhelpful borrowck error when wrong lifetimes are used
Labels: C-enhancement,A-diagnostics,A-lifetimes,A-borrow-checker,T-lang,D-confusing

Consider the following code:
```rust
fn run() -> () {
    let mut buf = [0u8; 1];
    let mut foo = Foo(&mut buf[..]);
    let _bar = foo.bar();
    foo.next();
}

pub struct Foo<'a>(&'a mut [u8]);
impl<'a> Foo<'a> {
    pub fn bar(&self) -> bool { true }
    pub fn next(&'a mut self) -> &'a () { unimplemented!(); }
}

impl<'a> Drop for Foo<'a> {
    fn drop(&mut self) { unimplemented!(); }
}
```

It does not currently compile. With NLL, it yields:
```
error[E0597]: `foo` does not live long enough
 --> x.rs:5:5
  |
5 |     foo.next();
  |     ^^^ borrowed value does not live long enough
6 | }
  | -
  | |
  | borrowed value only lives until here
  | borrow later used here, when `foo` is dropped
```
Without, it gives
```
error[E0597]: `foo` does not live long enough
 --> x.rs:5:5
  |
5 |     foo.next();
  |     ^^^ borrowed value does not live long enough
6 | }
  | - `foo` dropped here while still borrowed
  |
  = note: values in a scope are dropped in the opposite order they are created
```

Both of them also give a warning that `foo` does not need to be mutable, even though it does...

More importantly though, neither of these are particularly helpful in describing what the user did wrong. In particular, in this case, that `next` should have been
```rust
fn next<'b>(&'b mut self) -> &'b ()
```
The error is quite confusing, and it's not at all clear to the user that this error is related to the lifetime of `buf`!

Note that the error changes if either the `foo.bar()` or the `impl Drop for Foo` is removed.
Repository: rust
Issue: println!() prevents optimization by capturing pointers
Labels: A-LLVM,I-slow,C-enhancement,A-codegen,T-compiler,C-optimization

This weekend I ran some benchmarks on some of my code. After making a seemingly insignificant code change I noticed a small, but measurable performance regression. After investigating the generated assembly, I stumbled upon a case, where the compiler emits code that is not optimal.

This minimal example shows the same behaviour ([Playground link](https://play.rust-lang.org/?gist=0fd24dc477cc80a396c4db78ba605fe6&version=stable&mode=release)):
```
extern crate rand;

use std::f32;
use rand::Rng;

fn main() {
    let mut list = [0.0; 16];
    let mut rg = rand::thread_rng();

    // Random initialization to prevent the compiler from optimizing the whole example away
    for i in 0..list.len() {
        list[i] = rg.gen_range(0.0, 0.1);
    }

    let mut lowest = f32::INFINITY;

    for i in 0..list.len() {
        lowest = if list[i] < lowest {    // <<<<<<<<<<<<<<<
            list[i]
        } else {
            lowest
        };
    }

    println!("{}", lowest);
}
```

When compiling with the `--release` flag, the compiler generates the following instructions for the marked block:
```
...
minss	%xmm0, %xmm1
movss	88(%rsp), %xmm0
minss	%xmm1, %xmm0
movss	92(%rsp), %xmm1
...
```

However, if I replace those lines with the following:
```
if list[i] < lowest {
    lowest = list[i];
}
```
the compiler emits a strange series of float compare and jump instructions:
```
.LBB5_38:
	movss	92(%rsp), %xmm1
	ucomiss	%xmm1, %xmm0
	ja	.LBB5_39
...
.LBB5_42:
	movss	100(%rsp), %xmm1
	ucomiss	%xmm1, %xmm0
	ja	.LBB5_43
...
.LBB5_39:
	movss	%xmm1, 12(%rsp)
	movaps	%xmm1, %xmm0
	movss	96(%rsp), %xmm1
	ucomiss	%xmm1, %xmm0
	jbe	.LBB5_42
```

As a comparison, both gcc and clang can optimize a similar C++ example:
```
#include <stdlib.h>
#include <iostream>

using namespace std;

int main() {
    float list[16];
    for(size_t i = 0; i < 16; ++i) {
        list[i] = rand();
    }

    float lowest = 1000.0f;

    for (size_t i = 0; i < 16; ++i) {
        
        /* Variant A: */
        //lowest = list[i] < lowest ? list[i] : lowest;

        /* Variant B: */
        if (list[i] < lowest) {
            lowest = list[i];
        }
    }

    cout << lowest;
}
```
Both compilers generate `minss` instructions for both variants.
([Godbolt](https://godbolt.org/g/gJPXgU))

I wasn't sure whether rustc or LLVM were responsible for this behaviour, however after a quick glance at the generated LLVM IR, I'm tending towards rustc, since in the first case it emits `fcmp` and `select` instructions, while in the latter it generates `fcmp` and `br`.

What do you think?
Repository: pytorch
Issue: Check for F2C convention (for blas) at runtime
Labels: module: build,triaged

In `cmake/Modules/FindBLAS.cmake` we have a test to see if `sdot_` returns a float or a double (which may vary, depending on whether or not BLAS is compiled with the F2C convention or not.) However, in general, we *dynamically* link against our BLAS library, which means that it is possible that at runtime we get a BLAS library with a different convention than what we compiled with. This is bad.

A more robust solution would be to test the convention *at runtime*, so that we always make the correct selection.

CC @soumith 

cc @malfet @seemethere @walterddr
Repository: flutter
Issue: When generating golden files, catch the case of duplicate names
Labels: a: tests,team,framework,P2,team-framework,triaged-framework

Sometimes when writing a test you copy and paste a test to make a new variant, and as a result you end up having two parts of the test overwrite the same file. We should be able to catch that case.

cc @tvolkert
Repository: pytorch
Issue: DataParallel on list inputs
Labels: triaged,module: data parallel


https://github.com/pytorch/pytorch/blob/master/torch/nn/parallel/scatter_gather.py#L5
If your input is a list of two variables in which the first one has dimension 5 and the other 1.
This will create a single replica which only contains  the first 3 batches of the first variable.
Repository: TypeScript
Issue: Support for custom Automatic Type Acquisition scopes.
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

Automatic type acquisition scopes, custom type acquisition, acquire types from custom scope

## Suggestion

The ability to specify in `.tsconfig` and/or IDE settings additional scopes to search beyond `@types` for type acquisition.

## Use Cases

Private repositories with large amounts of JavaScript code and a small number of TypeScript developers who wish to produce accurate typings, and a high barrier to entry to modifying/adding declaration files to the JavaScript projects. This mirrors the public ecosystem with say, `react` and `@types/react`.

## Examples

A new string array parameter of scopes to search for:

```json
{
  "typeAcquisition": {
    "searchScopes": [
      "@companyname-types",
      "@types"
    ]
  }
}
```

This would also allow overriding the `@types` scope. The first scope with a matching declaration should win.

## 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: pytorch
Issue: [feature request] [PyTorch] Dynamic Samplers.
Labels: feature,module: dataloader,triaged

I am trying to implement Dynamic Samplers in Pytorch. This seems impossible with the existing train_loader api's. As the weighted the samplers only allow weights to be set once. I was thinking that weights could change based on the loss value for each and individual data point. This can be done without train_loader API but I think this a feature that could be included in a future release. 

Something as simple as Loss Based sampling can't be done right now.


cc @SsnL @VitalyFedyunin @ejguan
Repository: pytorch
Issue: [caffe2] Can I load the gpu data to cpu in .cu file?
Labels: caffe2

Can I load the gpu data to cpu in .cu file?
In caffe v1, we can use cpu_data() or gpu_data() to fectch data in different context. However, how to do that for caffe v2?
Repository: godot
Issue: When using placeholders, signals and groups are added to the InstancePlaceholder and lost when instancing
Labels: enhancement,topic:core,confirmed

**Godot version:**
3.x and v4.0

Tested on 3.4b3 and 4.0.dev.20210811.official [7188cb601]

**OS/device including version:**

**Issue description:**
Scenes set as placeholders in the scene tree, get the connections and groups set via the editor when the placeholder is added.
This means that there will be errors when the engine tries to connect non available signals and groups added to the placeholder too, both will be not available to the instances made from that placeholder.

I think this should be partially handled by the packed scene `instance()`, it needs to detect placeholders (I think it already do that) and `InstancePlaceholder` needs to have a way to store connections and groups to later assign to the instanced Nodes and not to the placeholder.

**Steps to reproduce:**
 - Set a scene as placeholder and connect it with some signal just available on that type of node.
 - Add that scene to a group too.

Run the game and see the connection error, instance that placeholder and see that connections and groups are not on the instanced node.

Project for Godot 3
[InstancePlaceholderSignalsG3.zip](https://github.com/godotengine/godot/files/6994990/InstancePlaceholderSignalsG3.zip)

Project for Godot 4
[InstancePlaceholderSignalsG4.zip](https://github.com/godotengine/godot/files/6994992/InstancePlaceholderSignalsG4.zip)
Repository: pytorch
Issue: nn.DataParallel fills None grads with 0
Labels: triaged,module: data parallel

On pytorch 0.4.0, using nn.DataParallel leads to grads of parameters not used being filled with 0. This is a problem when the model has many parameters but only small part of it is used in forward.

Test:
```python
import torch
from torch import nn
class Test(nn.Module):
    def __init__(self):
        super(Test, self).__init__()
        self.l1 = nn.Linear(10,10)
        self.l2 = nn.Linear(10,10)

    def forward(self, input):
        return self.l1(input)

print('CPU:')
net = Test()
inputs = torch.randn(1,10)
outputs = net(inputs)
loss = torch.norm(outputs)
loss.backward()
for j,p in net.named_parameters():
    if p.grad is not None:
        print(j, p.shape, torch.norm(p.grad))
    else:
        print(j)
print('GPU:')
net = Test().to('cuda')
inputs = torch.randn(1,10).to('cuda')
outputs = net(inputs)
loss = torch.norm(outputs)
loss.backward()
for j,p in net.named_parameters():
    if p.grad is not None:
        print(j, p.shape, torch.norm(p.grad))
    else:
        print(j)
print('MultiGPU:')
net = nn.DataParallel(Test().to('cuda'))
inputs = torch.randn(1,10).to('cuda')
outputs = net(inputs)
loss = torch.norm(outputs)
loss.backward()
for j,p in net.module.named_parameters():
    if p.grad is not None:
        print(j, p.shape, torch.norm(p.grad))
    else:
        print(j)
```
For multi GPU we see all grads are filled with zeros. For CPU and GPU the grads are None.
Repository: opencv
Issue: Different result of fisheye::stereoRectify
Labels: incomplete

##### System information (version)
- OpenCV  3.4, 2.4.11
- Operating System / Platform =>Ubuntu 14.04 64 Bit and macOS 10
- Compiler => gcc 4.8.4

##### Detailed description

##### Steps to reproduce

Just as test in https://github.com/AHoveringFish/fisheye_stereo_rectify.git
The outputs of mac(on which opencv is brew install) and Ubuntu(on which opencv is compilied with source code) are different.
Repository: pytorch
Issue: [Caffe2] Can't use resnet50_trainer.py through redis.
Labels: caffe2

## Issue description
I was trying to use resnet50_trainer.py to do distributed training.
However, I encountered this problem.

> RuntimeError: [enforce fail at operator.cc:185] op. Cannot create operator of type 'RedisStoreHandlerCreate' on the device 'CPU'. Verify that implementation for the corresponding device exist. It might also happen if the binary is not linked with the operator implementation code. If Python frontend is used it might happen if dyndep.InitOpsLibrary call is missing. Operator def: output: "store_handler" name: "" type: "RedisStoreHandlerCreate" arg { name: "host" s: "192.168.1.24" } arg { name: "prefix" s: "1" } arg { name: "port" i: 6379 }

I am able to run resnet50_trainer.py on single machine, 
and I'm able to connect to the redis host through 
`redis-cli -h 192.168.1.24 -p 6379`
Please give me some help.

## Code example
python resnet50_trainer.py --train_data /home/cch/Downloads/Downloads/imagenet_cars_boats_train/ --batch_size 1 --run_id 1 --redis_host 192.168.1.24 --redis_port 6379 --num_shards 2 --shard_id 1


- PyTorch or Caffe2:
- How you installed PyTorch (conda, pip, source):source
- Build command you used (if compiling from source): cmake .. -DCUDA_ARCH_NAME=Manual -DCUDA_ARCH_BIN="50" -DCUDA_ARCH_PTX="50" -DUSE_NNPACK=OFF -DUSE_ROCKSDB=OFF -DUSE_GLOO=ON -DUSE_REDIS=ON -DUSE_IBVERBS=ON -DUSE_MPI=OFF
- OS:Centos6.9
- Python version:2.7.14
- CUDA/cuDNN version:9.0/7.0
- GCC version (if compiling from source):4.8.5
- CMake version:3.11.1
Repository: TypeScript
Issue: fixUnusedIdentifier may remove a used side-effect
Labels: Suggestion,Needs Proposal,Domain: Quick Fixes

**TypeScript Version:**  2.9.0-dev.20180506

**Code**

```ts
{ const x = launchMissiles(); }
```

**Expected behavior:**

`const x = ` removed, and missiles still launched.

**Actual behavior:**

Missiles unlaunched.

Unfortunately we have no way of knowing whether a function call does have side effects (#17181), so doing this in general might be annoying as users have to manually delete function calls with unused results.
Repository: godot
Issue: New signal methods in C# are declared outside of its class, making the script invalid
Labels: bug,topic:editor,confirmed,usability,topic:dotnet

*Bugsquad edit: This long standing issue is still valid as of Godot 4.2. It doesn't need further confirmation, but feel free to :+1: the OP to confirm it affects you. Any help welcome to solve this, it's something the .NET team is having difficulty fixing properly, but it's recognized as a major usability issue.*

---

**Godot version:**
3.0.3 rc1 Mono Build

**Issue description:**
When using the editor to connect a signal to a C# script, the new method declaration is added to the end of the file, and outside of the class.  It should instead add the new method just before the final closing brace.

**Steps to reproduce:**
1. Create a button node. 
2. Attach a new C# script to this node.
3. Select the button in the editor, choose Node -> Signals
4. Select the "pressed()" signal and click connect.
5. Choose the same button as the "Node to Connect." Leave everything default and hit connect.
6. Notice that the new method is created outside of the class.

Example:
```cs
using Godot;
using System;

public class btn_move : Button
{
    public override void _Ready()
    {
    }
} //End of class


private void _on_Button_pressed()
{
    // Replace with function body
}
```

This is a low priority issue as the easy workaround is to just move the closing brace of the class, but this creates invalid code and could be confusing.
Repository: flutter
Issue: Create a build with Flutter Fastlane action 
Labels: tool,P3,team-tool,triaged-tool

https://docs.fastlane.tools/actions/#building

Create one to build an Android and/or iOS app via Fastlane. For simplicity, it can initially just aggregate build_ios_app and build_android_app with parameters from both.
Repository: go
Issue: cmd/compile: tweak branchelim heuristic on amd64
Labels: Performance,compiler/runtime

### What version of Go are you using (`go version`)?
master:
```go version devel +cd1976d Tue May 8 19:57:49 2018 +0000 linux/amd64```

### Does this issue reproduce with the latest release?
Yes

### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOCACHE="/localdisk/itocar/gocache/"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/localdisk/itocar/gopath"
GORACE=""
GOROOT="/localdisk/itocar/golang"
GOTMPDIR=""
GOTOOLDIR="/localdisk/itocar/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build948974604=/tmp/go-build -gno-record-gcc-switches"
```

### What did you do?
Run strconv/Atof benchmarks

### What did you expect to see?
Same or better performance as 1.10

### What did you see instead?
```
Atof64Decimal-8       20.9ns ± 1%  20.3ns ± 2%   -3.11%  (p=0.000 n=10+10)
Atof64Float-8         22.9ns ± 1%  23.1ns ± 2%   +0.83%  (p=0.042 n=10+10)
Atof64FloatExp-8      56.3ns ± 3%  68.8ns ± 2%  +22.11%  (p=0.000 n=10+10)
Atof64Big-8           84.0ns ± 1%  94.0ns ± 1%  +11.91%  (p=0.000 n=10+10)
Atof64RandomBits-8    72.9ns ±15%  80.5ns ±24%  +10.47%  (p=0.022 n=10+9)
Atof64RandomFloats-8  80.2ns ±25%  91.6ns ±19%  +14.27%  (p=0.029 n=10+10)
Atof32Decimal-8       20.1ns ± 2%  20.5ns ± 2%   +1.59%  (p=0.008 n=10+10)
Atof32Float-8         21.5ns ± 3%  21.9ns ± 3%   +2.09%  (p=0.012 n=10+10)
Atof32FloatExp-8      58.6ns ± 3%  68.2ns ± 2%  +16.49%  (p=0.000 n=10+10)
Atof32Random-8        93.8ns ± 0%  86.4ns ± 0%   -7.83%  (p=0.000 n=10+8)
```
Bisects points to a35ec9a59e29dc11a15ded047a618298a59599b4 

Looking at code I see that (*extFloat).Normalize got slower, probably because branches were well predicted, and most instruction are dependent on a result of branch.

It looks like heuristic for generating CMOV should be tweaked, but I'm not sure how. Current threshold is low and reducing it further will cause performance impact in other cases. Maybe we should avoid generating long chain of dependent CMOVs?
Repository: kubernetes
Issue: Export metrics for precidates restrictiveness
Labels: sig/scheduling,lifecycle/frozen

Currently users do not have any metrics on predicates restrictiveness (i.e capacity of a predicate to filter potential target nodes). The idea is to provide a metric each time the predicate is computed.
This (And how handle ordering predicates in general) might be impacted by the new scheduling framework.

cc @bsalamat @resouer 

/sig scheduling