sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Allow attr batching like #[attr1, attr2, attr3] and #[cfg_attr(cond, attr1, attr2, attr3)]
Labels: A-attributes,T-lang,C-feature-request

It would be useful / convenient if the compiler would allow batching attrs like `#[attr1, attr2, attr3]` and especially with `cfg_attr` like `#[cfg_attr(cond, attr1, attr2, attr3)]`, it would really reduce the verbosity of using `cfg_attr` (and normal attrs, too).

E.g. it would allow writing:
```rust
#[cfg_attr(feature = "default", derive(Identifiable, AsChangeset))]
#[cfg_attr(feature = "default", table_name = "mytable")]
```
As one line:
```rust
#[cfg_attr(feature = "default", derive(Identifiable, AsChangeset), table_name = "mytable")]
```

Also, I often use the [getset crate](https://github.com/Hoverbear/getset) and it currently requires writing: 
```rust
#[get = "pub"] 
#[set] 
#[get_mut] 
field: Ty;
```
when I need these accessors for a field. With batching it would be shorter:
```rust
#[get = "pub", set, get_mut]
field: Ty;
```

And a lot of similar use cases would be less verbose with attr batching, too :)

---

Btw, currently `#[cfg_attr(cond, attr1, attr2)]` is not a parse error if the `cond` is false, but currently it probably should be (?)

Compare:
https://play.rust-lang.org/?gist=2de03f428468bafaab00376a75e66119&version=stable&mode=debug&edition=2015
and:
https://play.rust-lang.org/?gist=0bba1cc58221c6dadc3b48c61c9ce6b6&version=stable&mode=debug&edition=2015
Repository: godot
Issue: Changing energy of  Light2D node with AnimationPlayer requires clickthrough of Node in editor to reset after playing project
Labels: bug,topic:editor

Godot v3.05
Windows 10

When using AnimationPlayer to change Energy of Light2D node, failure to click the AnimationPlayer node in project (not change anything, simply clicking the node) in-between project plays seems to cause the Energy animation track not to function during the next project play, while all other animation tracks in the animation work as expected.

Steps to replicate:
Create animation with multiple tracks, one containing keyframes that alter the Energy value of a Light2D node with track settings continuous, linear, and wrap loop.

Play project.

Play project again; Light2D node animation does not function as expected if at all.

Click AnimationPlayer in editor. Do not change anything.

Play project again and Light2D node animation plays as expected.
Repository: vscode
Issue: [scss] Breadcrumbs in scss file not working for multi-line selectors
Labels: bug,css-less-scss

Issue Type: <b>Bug</b>

Having `scss` file:
```scss
.btn,
.link {
    &.another-class {

    }
    &.classs {

    }
}
```
![breadcrums](https://user-images.githubusercontent.com/9638156/43224517-23828d16-905f-11e8-91d1-7199f4e2d199.gif)

Expected path to change to `.btn &.another-class ` and `.btn &.classs` (Basically, the same as it works if you remove the second selector (`.link`)).


VS Code version: Code - Insiders 1.26.0-insider (5fae91d61f12726e149fe5baed342eac2fbf8f88, 2018-07-25T02:04:01.629Z)
OS version: Windows_NT x64 10.0.17134


<!-- generated by issue reporter -->
Repository: flutter
Issue: GestureDetector should not cancel a tap until finger moves off of button
Labels: c: new feature,framework,f: gestures,P3,team-framework,triaged-framework

When a user taps on a button and then slides his/her finger around the button, if the finger moves more than the "slop" amount, the GestureDetector invokes onTapCancel. This behavior is not desired.

The desired behavior is that as long as the user's finger remains on the button, the button should remain pressed. Only upon dragging off the button should onTapCancel be invoked.

CC @Hixie
Repository: flutter
Issue: `newSlot` not documented in framework.dart updateChild
Labels: framework,d: api docs,P2,found in release: 1.21,team-framework,triaged-framework

https://github.com/flutter/flutter/blob/1cc036519cb6af2bc1af8c9bc39468bc2fc8e05f/packages/flutter/lib/src/widgets/framework.dart#L2690

There's no reference to this parameter in the documentation, but it is used 44 times in the file.
Repository: godot
Issue: Blurry Icon in Tab Switcher on Linux Mint 19
Labels: enhancement,platform:linuxbsd,topic:editor

**Godot version:**
3.0.5

**OS/device including version:**
Linux Mint 19
Also reported to happen in Elementary OS

**Issue description:**
Blurry Icon in tab switchers / dock

Using Docky
![unknown](https://user-images.githubusercontent.com/3322994/43237945-f19bdae6-9040-11e8-83ce-f2946e055d73.png)
Using Tab Switcher
![screenshot from 2018-07-25 19-27-02](https://user-images.githubusercontent.com/3322994/43237950-f7bb7e18-9040-11e8-8402-62eb5f7948f5.png)

**Steps to reproduce:**
Download Godot 3.0.5 from website, Unzipped, launch program. Alt tab shows it a bit more clearly or using Docky.
Repository: pytorch
Issue: How can I sure that I run caffe2 with GPU
Labels: caffe2

I have installed CUDA and CUDNN, but today I run MNIST for a test, then it show me that "
I0726 15:18:46.212692  6426 operator.cc:169] Engine CUDNN is not available for operator Conv.
I0726 15:18:46.212774  6426 operator.cc:169] Engine CUDNN is not available for operator MaxPool.
I0726 15:18:46.212832  6426 operator.cc:169] Engine CUDNN is not available for operator Conv.
I0726 15:18:46.212883  6426 operator.cc:169] Engine CUDNN is not available for operator MaxPool.
I0726 15:18:46.212956  6426 operator.cc:169] Engine CUDNN is not available for operator Relu.
I0726 15:18:46.212990  6426 operator.cc:169] Engine CUDNN is not available for operator Softmax.
I0726 15:19:35.518470  6426 operator.cc:169] Engine CUDNN is not available for operator Conv.
I0726 15:19:35.518534  6426 operator.cc:169] Engine CUDNN is not available for operator MaxPool.
I0726 15:19:35.518573  6426 operator.cc:169] Engine CUDNN is not available for operator Conv.
I0726 15:19:35.518604  6426 operator.cc:169] Engine CUDNN is not available for operator MaxPool.
I0726 15:19:35.518649  6426 operator.cc:169] Engine CUDNN is not available for operator Relu.
I0726 15:19:35.518672  6426 operator.cc:169] Engine CUDNN is not available for operator Softmax.
I0726 15:19:35.519259  6426 operator.cc:169] Engine CUDNN is not available for operator Conv.
I0726 15:19:35.519331  6426 operator.cc:169] Engine CUDNN is not available for operator MaxPool.
I0726 15:19:35.519382  6426 operator.cc:169] Engine CUDNN is not available for operator Conv.
I0726 15:19:35.519426  6426 operator.cc:169] Engine CUDNN is not available for operator MaxPool.
I0726 15:19:35.519488  6426 operator.cc:169] Engine CUDNN is not available for operator Relu.
I0726 15:19:35.519521  6426 operator.cc:169] Engine CUDNN is not available for operator Softmax.


Any one can help me, please.
and thank you any way~~~~~~~
Repository: rust
Issue: Allow to use a custom dsymutil command
Labels: A-linkage,O-macos,A-debuginfo,T-compiler,C-feature-request

`src/librustc_codegen_llvm/back/link.rs` does this:
```
match Command::new("dsymutil").arg(out_filename).output() {
```
`dsymutil` might not be in your `PATH`, or worse, have a different name (like, `llvm-dsymutil`)
Repository: pytorch
Issue: Pytorch is slow when only using CPU, and cannot utilize multicore of CPU
Labels: module: performance,module: cpu,triaged,module: multithreading

When I testing the acceleration effect on CPU by decomposing convolution layers, I found pytorch is slow  and cannot utilize multicores of CPU. 

```
# To blind GPU
os.environ["CUDA_VISIBLE_DEVICES"] = '  '
# Generate input data
t = np.random.randn(50,128,128,64).astype(np.float32)
```

```
import torch
import torch.nn as nn
import torch.nn.functional as F

x = torch.from_numpy(t).permute(0,3,1,2)

model1 = nn.Sequential(
    nn.Conv2d(64, 128, 3, stride=1, padding=1, dilation=1),
    nn.Conv2d(128, 256, 3, stride=1, padding=1, dilation=1),
)

model2 = nn.Sequential(
    nn.Sequential(
        nn.Conv2d(64, 16, kernel_size=(1, 1)),
        nn.Conv2d(16, 16, kernel_size=(3, 1), padding=(1, 0)),
        nn.Conv2d(16, 16, kernel_size=(1, 3), padding=(0, 1)),
        nn.Conv2d(16, 128, kernel_size=(1, 1)),
    ),
    nn.Sequential(
        nn.Conv2d(128, 32, kernel_size=(1, 1)),
        nn.Conv2d(32, 32, kernel_size=(3, 1), padding=(1, 0)),
        nn.Conv2d(32, 32, kernel_size=(1, 3), padding=(0, 1)),
        nn.Conv2d(32, 256, kernel_size=(1, 1)),
    ),
)

iters = 10

t1 = time.time()
for i in range(iters):
    y=model1(x)
t2 = time.time()
m1t = t2-t1

t1 = time.time()
for i in range(iters):
    y=model2(x)
t2 = time.time()
m2t = t2-t1

print(m1t, m2t)
```
Output is that while cpu usage is 100%-200%
> 147.48149728775024 16.699654817581177

![pytorch](https://user-images.githubusercontent.com/10665923/43258302-eca30248-9104-11e8-8045-49d8d63819a4.PNG)

However, Keras (TF  back-end)  is faster and multi-threaded.
```
model1 = Sequential([
    Conv2D(128,3,input_shape=(128,128,64)),
    Conv2D(256,3),
])


model2 = Sequential([
    Sequential([
        Conv2D(16,1,input_shape=(128,128,64)),
        Conv2D(16,(3,1)),
        Conv2D(16,(1,3)),
        Conv2D(128,(1,1)),
    ]),
    Sequential([
        Conv2D(32,1,input_shape=(100,100,128)),
        Conv2D(32,(3,1)),
        Conv2D(32,(1,3)),
        Conv2D(256,1)
    ]),
])
```
Output is that while cpu usage is 800%-1600%
> 26.393059253692627 13.783706188201904

![keras](https://user-images.githubusercontent.com/10665923/43258314-f57cf11c-9104-11e8-8cfd-c094a798df48.PNG)

## System Info
Pytorch 0.4
Ubuntu 16.04



cc @VitalyFedyunin @ngimel
Repository: pytorch
Issue: onnx to caffe2 err
Labels: caffe2

## Issue description

Provide a short description.
from pytorch model to onnx, and from onnx to caffe2, err ocurr, help me please, thanks all. 
## Code example
from torch.autograd import Variable
import torch.onnx
import torchvision

dummy_input = Variable(torch.randn(10, 3, 224, 224)).cuda()
model = torchvision.models.alexnet(pretrained=False).cuda()
torch.onnx._export(model, dummy_input, "alexnet.proto", verbose=True)
import onnx
import caffe2.python.onnx.backend as backend
# load onnx object
model = onnx.load("alexnet.proto")
print(type(model))
prepared_backend = backend.prepare(model)
from caffe2.python.onnx.backend import Caffe2Backend as c2
init_net, predict_net = c2.onnx_graph_to_caffe2_net(model.graph)
with open("squeeze_init_net.pb", "wb") as f:
    f.write(init_net.SerializeToString())
with open("squeeze_predict_net.pb", "wb") as f:
    f.write(predict_net.SerializeToString())
## System Info
<class 'onnx.onnx_pb2.ModelProto'>
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-16-4691dd3e26ec> in <module>()
      4 model = onnx.load("alexnet.proto")
      5 print(type(model))
----> 6 prepared_backend = backend.prepare(model)
      7 from caffe2.python.onnx.backend import Caffe2Backend as c2
      8 init_net, predict_net = c2.onnx_graph_to_caffe2_net(model.graph)

/home/fiona/lizhen/caffe2/build/caffe2/python/onnx/backend.pyc in prepare(cls, model, device, **kwargs)
    745         # Check whether we have RNN related ops
    746         pred_model = ModelProto()
--> 747         pred_model.ParseFromString(cls.optimize_onnx(model.SerializeToString(), predict=True))
    748         rnn_nodes = []
    749         for node in pred_model.graph.node:

/home/fiona/lizhen/caffe2/build/caffe2/python/onnx/backend.pyc in optimize_onnx(input, init, predict)
    701         if predict:
    702             passes.append('split_predict')
--> 703         out = onnx.optimizer.optimize(input, passes)
    704         return out
    705 

/home/fiona/anaconda2/lib/python2.7/site-packages/onnx-1.2.1-py2.7-linux-x86_64.egg/onnx/optimizer.pyc in optimize(model, passes)
     43                   'fuse_transpose_into_gemm']
     44     if not isinstance(model, ModelProto):
---> 45         raise ValueError('Optimizer only accepts ModelProto, incorrect type: {}'.format(type(model)))
     46 
     47     model_str = model.SerializeToString()

ValueError: Optimizer only accepts ModelProto, incorrect type: <type 'str'>
- PyTorch and Caffe2:
- How you installed PyTorch (pip):
- OS:Ubuntu16.04
- PyTorch version:0.4.0
- Python version:anaconda  python2 2.7.1
- CUDA/cuDNN version:8.0/6.0.5
- GPU models and configuration: GeForce GTX 1080 Ti/PCIe/SSE2
- GCC version (if compiling from source):5.4.0
- CMake version:3.11.1
- Versions of any other relevant libraries:
eigen:3.3.4, opencv 3.4.1
Repository: vscode
Issue: "Quick Open" open all/multi-select files
Labels: feature-request,quick-open

Sometimes I need to open all files matching a certain criteria.
For example:
![files matching dialog](https://user-images.githubusercontent.com/14938293/43263867-c7fbaef6-90e4-11e8-8633-64ea5c4b1524.png)

At the moment I have to start "Quick Open" and then enter my search term and then go through each entry and hit arrow-right on my keyboard. This can take very long.
It would be nice if I could just open all files that are in the dialog.
It would also be good if I could select multiple files with ctrl + click and maybe shift + click to open only the files I need.
Repository: pytorch
Issue: cannot open caffe2.lib in VS2015 debug mode
Labels: caffe2

Environment:
Win10 64Bit, VS2015, Caffe2 CPU Only mode

issue:
I build caffe2.lib successfully  in VS2015 debug mode, but link error happened when I build project caffe2_pybind11_state.
 link error message: LNK1104 can not open “../lib/debug/caffe2.lib”

file caffe2.lib exceed 2.6G, is that reason?
Repository: go
Issue: regexp: investigate further performance improvements
Labels: Performance,NeedsInvestigation

Languages Regex Benchmark:

Language | Email(ms) | URI(ms) | IP(ms) | Total(ms)
--- | ---: | ---: | ---: | ---:
**C PCRE2** | 25.00 | 25.02 | 5.65 | 55.66
**Rust** | 31.31 | 31.73 | 6.75 | 69.79
**PHP** | 54.39 | 50.22 | 5.80 | 110.40
**Javascript** | 74.88 | 63.09 | 2.02 | 140.00
**D ldc** | 146.01 | 140.03 | 5.19 | 291.24
**D dmd** | 205.52 | 200.30 | 5.59 | 411.41
**Perl** | 246.91 | 170.74 | 45.60 | 463.24
**Crystal** | 339.79 | 280.74 | 27.03 | 647.56
**Python PyPy** | 207.96 | 177.18 | 329.85 | 714.99
**Ruby** | 354.16 | 308.55 | 52.73 | 715.44
**Java** | 382.57 | 456.34 | 297.66 | 1136.57
**Kotlin** | 395.23 | 474.31 | 293.53 | 1163.07
**Python 2** | 368.85 | 286.70 | 514.10 | 1169.65
**Python 3** | 565.71 | 416.32 | 493.07 | 1475.09
**Go** | 423.53 | 415.45 | 722.53 | 1561.51
**C# .Net Core** | 1952.13 | 1681.00 | 111.32 | 3744.45
**C# Mono** | 2463.84 | 2088.87 | 153.78 | 4706.49

In [the above benchmark](https://github.com/mariomka/regex-benchmark/issues/8), Go's regex is even slower than Python. It is not ideal because as Python is a scripting language, and Go is a static language, Go should be faster than Python.

I noticed that there's an issue here: https://github.com/golang/go/issues/19629, and someone said that because Python uses C for regex, and C is faster than Go. But Python is a cross-platform language and it can enjoy the C regex implementations for all platforms. Why can't Go do the same thing? This may be a stupid question but I just don't understand why Go has to use cgo to call C code, but Python doesn't have this limitation? Thanks.
Repository: pytorch
Issue: Unintuitive reduction of mini-batch loss for NLLLoss
Labels: module: docs,module: nn,module: loss,triaged

I find the reduction method that was chosen for the NLLLoss quite unintutive.

<img width="712" alt="screen shot 2018-07-26 at 18 33 10" src="https://user-images.githubusercontent.com/14793026/43275573-774953a0-9102-11e8-8f84-8d8f7955cd9a.png">

This introduces a weird interdependence of the chosen class weights with the chose batch size (and more: the influence of the class weights depend on which ground-truth classes are present in the mini-batch)
Extreme case with the current implementation: with batch size one, it does not matter which class weights I choose, my net will always see the same gradients.

In other words: I would expect `F.nll_loss(..., reduce=True) == torch.mean(F.nll_los(..., reduce=False))` but this does not hold true when using different class weights.

In the documentation of the CrossEntropyLoss it also says the following

<img width="647" alt="screen shot 2018-07-26 at 18 45 47" src="https://user-images.githubusercontent.com/14793026/43276191-2a0489c8-9104-11e8-9348-23b16ad5543b.png">

Especially the sentence "The losses are averaged across observations for each minibatch." is very misleading with the current implementation if you are using class weights.

I can only guess that the reason this implementation was chosen is s.t. your loss value doesn't change when you change the class weights (which makes multiple runs with different class weights more comparable when you're just looking at the loss), but it seems to come at a cost of a very unintuitive treatment of class weights, that in my opinion is not worth it.

cc @jlin27 @mruberry @albanD @jbschlosser
Repository: pytorch
Issue: NetTest.OperatorWithExecutorHelper intermittently hangs
Labels: caffe2

Sample log:

```
06:36:16 [ RUN      ] NetTest.OperatorWithExecutorHelper
06:36:16 I0726 06:36:16.360155  1596 net_dag_utils.cc:102] Operator graph pruning prior to chain compute took: 4.741e-06 secs
06:36:16 I0726 06:36:16.360244  1596 net_async_base.cc:435] Using specified CPU pool size: 4; NUMA node id: -1
06:36:16 I0726 06:36:16.360285  1596 net_async_base.cc:448] Created shared CPU pool, size: 4; NUMA node id: -1
07:18:08 Build timed out (after 45 minutes). Marking the build as failed.
07:18:08 Build was aborted
```

sample log: https://ci.pytorch.org/jenkins/job/caffe2-builds/job/py2-cuda9.0-cudnn7-aten-ubuntu16.04-test/5029/console
Repository: pytorch
Issue: [doc] functionalities not documented
Labels: module: docs,good first issue,triaged

- [ ] FeatureAlphaDropout
- [ ] nn.init.zeros_, nn.init.ones_
- [ ] bilinear missing doc content
- [x] DistributedDataParallelCPU
- [ ] torch.as_strided
- [ ] F.softplus
- [ ] torch.default_generator
Repository: vue
Issue: Slots with only comments use fallback instead
Labels: improvement

### Version
2.5.16

### Reproduction link
[https://jsfiddle.net/sg0bkLhv/7/](https://jsfiddle.net/sg0bkLhv/7/)

### Steps to reproduce
* Register a component with a slot
* Use the component in a Vue instance with comments=true, filling the slot with only HTML comment(s)

### What is expected?
The HTML comment is rendered into the slot.

This could be a breaking "fix" for someone who is running with comments=true and still relying on this behavior. If the current behavior is kept, I think it should at least be documented.

### What is actually happening?
The HTML comment is discarded and the slot uses its fallback content instead.

If any other content is provided together with the HTML comment, all content is kept.

---
I am developing for a CMS which uses HTML comments to provide its editing capabilities. It has the concept of "areas", which are similar to Vue's slots, so it would be handy to render areas into slots. An empty area (e.g. in a newly created page) consists solely of an HTML comment. Since the comment is stripped by Vue, the editing tools are not available.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: rust
Issue: The run-pass/simd-intrinsic-float-minmax.rs fails on mips* with glibc 2.27
Labels: O-MIPS

This is a combination of several issues. First on Mips targets the LLVM expands @llvm.min/maxnum.v4f32 into per element fminf/fmaxf libcalls. Since glibc 2.25 [1] the semantics of these libm functions is changed and no longer follows the rules defined in LLVM lang ref [2]. Now these functions return QNAN if any of the input is SNAN. And finally the bit-pattern of libcore::f32::NAN constant is actually interpreted as SNAN by Mips hardware [3] [4] triggering the issue.

@gnzlbg 
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=20947
[2] https://llvm.org/docs/LangRef.html#id480
[3] https://sourceware.org/binutils/docs/as/MIPS-NaN-Encodings.html
[4] https://dmz-portal.mips.com/wiki/MIPS_ABI_-_NaN_Interlinking#1._Introduction
Repository: rust
Issue: External statics compile incorrectly when there's no #[link(... above the extern block
Labels: T-compiler,O-windows-msvc,C-bug

External statics return stuff from incorrect memory locations when their `extern` blocks are not marked with `#[link(name = "their_lib_name")]` explicitly .

#### Environment
```
rustc 1.29.0-nightly (6a1c0637c 2018-07-23)`
binary: rustc
commit-hash: 6a1c0637ce44aeea6c60527f4c0e7fb33f2bcd0d
commit-date: 2018-07-23
host: x86_64-pc-windows-msvc
release: 1.29.0-nightly
LLVM version: 7.0
```
#### Example
Test `cdylib` type library called `libtest`:
```Rust
// lib.rs
#[no_mangle] pub static AS_STATIC: u32 = 1337;
#[no_mangle] pub extern "C" fn as_function() -> u32 { 1337 }
```
Test binary (marked):
```Rust
// main.rs
#[link(name = "libtest")]
extern "C" {
    pub static AS_STATIC: u32;
    pub fn as_function() -> u32;
}
fn main() {
    unsafe {
        println!(
            "Static: '{}' at {:p}\nFunction: '{}' at {:p}",
            AS_STATIC,
            &AS_STATIC as *const u32 ,
            as_function(),
            as_function as *const (),
        );
    }
}
```
Result - OK:
```
Static: '1337' at 0x7fef9bd2140
Function: '1337' at 0x13f5462b0
```

Now after removing `#[link(name = "libtest")]` from above the `extern` block in our test binary and instead linking via build script:
```Rust
// build.rs
fn main() {
    println!("cargo:rustc-link-lib=dylib=libtest");
}
```
Result:
```
Static: '262284799' at 0x13fe062b0
Function: '1337' at 0x13fe062b6
```
Repository: pytorch
Issue: interaction with FindCUDA causes spurious re-cmakes
Labels: module: build,triaged

(see https://github.com/pytorch/pytorch/pull/9845 for a discarded potential solution)

FindCUDA generates a C++ source file at CMake time. When building with ninja (haven't tested with make), a dependency is recorded of build.ninja on that generated file. After invoking cmake manually, that generated file is (for some reason - it doesn't make sense to me why this is the case, and poking around to look at timestamps even suggests that it's not true) considered to be newer than build.ninja. Therefore upon the next time running `ninja build`, ninja spuriously reruns CMake (but not on additional subsequent runs).

expected behavior: running `cmake; ninja` doesn't cause cmake to be run twice

environment: on linux, with cuda and ninja

to reproduce:

(1) grab the cmake command. I did this by prepending an `echo` to the cmake invocation in build_pytorch_libs.sh
(2) `cd build`
(3) manually run that cmake command
(4) `ninja -d explain`
(5) note that cmake is rerun. The very first line of output should be a message from ninja saying that the dependency on the aforementioned generated source file is triggering a rebuild of build.ninja itself

Note: I'm not sure of exactly how to characterize the underlying problem. It could be that the timestamps are recorded incorrectly (on the filesystem, they appear to be within a few ms of each other). It could be that the dependency itself is bogus. It could be either an upstream bug of FindCUDA, or a problem with our usage of it.

cc @malfet @seemethere @walterddr