sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: three.js
Issue: Faster PBR Material
Labels: Enhancement,Needs Investigation

<!-- Ignoring this template may result in your feature request getting deleted -->

**Is your feature request related to a problem? Please describe.**

The PBR implementation in MeshStandardMaterial looks great, but is too expensive for devices like Oculus Quest/Quest 2. A scene that fills the entire screen with a quad using MeshStandardMaterial (with minimal features -- material color, a directional light, and an ambient light) renders at about 70Hz on Quest 2.

**Describe the solution you'd like**

I'd like to add a cheaper PBR implementation than MeshStandardMaterial -- perhaps [something like this](https://community.arm.com/cfs-file/__key/communityserver-blogs-components-weblogfiles/00-00-00-20-66/siggraph2015_2D00_mmg_2D00_renaldas_2D00_slides.pdf).

**Describe alternatives you've considered**

The alternative is using Phong material, but it's hard to translate PBR materials (e.g., from a GLTF file) into Phong materials.

**Additional context**

I'm planning to take a run at adding this kind of material to the ShaderLib/ShaderChunk system, but would certainly appreciate guidance or collaboration from folks who are more familiar with how this works. I'm still very new to the Three.JS codebase.
Repository: rust
Issue: Path::components().as_path() for "///a/b" failing to normalize multiple slashes for root dir on Unix
Labels: T-libs-api,C-feature-request

I'd expect the path to be normalized to `"/a/b"` since that is a substring of `"///a/b"`.

On some Unix implementations a leading `//` is special, but the Unix and POSIX specs state that a leading `///` is equivalent to just one `/`. On Linux, `//` is also the same as `/`, though it has been proposed for that to change.
[Stack Exchange: On what systems is //foo/bar different from /foo/bar?](https://unix.stackexchange.com/questions/256497/on-what-systems-is-foo-bar-different-from-foo-bar)
```rust
use std::path::Path;

fn main() {
    let expected = "/a/b";
    let actual = Path::new("///a/b").components().as_path().to_str().unwrap();
    assert_eq!(expected, actual);
}
```

([Playground](https://play.rust-lang.org/?version=nightly&mode=release&edition=2018&gist=192f448ca2b62a3bf0bbb135addcda25))

Errors:

```
   Compiling playground v0.0.1 (/playground)
    Finished release [optimized] target(s) in 3.78s
     Running `target/release/playground`
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `"/a/b"`,
 right: `"///a/b"`', src/main.rs:6:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

```
Repository: vscode
Issue: Allow notebook-output to be marked as transient per instance
Labels: feature-request,api,under-discussion,notebook-api

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
*As an extension author,* I want to be able to set `transientOutputs` on a per-notebook document basis.

For example, say I invent some notebook format that provides a way to store per-document configuration values. One of those values controls whether or not outputs are persisted. In this scenario, some notebooks should have `transientOutputs: true` and others `transientOutputs: false`. To reflect this properly, I want to be able to set `NotebookDocumentContentOptions` on a per-notebook basis, probably in the content provider.

As for why that would be useful: If I am committing notebooks to a repository, I most likely do not want to persist outputs, especially if they are dependent on time/machine/location/etc (i.e. if they are liable to change). However, if I have a notebook outside of source control (that I'm using for tests/experiments/etc), I likely want outputs to persist.
Repository: godot
Issue: Gamepad support: Device 0 already taken by fingerprint reader on Android
Labels: bug,platform:android,confirmed,topic:input

**Godot version: 3.2.3**

**OS/device:**
Running Godot on Windows 10
Running game on Xiaomi Redmi 9 with Android 10 (MIUI 12 if that's relevant)

**Issue description:**
Expected: Device 0 is nothing or bluetooth joypad that is synced
Result: Device 0 is "uinput-fpc" and if a joypad is synced the joypad is device 1


**Steps to reproduce:**
make Input.get_joy_name(0) readable while running a game on the device

[minimal example.zip](https://github.com/godotengine/godot/files/6261634/minimal.example.zip)
Repository: vscode
Issue: Allow app icon to be configured
Labels: feature-request,icon-brand

Refs #101014

Everyone has different preferences for what icon they'd like to see in the dock. We've seen this in all of our brand re-designs and it's impossible to make a single icon that everyone loves. This issue is to request to allow the app icon to be configured from a set of icons. Below are a few examples that currently do this.

**Nova**
<img width="500" src="https://user-images.githubusercontent.com/35271042/113649013-83e89d80-9642-11eb-88dc-ed2794389c7e.png">

**GitHub (mobile)**
<img width="300" src="https://user-images.githubusercontent.com/35271042/113649032-94991380-9642-11eb-8274-f45e151ceac9.png">

Pocket Casts
<img width="300" src="https://user-images.githubusercontent.com/35271042/113654845-9a482680-964d-11eb-826c-38576054ca31.png">

**Hand Mirror**
<img width="400" src="https://user-images.githubusercontent.com/35271042/113653733-42a8bb80-964b-11eb-9971-3ab241df0a4e.png">

**Amphetamine**
<img width="400" src="https://user-images.githubusercontent.com/35271042/113654726-4b9a8c80-964d-11eb-8159-ab3798917cbb.png">
Repository: flutter
Issue: [Desktop] Allow "always on top" like Windows Task Manager or Android Emulator
Labels: c: new feature,platform-windows,c: proposal,a: desktop,P3,team-windows,triaged-windows

The Windows Task Manager and Android Emulator both implement a "always on top" view mode which is useful for various use cases.

Not only would this be a nice feature for our Flutter apps themselves, it would also be a nice quality of life improvement for developers on ultrawide monitors, so we could float a desktop window overtop of the IDE:
![image](https://user-images.githubusercontent.com/736973/113659869-367b2900-9660-11eb-9580-fece87d5cd45.png)

Logging here as I'm not sure if this is an engine level thing, or can be handled by an extension.
Repository: create-react-app
Issue: Doesn't need to `import React from 'react';` with React17
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?

<!--
  Provide a clear and concise description of what the problem is.
  For example, "I'm always frustrated when..."
-->

x

### Describe the solution you'd like

<!--
  Provide a clear and concise description of what you want to happen.
-->

Like [App.js](https://github.com/facebook/create-react-app/blob/master/packages/cra-template/template/src/App.js), Remove `import React from 'react';` code line`, in [App.tsx](https://github.com/facebook/create-react-app/blob/master/packages/cra-template-typescript/template/src/index.tsx) etc.

### Describe alternatives you've considered

<!--
  Let us know about other solutions you've tried or researched.
-->

Same as above

### Additional context

<!--
  Is there anything else you can add about the proposal?
  You might want to link to related issues here, if you haven't already.
-->

x
Repository: pytorch
Issue: torch.allclose does not allow different types for comparison
Labels: triaged,module: numpy,module: type promotion

## 🐛 Bug
The API `torch.allclose` does not allow different types for comparison.

## To Reproduce
```
import torch
torch.allclose(torch.tensor([1]).half(), torch.tensor([1.]))
```
## Expected behavior
The above script throws `RuntimeError: Half did not match Float`. However, according to the documentation here https://pytorch.org/docs/stable/generated/torch.allclose.html, there is no constraint that the two tensors for comparison should be of the same data type.

## Environment
PyTorch version: 1.8.1+cu111
Is debug build: False
CUDA used to build PyTorch: 11.1
ROCM used to build PyTorch: N/A

OS: CentOS Linux release 7.7.1908 (Core) (x86_64)
GCC version: (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Clang version: Could not collect
CMake version: version 2.8.12.2

Python version: 3.6 (64-bit runtime)
Is CUDA available: True
CUDA runtime version: Could not collect
GPU models and configuration:
GPU 0: Tesla V100-PCIE-16GB

Nvidia driver version: 455.45.01
cuDNN version: 
/usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudnn.so.7.5.0
HIP runtime version: N/A
MIOpen runtime version: N/A

Versions of relevant libraries:
[pip3] numpy==1.19.5
[pip3] torch==1.8.1+cu111
[pip3] torchaudio==0.8.1
[pip3] torchvision==0.9.1+cu111


cc @mruberry @rgommers @heitorschueroff @nairbv
Repository: pytorch
Issue: it is lack of compatibility of CUDA_HOME (or other env)
Labels: module: cpp-extensions,module: cuda,triaged

## 🐛 Bug

it is lack of compatibility of CUDA_HOME (or other env)

## To Reproduce

Steps to reproduce the behavior:

https://github.com/pytorch/pytorch/blob/cdf93b03de7ffc33e2762f7fefb8f3c7586fd051/torch/utils/cpp_extension.py#L136
https://github.com/pytorch/pytorch/blob/cdf93b03de7ffc33e2762f7fefb8f3c7586fd051/torch/utils/cpp_extension.py#L27-L54

As you can see in the func `_find_cuda_home()` , it will return a path from env variable directly.
But one env variable can contain  more than one path sep by ":" on Linux and ";" on Windows.
So it is dangerous to use it directly

## Expected behavior

split by env variable sep according to OS first, and get a valid path (maybe existence or latest one ) to return. 

## Environment


 - PyTorch Version (e.g., 1.0): 1.5-now
 - OS (e.g., Linux): Linux and Windows
 - Python version: 3.7


## Additional context
TY


cc @yf225 @glaringlee @ngimel
Repository: opencv
Issue: Uniform initialization produces unexpected effects
Labels: category: documentation

I think a note about "a special behavior of uniform initialization" should be added to the beginning of 
 https://docs.opencv.org/master/d1/dfb/intro.html to avoid getting unexpected result as spotted by someone in https://stackoverflow.com/questions/53727612/uniform-initialization-causes-runtime-error-in-c
Repository: flutter
Issue: Flutter Windows Keyboard Issue using external barcode scanner
Labels: e: device-specific,engine,platform-windows,a: desktop,P2,team-windows,triaged-windows

Hello, so I am building a Windows Flutter project which uses an external barcode scanner.

I have tried using the scanner with a Flutter Android app and it uses the Android keyboard perfectly as expected to show the UPC in a TextField. **Where it does not work is as soon as a Windows Flutter app is brought into focus.** Even if it is exactly the same source code for the Android and Windows apps.

The external barcode scanner uses the keyboard to "type" on the keyboard the UPC it has retrieved via its laser. This works fine all around the PC, in Google Chrome, Microsoft Word, Notepad and all other apps.

The video shows me using the scanner on a Windows Flutter app, Android Flutter app and a txt file in Notepad to show the issue (The Windows and Android app are running the same code), (On the right hand side of the screen is a .java programme which shows the keys currently being pressed by the scanner. A line is printed when the scanner presses "Enter" on the keypad, this loses the focus on the TextField of course but I keep scanning multiple times after to show the inputs on the keyboard in the .java programme). You can see that for Android project it works perfect, for the Windows project it does not.

https://user-images.githubusercontent.com/58129064/113690599-e46fed00-96cb-11eb-9c11-9680aa2c94d0.mov


My Flutter doctor passes all tests.

**The code for the Project which the Android & Windows app are both using is below,** the console outputs for the 1st can on both projects are show at the end of the video. In this you can see the errors for the Windows machine compared to the perfect entry of the Android device :


<details> 
<summary>code sample</summary> 

```dart
void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {

  final FocusNode _focusNode = FocusNode();
  void _handleKeyEvent(RawKeyEvent event) {
    print(event.physicalKey.debugName);
  }

  @override
  Widget build(BuildContext context) {
    return RawKeyboardListener(
      focusNode: _focusNode,
      onKey: _handleKeyEvent,
      child: Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: Center(
          child: TextField(),
        ),
      ),
    );
  }
}
``` 

</details>
Repository: pytorch
Issue: bool_tensor.sum(dtype=torch.int32) creates int32-copy of the original int8 tensor 
Labels: triaged,module: boolean tensor,module: reductions

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

a summation of a uint8 (or bool) tensor into int32 causes unreasonably high memory usage. Presumably because of the tensor conversion to int32. See reproducible example with comments below.

## To Reproduce

Steps to reproduce the behavior:

```
import numpy as np
import torch
from torch import from_numpy

sz = 2900*1024**2
print(f"sz={sz/1024**2:.1f}MB") # ==> sz=2900.0MB

tensor_vcf = np.ones(sz, dtype=np.bool) # it's just 2.9GB, but you can't sum it up into int32 straight-forward using 15 GPU RAM of Google Colab

device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
cuda1_vcf = from_numpy(tensor_vcf).to(device)

cuda1_vcf.sum(dtype=torch.int32) # ==>  RuntimeError: CUDA out of memory. Tried to allocate 11.33 GiB (GPU 0; 14.73 GiB total capacity; 2.83 GiB already allocated; 10.96 GiB free; 2.83 GiB reserved in total by PyTorch)

```
<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

Sorry I don't have the Google Colab Notebook environment snapshot at hand right now :-/

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

 - PyTorch Version (e.g., 1.0):
 - OS (e.g., Linux):
 - How you installed PyTorch (`conda`, `pip`, source):
 - Build command you used (if compiling from source):
 - Python version:
 - CUDA/cuDNN version:
 - GPU models and configuration:
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->

@vadimkantorov friendly ping

cc @heitorschueroff @izdeby
Repository: go
Issue: all: replace `os.MkdirTemp` with T.TempDir
Labels: Testing,NeedsInvestigation

Following #45182 I propose to change all the calls to `os.MkdirTemp` in tests with `T.TempDir`.
The `os.MkdirTemp` is used 145 times in tests.

Currently `os.MkdirTemp` is not used consistently:
  - some tests use `t.Name()` as name
  - some tests use the test name as a literal string as name
  - some tests use a short name, or the test name with lowercase or inverted
    (as an example in `os_test.go`: `TestDirentRepeat` -> `direntRepeat-test`)

In the tests for the `os` package there is a support function:
```go
func newDir(testName string, t *testing.T) (name string) {
	name, err := os.MkdirTemp(localTmp(), "_Go_"+testName)
	if err != nil {
		t.Fatalf("TempDir %s: %s", testName, err)
	}
	return
}
```

This function can be probably removed.

One possible issue is mixing the use of `defer` and `T.Cleanup`, as an example in case of chdir to a temporary directory, resulting in an incorrect cleanup order; one example is  https://golang.org/cl/307189  but there seems to be other possible cases.

I would like to submit the change, but a lot of packages are involved; how should I proceed?
Probably I should start with the `std` module followed by `cmd` and `misc` (?).
Should I submit one change for package instead of one change for module?

Thanks.
Repository: deno
Issue: Resource limit for webworkers
Labels: web,suggestion

Is there a way to add resource limits to webworkers or check their current resource usage?

Chrome has support for the following:
```
window.performance
```
With this you can check current RAM usage, would be nice if we could check this of a webworker (preferably from the parent).
And maybe add CPU usage too?

I prefer limiting above getting stats otherwise i would have to build something that checks the stats every 10ms or so.
Repository: rust
Issue: Unhelpful / misleading error message and help message when using a reference to a vector
Labels: T-compiler,C-bug,A-coercions,A-iterators

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->
Hello,
There is a case where the Rust compiler error message is misleading. I tried this code :

```rust
fn main() {
    let mut values = vec![10, 11, 12];
    let v = &mut values;

    let mut max = 0;
    
    for n in v {
        max = std::cmp::max(max, *n);
    }

    println!("max is {}", max);
    println!("Converting to percentages of maximum value...");
    for n in v {
        *n = 100 * (*n) / max;
    }
    println!("values: {:#?}", values);
}
```

…which gives the following error message, and misleading « help » message :
```
error[E0382]: use of moved value: `v`
   --> src/main.rs:13:14
    |
3   |     let v = &mut values;
    |         - move occurs because `v` has type `&mut Vec<i32>`, which does not implement the `Copy` trait
...
7   |     for n in v {
    |              -
    |              |
    |              `v` moved due to this implicit call to `.into_iter()`
    |              help: consider borrowing to avoid moving into the for loop: `&v`
...
13  |     for n in v {
    |              ^ value used here after move
    |
```
Especially, the `help: consider borrowing to avoid moving into the for loop: '&v'` is the misleading part, does not help solve the problem at all, and sent me an a wrong path.
As I am new to Rust, this got me scratching my head for some time until someone explained it to me ([here](https://users.rust-lang.org/t/use-of-moved-value-when-using-a-reference-to-a-vector/57873/2)).
(And since the Rust compiler is most of the time very helpful, I did not even consider that its suggestion could be wrong haha. Hm.)
Instead of this, maybe a short message explaining how to reborrow the reference in this kind of situation would be more helpful and less misleading ?
Thank you.

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.48.0 (7eac88abb 2020-11-16)
binary: rustc
commit-hash: 7eac88abb2e57e752f3302f02be5f3ce3d7adfb4
commit-date: 2020-11-16
host: x86_64-unknown-linux-gnu
release: 1.48.0
LLVM version: 11.0
```
Repository: rust
Issue: no_std: binary size blowup using Result::unwrap since 1.49.0
Labels: P-medium,T-compiler,regression-from-stable-to-stable,I-heavy,ICEBreaker-Cleanup-Crew

Needed toolchains and targets to run the examples (nightly instead of 1.49.0 also works, 1.49.0 is the first release with the regression):

```bash
rustup toolchain add 1.48.0
rustup toolchain add 1.49.0
rustup target add thumbv7em-none-eabi --toolchain=1.48.0
rustup target add thumbv7em-none-eabi --toolchain=1.49.0
```

### Code

```
[package]
name = "foo"
version = "0.1.0"
edition = "2018"

[profile.release]
opt-level = 'z'
codegen-units = 1
panic = 'abort'
lto = true
```

```rust
#![no_std]
#![no_main]

#[no_mangle]
pub extern "C" fn _start() -> ! {
    let e: Result<(), ()> = Err(());
    e.unwrap();

    loop {}
}

#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
    loop {}
}
```

Compiled with:

```
cargo +1.49.0 build --release --target thumbv7em-none-eabi
```

I expected the all functions related to panics to be optimized away and the binary size to be relatively small:

Output with toolchain 1.48.0, everything is as expected:

```bash
$ nm target/thumbv7em-none-eabi/release/foo
000200e4 T _start
$ du -b  target/thumbv7em-none-eabi/release/foo
932	target/thumbv7em-none-eabi/release/foo
```

The same output when compiled with 1.49.0:

```bash
$ nm target/thumbv7em-none-eabi/release/foo
00020154 T _start
00020124 t _ZN45_$LT$$LP$$RP$$u20$as$u20$core..fmt..Debug$GT$3fmt17h83e1a6586aaeb498E
00020160 t _ZN4core3fmt9Formatter3pad17h81a3156a1ec5b453E
00020134 t _ZN4core3ptr13drop_in_place17h3eafc7c4aae35b40E
000204c4 t _ZN4core6option18expect_none_failed17h37d4a90aeed60e0cE
00020138 t _ZN4core6result19Result$LT$T$C$E$GT$6unwrap17hb9125050bd4dfd28E
0002015e t _ZN4core9panicking9panic_fmt17h49c6aff3292697f2E
$ du -b  target/thumbv7em-none-eabi/release/foo
11240	target/thumbv7em-none-eabi/release/foo
```

The binary size blew up by ~10kb. For my embedded program, this increase is too large and for my target and I cannot run the program anymore.

When I inline the code from `unwrap()` and call `panic!()` manually, the binary size reduces against drastically, though the symbols list still has a `panic_fmt` entry that is not optimized away since 1.49.0 (previous toolchains produce a minimal binary with no panic-related code in the binary, as expected):

```Rust
#![no_std]
#![no_main]

#[no_mangle]
pub extern "C" fn _start() -> ! {
    let e: Result<(), ()> = Err(());
    match e {
        Ok(()) => {}
        Err(err) => panic!("error: {:?}", err),
    }
    loop {}
}

#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
    loop {}
}
```

```
$ nm target/thumbv7em-none-eabi/release/foo
000200e4 T _start
000200ee t _ZN4core9panicking9panic_fmt17h49c6aff3292697f2E
$ du -b  target/thumbv7em-none-eabi/release/foo
1892	target/thumbv7em-none-eabi/release/foo
```


### Version it worked on

Toolchains below 1.49.0

### Version with regression

Toolchains since 1.49.0, including today's nightly.
Repository: vscode
Issue: [json] Pick part of JSON schema with more matching properties
Labels: feature-request,json

From https://github.com/microsoft/vscode-remote-release/issues/4806:

```json
{
	"dockerComposeFile": "docker-compose.yml",
	"service": "devcontainer",
	"workspaceFolder": "/workspace",
	"containerEnv": {
		"HTTP_PROXY": "${localEnv:HTTP_PROXY}",
		"HTTPS_PROXY": "${localEnv:HTTPS_PROXY}",
		"DOCKER_CWD": "${localWorkspaceFolder}"
	},
}
```

Shows warnings on `"dockerComposeFile"` and `"service"` and asks for `"build"` to be added when the smaller change would be to remove `"containerEnv"`.