sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: gollvm: can't find some C std pthread_xxx  functions
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.16 gollvm LLVM 13.0.0git linux/amd64
</pre>

### Does this issue reproduce with the latest release?
yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE="off"
GOARCH="amd64"
GOBIN="/home/jxzhang/workspace/gowork/bin"
GOCACHE="/home/jxzhang/.cache/go-build"
GOENV="/home/jxzhang/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/jxzhang/workspace/gowork/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/jxzhang/workspace/gowork"
GOPRIVATE=""
GOPROXY="https://goproxy.cn,direct"
GOROOT="/home/jxzhang/.local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/jxzhang/.local/gollvm/tools"
GOVCS=""
GOVERSION="go1.16 gollvm LLVM 13.0.0git"
GCCGO="/home/jxzhang/.local/gollvm/bin/llvm-goc"
AR="ar"
CC="/home/jxzhang/workspace/llvm_area/llvm-project/build/bin/clang"
CXX="/home/jxzhang/workspace/llvm_area/llvm-project/build/bin/clang++"
CGO_ENABLED="1"
GOMOD=""
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=/tmp/go-build4207555597=/tmp/go-build -gno-record-gcc-switches -funwind-tables"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
-->
I wrote a cgo demo which call pthread std functions and tried to compile it with gollvm
Here is a link on [play.golang- https://play.golang.org/p/PiaY0AIGprl](https://play.golang.org/p/PiaY0AIGprl)
Though the code can't run on play.golang for some reason...


### What did you expect to see?
Compile succeed with gollvm


### What did you see instead?
An error caused by an undefined reference occured 
```
ccode.c:11: error: undefined reference to 'pthread_join'
```
In addition to this function, there are some other functions that also have this error:
`pthread_once`, `pthread_mutexattr_init`, `pthread_mutexattr_settype`, `pthread_key_create`, `pthread_getspecific`, `pthread_mutexattr_destroy` ...

### Some extra observations
These functions above seems different between `pthread_create` which can be referenced normally

```shell
jx $  nm /home/jx/.local/gollvm/lib64/libgo.so.13git | grep pthread_create           
00000000010831e0 t __wrap_pthread_create
                 w pthread_create
jx $ nm /home/jx/.local/gollvm/lib64/libgo.so.13git | grep pthread_join
jx $ nm /home/jx/.local/gollvm/lib64/libgo.so.13git | grep pthread_once  
                 w pthread_once

```
Repository: create-react-app
Issue: Blank screen is showing up for React app in Ipad Pro chrome browser
Labels: needs triage,issue: bug report

One of our user has reported below issues on his iPAD Pro device + Chrome browser (v87) version. 
- Key in user id and password and the overview screen I am forever waiting to see the data being displayed.
- Key in user id and password, shows me the overview screen and after a minute the screen goes blank as if some refresh is happening and nothing shows up even after waiting for 5-6 minutes.
He also mentioned that he is not able to reproduce above mentioned issues on the same iPAD device safari version. 
Also, this is an intermittent issue.
The same issue is not able to reproduce in any other device. this is specific to customer's iPAD chrome browser. 
it's only happening in PROD env. we couldn't reproduce the issue in pre-prod environment. 
We are not getting any javascript errors, application error logs for the issue. it seems the page is getting reloaded and showing blank screen.

Please provide any solution/suggestion for above mentioned issues. Thanks
Repository: pytorch
Issue: C++ sparse_coo_tensor ignores TensorOptions argument
Labels: module: sparse,triaged,module: tensor creation

## 🐛 Bug

C++ sparse_coo_tensor ignores TensorOptions argument when supplied with indices & values

## To Reproduce

sparse_coo_tensor has three signatures:
```
TORCH_API Tensor sparse_coo_tensor(IntArrayRef size, TensorOptions options);
TORCH_API Tensor sparse_coo_tensor(const Tensor & indices, const Tensor & values, TensorOptions options={});
TORCH_API Tensor sparse_coo_tensor(const Tensor & indices, const Tensor & values, IntArrayRef size, TensorOptions options={});
```
Any tensor options given in the size-only call are used, but the others seem to ignore any options other than to check if the layout contradicts the sparse intent.
e.g. in the size only case, the empty tensor is created on CUDA w'datatype=double:

``` 
 auto o=torch::dtype(torch::kDouble).device(torch::kCUDA);
 auto t1=torch::sparse_coo_tensor({2,3}, o);
 std::cerr << t1 << "\n";

[ SparseCUDADoubleType{}
indices:
[ CUDALongType{2,0} ]
values:
[ CUDADoubleType{0} ]
size:
[2, 3]
]
```

When indices and values supplied, the TensorOptions are ignored:
```
 auto i=torch::tensor({{1},{1}});
 auto v=torch::tensor({1});
 auto t2=torch::sparse_coo_tensor(i,v,o);
 std::cerr << t2 << "\n";

[ SparseCPULongType{}
indices:
 1
 1
[ CPULongType{2,1} ]
values:
 1
[ CPULongType{1} ]
size:
[2, 2]
]
```

Thanks for looking into this.


cc @aocsa @nikitaved @pearu @mruberry @gchanan
Repository: rust
Issue: Two diagnostics emitted for unsolved const inference variable for parent tyoe in method call
Labels: A-diagnostics,T-compiler,A-suggestion-diagnostics,A-const-generics,D-papercut,D-verbose

The error message provided when attempting to implement a const generic trait on (), does not explain the problem well, and also provides an incorrect solution.

Playground link:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=9f13fd2b46d8fbcad14e57184d499b3e

```rust
trait HelloVoid<const VALUE: i32> {
    fn call(self) -> i32;
}

impl<const VALUE: i32> HelloVoid<VALUE> for () {
    fn call(self) -> i32 {
        println!("Hello, Void!");
        
        VALUE
    }
}

fn main() {
    let value = ().call();
    println!("{}", value);
}
```

The current output is:

```
   Compiling playground v0.0.1 (/playground)
error[E0282]: type annotations needed
  --> src/main.rs:14:20
   |
14 |     let value = ().call();
   |                    ^^^^ cannot infer the value of const parameter `VALUE` declared on the trait `HelloVoid`
   |
help: consider specifying the const argument
   |
14 |     let value = ().HelloVoid::<VALUE>();
   |                    ^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0282`.
error: could not compile `playground`

To learn more, run the command again with --verbose.
```

Ideally the output should look like:

```
error[E0282]: type annotations needed
  --> src/main.rs:14:20
   |
14 |     let value = ().call();
   |                    ^^^^ cannot infer the value of const parameter `VALUE` declared on the trait `HelloVoid`
   |
help: consider specifying the const argument
14 |     <() as HelloVoid<Value>>::call(())
   |        ^^^^^^^^^^^^^^^^^^
```

The error should also reference the () type that the trait is impl'd for.
Repository: pytorch
Issue: Include the cuda headers in the libtorch pre-built packages
Labels: module: binaries,module: build,module: cuda,triaged

## 🚀 Feature
*apologies if this is already mentioned elsewhere, I haven't been able to find anything relevant in the issues section*

Include in the pre-built libtorch packages with cuda support the standard cuda header files such as `cuda_runtime_api.h`.

## Motivation

When using the pre-built libtorch packages with cuda support (e.g. [1]), the standard cuda headers on which some of the PyTorch headers depend are not included. It would be nice for these headers to be included so that it's easier to build C++ projects. Currently trying to compile a simple example using cuda streams would result in some error about missing `cuda_runtime_api.h` as `CUDAStream.h`[2] relies on this header.

[1] https://download.pytorch.org/libtorch/cu111/libtorch-shared-with-deps-1.8.1%2Bcu111.zip
[2] https://github.com/pytorch/pytorch/blob/master/c10/cuda/CUDAStream.h

## Pitch

Include in the pre-built libtorch cuda packages the cuda headers such that `cuda_runtime_api.h`.

## Alternatives

Another possibility could be to avoid referring to the cuda headers from the PyTorch headers that are shipped in the pre-built packages.


cc @ezyang @seemethere @malfet @walterddr @ngimel
Repository: ant-design
Issue: form.scrollToField，在iframe里失效，固定滚动到页面顶部
Labels: 🐛 Bug,Inactive

- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.

### Reproduction link
[https://test.com.cn](https://test.com.cn)

### Steps to reproduce
<p>不在iframe里，正常定位</p>
<img alt="不在iframe里"  src="https://dag.oss.jjbisai.com/2021/04/3d71ecb7ed14447fb16954b7d3b76557.gif" >

<p>在iframe里，无法定位，且固定滚动到页面顶部 </p>
<img 
alt="在iframe里 " src="https://dag.oss.jjbisai.com/2021/04/2a3442d9421f4be79d647a33ed210660.gif" >


### What is expected?
iframe里也能正常定位校验失败的表单项

### What is actually happening?
无法定位，且固定滚动到页面顶部

| Environment | Info |
|---|---|
| antd | 4.15.0 |
| React | 16.9.43 |
| System | win10 |
| Browser | Chrome  89.0.4389.114（正式版本） （64 位） |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: flutter
Issue: [image_picker]  On iOS, When opening camera,  logs prints "Failed to read exposureBiasesByMode dictionary" message 
Labels: platform-ios,p: image_picker,package,has reproducible steps,P2,found in release: 2.0,found in release: 2.1,team-ios,triaged-ios

I get this message when I open the camera window in my app :

`[Camera] Failed to read exposureBiasesByMode dictionary: Error Domain=NSCocoaErrorDomain Code=4864 "*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: data is NULL" UserInfo={NSDebugDescription=*** -[NSKeyedUnarchiver _initForReadingFromData:error:throwLegacyExceptions:]: data is NULL}`

**the same message in the example from the repository.**

Flutter doctor:

<details> 
<summary>flutter doctor -v</summary> 

```bash
[✓] Flutter (Channel master, 2.1.0-13.0.pre.447, on Mac OS X 10.15.6 19G2021 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)
[✓] Connected device (2 available)

• No issues found!
supports-MacBook-Pro:deliver_app test$ flutter doctor -v
[✓] Flutter (Channel master, 2.1.0-13.0.pre.447, on Mac OS X 10.15.6 19G2021 darwin-x64, locale en-US)
• Flutter version 2.1.0-13.0.pre.447 at /Users/test/development/flutter
• Framework revision 0e2b40d808 (2 days ago), 2021-04-05 10:09:01 -0400
• Engine revision 3a53b28e95
• Dart version 2.13.0 (build 2.13.0-201.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at /Users/test/Library/Android/sdk
• Platform android-30, build-tools 30.0.0
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.3, Build version 12C33
• CocoaPods version 1.10.1

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] Connected device (2 available)
• test’s iPhone (mobile) • b52487fbe2a2bd81a8bb982b62797b7abd37c4e1 • ios • iOS 14.4.2
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.114

• No issues found!
```
	
</details>
Repository: go
Issue: x/mobile/exp/audio/al: Missing Effects Extension (EFX)
Labels: NeedsInvestigation,FeatureRequest,mobile

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.16.3 windows/amd64
</pre>

### Does this issue reproduce with the latest release?
Yes.

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
set GO111MODULE=on
set GOARCH=amd64  
set GOBIN=
set GOCACHE=C:\Users\Zyl\AppData\Local\go-build
set GOENV=C:\Users\Zyl\AppData\Roaming\go\env  
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GOMODCACHE=D:\Projects\Code\Go\pkg\mod     
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=D:\Projects\Code\Go
set GOPRIVATE=
set GOPROXY=https://proxy.golang.org,direct
set GOROOT=C:\Program Files\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Program Files\Go\pkg\tool\windows_amd64
set GOVCS=
set GOVERSION=go1.16.3
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=D:\Projects\Code\Go\src\zyl\testgl\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Zyl\AppData\Local\Temp\go-build3421167547=/tmp/go-build -gno-record-gcc-switches
</pre></details>

### What did you do?

import "golang.org/x/mobile/exp/audio/al"

### What did you expect to see?

`strings.Contains(al.Extensions(), "ALC_EXT_EFX")` is `true`.

### What did you see instead?

`strings.Contains(al.Extensions(), "ALC_EXT_EFX")` is `false`.

### Additional information

The OpenAL C-level bindings ( https://pkg.go.dev/github.com/dextercai/go-openal/openal ) recommend to use Go-level bindings instead.

The Go-level bindings ( https://pkg.go.dev/golang.org/x/mobile@v0.0.0-20210220033013-bdb1ca9a1e08/exp/audio/al ) wrap OpenAL-Soft.

OpenAL-Soft ( https://github.com/kcat/openal-soft ) supports EFX.

Bindings for EFX-calls (`alGenEffects()`, `alDeleteEffects()` etc.) are missing, as well as means to retrieve them (i.e. `alGetProcAddress()`). As far as I understand, by using OpenAL-Soft, this (and other) extensions are guaranteed to be available, and should only be missing their implementation.
Repository: pytorch
Issue: [feature request] TupleSequential module or an option for Sequential for unpacking tuples (i.e. support varargs)
Labels: module: nn,triaged

Sometimes we need to transform tuples, a frequent example is image augmentations where one must transform images and their meta information (such as bounding boxes and such). I guess, for historical reasons inputs and outputs are often encoded as tuples (images, meta) (although IMO dicts with standardized key names would be more maintainable). Currently nn.Sequential does not support transformation of such inputs and outpus if they need to be unpacked. Currently one has to recode these abstractions from scratch (aka `T.Compose` variants), even if individual transforms are already nn.Modules.

https://github.com/facebookresearch/detr/blob/e8eab59/datasets/transforms.py#L265-L268:
```python
    def __call__(self, image, target):
        for t in self.transforms:
            image, target = t(image, target)
        return image, target
```

One option could be `tuple_inputs_outputs = True` or maybe `varargs = True`, then it would support:
```python
    def forward(self, *args):
        for t in self.transforms:
            args = t(*args)
        return args
```


Currently nn.Sequential defines it as:
```python
    def forward(self, input):
        for module in self:
            input = module(input)
        return input
```

Maybe the best BC-compat implementation to support both modes may be to:
```python
    def forward(self, *inputs):
        varargs = len(inputs) > 1
        for module in self:
            inputs = (module(inputs[0]), ) if not varargs else module(*inputs)
        return inputs[0] if not varargs else inputs
```

One problem with this is this somehow complicates the typing signature: it would return either tuple or not depending on whether its input tuple had 1 element or more.

Another option is just adding another:
```python
class TupleSequential(nn.Sequential):
    def forward(self, *inputs):
        for module in self:
            inputs = module(*inputs)
        return inputs
```

in standard library, since it's so frequent

cc @SsnL @VitalyFedyunin @ejguan @albanD @mruberry @jbschlosser
Repository: flutter
Issue: Image Picker, take a picture and record from the same screen
Labels: c: new feature,p: image_picker,package,c: proposal,team-ecosystem,P3,triaged-ecosystem

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Use case
Many apps allow you to use the camera controller from one screen, where you can decide to take a picture with one tap on the main action button or record a video with a long press.
The [image_picker](https://pub.dev/packages/image_picker) is a very beautiful package, but you can't do these two actions on the same screen.


<!--
     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 the alternative solutions you've considered. Is there a package
     on pub.dev/flutter that already solves this?
-->

## Proposal

Would it be possible to have this feature included in the image_picker package?

<!--
     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: neovim
Issue: `getwininfo()` can only report last complete displayed buffer line
Labels: enhancement

`getwininfo()` returns the line one above the bottom line as `botline` when the last line is wrapped.

- `nvim --version`: NVIM v0.5.0-dev+1226-g370469be2
- `vim -u DEFAULTS` (version: VIM - Vi IMproved 8.2) behaves differently?
Neovim shows the line and appends `@@@`, while vim shows only `@@@` in place of the entire line, both report the same line number.
- Operating system/version: 5.11.11-arch1-1
- Terminal name/version: foot version: 1.7.1-15-ge299b1d
- `$TERM`: foot

### Steps to reproduce using `nvim -u NORC`

`nvim -u NORC` [wrapfile.log](https://github.com/neovim/neovim/files/6272208/wrapfile.log)
```
decrease window-width until the last line wraps
G<C-Y>
:echo getwininfo()
```

### Actual behaviour
`botline` is 108
### Expected behaviour
`botline` is 109 or `botline` is 10{8,9} and some flag that indicates a wrapped last line is set.

An actual problem that results from `getwininfo()` not returning the correct botline would be [hop.nvim](https://github.com/phaazon/hop.nvim), which uses it to determine which region of the buffer to highlight.
![wrapped](https://user-images.githubusercontent.com/41961280/113882634-c1be0100-97bd-11eb-947f-fa7ba0b5bcbd.png)
Repository: pytorch
Issue: Cross-compiling for cortexa9 processor
Labels: module: build,triaged

Dear all,

thanks for any help in advance! Hope you are doing all good in this situation.

## Issue description

I am trying to compile libtorch for embedded linux controller

## Build command

```
/opt/pytorch/libtorch_build# cmake -DBUILD_SHARED_LIBS=OFF -DBUILD_PYTHON=OFF -DCMAKE_CROSSCOMPILING=ON -DSLEEF_SHOW_CONFIG=ON -DUSE_CUDA=OFF -DUSE_MPI=OFF -DUSE_OPENCV=OFF -DBUILD_LITE_INTERPRETER=ON -DBUILD_CAFFE2_MOBILE=ON  ..
```
### Error message

```
[ 26%] Running C++/Python protocol buffer compiler on /opt/pytorch/caffe2/proto/prof_dag.proto 
[ 26%] Running C++ protocol buffer compiler on /opt/pytorch/libtorch_build/third_party/onnx/onnx/onnx_onnx_torch-ml.proto 
/bin/sh: 1: /opt/pytorch/libtorch_build/bin/protoc: Exec format error 
make[2]: *** [caffe2/proto/CMakeFiles/Caffe2_PROTO.dir/build.make:148: caffe2/proto/torch.pb.cc] Error 2 
```

# Summary

I know that issue in both cases is that files wants to get executed on host machine which is not arm (ubuntu x86_64). But have no idea how to skip it or make protoc compile with host processor

# Question

- Is this protoc compilation needed?
- Is it possible to compile libtorch for a inference use only? I would like to use traced model on controller and do object detection


cc @malfet @seemethere @walterddr
Repository: pytorch
Issue: Support quantized functional linear/conv operators with 32b output
Labels: oncall: quantization,feature,low priority,triaged

## 🚀 Feature
Currently (as of 1.8.1) torch.nn.quantized.functional.conv1d/2d/3d/linear require the output to always be requantized to 8b. Conv operators ask for an output scale and zero point, while (for some reason) in linear they are optional, but when they are not specified the input scale and zero point are used for requantization.
My suggestion is to support the scenario where no requantization happens, and the 32b output accumulator is returned as a qint32/quint32 (which I don't think exists as a datatype at the moment) datatype, with its own scale and zero point computed from the input's and weight' scales and zero points (e.g. output scale = input scale * weight scale). 

## Motivation

There are many scenarios where you might want to do operations on the 32b data before requantizing (e.g. elementwise adds). Giving users the option to do so would be very helpful. 
Additionally, my feeling (which obviously might be wrong) is that the current design reflects the fact that typically output requantization is optimized by fusing it with the linear/conv operators in x86 backends like gemmlowp and FBGEMM, and that optimization leaked up to the top-level APIs. Decoupling the API from the implementation would be very helpful in opening up to extra backends and hardware (through TVM, MLIR, or whatever other toolchain supported through the jit) that don't necessarily make the same assumption.

## Pitch

Return qint32/quint32 output from torch.nn.quantized.functional.conv1d/2d/3d/linear.

## Alternatives

There aren't really alternatives at the moment other than implementing a custom operator for it. 
Another option would be to implement integer-only conv/linear operators. That is for example what ONNX does with ConvInteger and MatMulInteger as alternatives to QLinearConv and QLinearMatMul.


cc @jerryzh168 @jianyuh @raghuramank100 @jamesr66a @vkuzo