sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Provide feedback on the presence of unexpectedly large Pictures created by an app
Labels: engine,c: performance,perf: memory,P2,team-engine,triaged-engine

We provide statistics on the count and memory size of all cached pictures on each frame, but there is sometimes a large amount of memory being consumed by the DisplayList or SkPicture objects associated with each frame.

For example, when investigating https://github.com/flutter/flutter/issues/92366 it was discovered that the way the sample code was written led to a 35mb SkPicture object being maintained as an asset on each frame even though only a tiny percentage of it was visible on any frame. While the DisplayList objects were a bit smaller, they still resulted in a 6.4mb DisplayList asset. Rewriting the code to only generate pictures for data that was visible resulted in a reduction in Picture asset memory to around 88kb/16kb needed.

We should provide a way to notify developers when they may be potentially using more memory for their ui.Picture objects than expected.
Repository: terminal
Issue: Add ability to not automatically copy whitespace-only selections
Labels: Help Wanted,Area-TerminalControl,Product-Terminal,Issue-Task

<!-- 
🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨

I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING:
1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement.
2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement.
3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number).
4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement.
5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement.

All good? Then proceed!
-->

Automatic copy to clipboard and clicking in the terminal window combine to overwrite the contents of the clipboard with some whitespace or a single character, far too often/easily.

I find myself, and I imagine others do as well, accidentally selecting something when clicking into the terminal to give it focus, which then wipes out whatever I had in the clipboard that I was about to paste.  Window's clipboard history allows retrieval, at least, but it's a few extra steps.

<!-- 
A clear and concise description of what the problem is that the new feature would solve.
Describe why and how a user would use this new functionality (if applicable).
-->

I can think of couple possible solutions off-hand:

- When both `copyOnSelect` is enabled, it would be wonderful to have an option to NOT automatically copy whitespace-only and/or single-character selections.
- Just automatically, quietly, don't do white-space only or single-character selections within a short period of the terminal window gaining focus. Getting the exact conditions for this could be tricky; something like "within the first 0.5 seconds of gaining focus, and only the first click/drag (or touch), ignore it".

<!-- 
A clear and concise description of what you want to happen.
-->

Either of these options (or something similar) should be basically invisible to the user, functioning to protect mistakes with minimal to no impact upon intentional actions, much like palm rejection in apps/systems does.
Repository: material-ui
Issue: Dark mode elevation: Make white overlay configurable in theme?
Labels: new feature,component: Paper

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

It would be nice to have an idiomatic way to customise the way white overlay is applied over `Paper` with elevation in dark mode. Currently, I haven't found any except for turning the `background-image` filter off globally and adding class based overrides to `Paper`.

Since customising `box-shadow` is enabled via a theme, would it also be possible to customise the white overlay opacity? Perhaps by changing the theme `shadows` into a full-on `elevation` that would contain both the `shadow` and `overlayOpacity` configuration?

If there already is a simple way of doing this that I just hadn't found, I'll be happy for pointers 🙂 

### Examples 🌈

_No response_

### Motivation 🔦

_No response_
Repository: terminal
Issue: Found multiple profiles with the same GUID in your settings file
Labels: Issue-Bug,Area-Settings,Product-Terminal,Priority-2

### Windows Terminal version (or Windows build number)

Windows Terminal Version: 1.11.2921.0

### Other Software

PowerShell (multiple versions)

### Steps to reproduce

I have multiple versions of PowerShell installed because I need to support all versions. I do not have WSL installed.

1. I deleted all of my PowerShell profiles and uninstalled PowerShell. My setttings.json file only contained CMD and Windows PowerShell 5.1. In that state, I did not get the error
2. I installed PowerShell 7.2 via the MSI package and installed PS 7.0.8 and 7.1.5 from zip files.
3. Launched Windows Terminal. It added profiles 7.1.5 and 7.0.8. It made 7.1.5 the default profile. It didn't add 7.2, which should have been the default. It is the version that is actually registered on the system (via MSI install). In this state, the error occurs.

I have edited the json file to ensure there are not duplicates. See my settings file attached to this issue
[LocalSettings-State.zip](https://github.com/microsoft/terminal/files/7530091/LocalSettings-State.zip)
.

### Expected Behavior

_No response_

### Actual Behavior

![image](https://user-images.githubusercontent.com/19415881/141527023-062b0731-f50a-426b-bf0e-29ff14ca64dd.png)
Repository: pytorch
Issue: Query CUDA version LibTorch has been compiled with
Labels: module: cuda,triaged,function request

## 🚀 Feature

Allow runtime querying the CUDA version LibTorch has been compiled with.

## Motivation

We might want to use different code paths depending on the CUDA version LibTorch has been compiled with. Depending on the implementation, this can only be found at runtime.

## Pitch

We want to be able to identify the CUDA version LibTorch has been compiled with. Ideally there would be a function defined in the torch namespace that would allow one to query this information.

I am happy to write a PR if you think this would be useful.

## Alternatives

An alternative, suggested by @t-vi in this [post](https://discuss.pytorch.org/t/query-cuda-version-at-runtime/136715/2?u=dfalbel) in the forum would be to have a macros defined in [version.h](https://github.com/pytorch/pytorch/blob/master/torch/csrc/api/include/torch/version.h.in) similar to what already happens with the Python package.

As a workaround It seems possible to identify the version by parsing the `build-version` file inside the pre-built binary package - but that doesn't seem reliable for most use cases.

## Additional context

- https://discuss.pytorch.org/t/query-cuda-version-at-runtime/136715
- https://github.com/mlverse/lltm/issues/2


cc @ngimel
Repository: terminal
Issue: Clean up CreateFile loop in ReadUTF8File
Labels: Area-Settings,Product-Terminal,Issue-Task,Area-CodeHealth

`ReadUTF8File` in the Settings library tries three times to read the settings file. If the size changes while it is being read, it'll try again.

Right now, the code looks like this (roughly):

```
while(tries) {
    open
    check permissions
    read in full
    check read size
}
```

It's expensive to open the file and check the permissions every time. Instead, we could:

```
open
check permissions
while (tries) {
    reset file pointer
    read in full
    check read size
}
```

That'll save us closing/reopening the file up to three times.
Repository: flutter
Issue: Help developers identify memory-intensive pictures and when they can avoid them.
Labels: c: new feature,engine,c: performance,d: devtools,perf: memory,P3,team-engine,triaged-engine

See https://github.com/flutter/flutter/issues/93561 and https://github.com/flutter/flutter/issues/92366#issuecomment-965965579

Problem: A developer can end up drawing a very large picture (in terms of memory usage) and only show a small amount of it on the screen.

Resolving #93561 should make it easier for developers to identify when this is happening. We should also provide some checks and/or documentation to help them with what to do about it.

For example, a runtime check could measure memory usage against the actual size of the picture that's drawn. We could provide a visual cue that highlights pictures using substantially greater memory than what is visually justified, similar to [debugInvertOversizedImages](https://api.flutter.dev/flutter/painting/debugInvertOversizedImages.html). We could also provide documentation about how to avoid these situations, e.g. by using lazy builders or drawing smaller subsets of the full picture to use what's actually on screen.

I think this will likely require changes in the engine - I'm not as sure about the framework. If we had such a flag we'd want it exposed in devtools.

/cc @flar @zanderso @goderbauer 
/cc @kenzieschmoll @jacob314
Repository: godot
Issue: .duplicating() freshly created ImageTextures leads to corruption/crashes
Labels: bug,topic:core,needs testing,crash

### Godot version

3.4.stable

### System information

Windows 10, GLES3, NVIDIA 471.41

### Issue description

If an `ImageTexture` is `.duplicated()` after immediately being created and having it's data set, the duplicate will have corrupted texture data.

Also, this appears to corrupt the heap and crash the application if the scale is sufficiently large (>2 works).

If I create an `ImageTexture` and fill it, then duplicate it, I'd expect two copies of the final product without corruption. I'd rather not have to wait on texture data being filled before I'm allowed to duplicate objects.

### Steps to reproduce

Attaching the following script to a `TextureRect` that fills the screen produces corrupted graphics.

```gdscript
extends TextureRect

var main:ImageTexture
var other:ImageTexture

var test_image := true

var scale := 0.5 # displays corrupted memory
#var scale := 2.0 # outright crashes

func _bind(to_texture:ImageTexture, image:Image) -> void:
	image = image.duplicate() # optional, but the real project does similar
	image.resize(image.get_width()*scale, image.get_height()*scale, Image.INTERPOLATE_NEAREST)
	to_texture.set_data(image)

func _ready() -> void:
	var image := Image.new()

	if test_image:
		# test with an image
		image.load("res://icon.png")
	else:
		# or test with a solid fill
		image.create(32, 32, false, Image.FORMAT_RGBA8)
		image.fill(Color.blue)

	main = ImageTexture.new()
	main.create(image.get_width(), image.get_height(), Image.FORMAT_RGBA8, Texture.FLAG_FILTER)

	# if the texture has data set before duplicating, it becomes corrupted
	_bind(main, image)

	other = main.duplicate()

# swap between the two textures for debugging
var flicker := true
var flicker_time := 0.0
func _process(delta: float) -> void:
	flicker_time = move_toward(flicker_time, 0, delta)
	if flicker_time == 0:
		texture = main if flicker else other
		flicker_time = 0.5
		flicker = not flicker
```

### Minimal reproduction project

_No response_
Repository: pytorch
Issue: [Lazy] Add torch.autograd.Function wrappers for the following ops in order to support dynamic shapes
Labels: triaged,lazy

Add torch.autograd.Function wrappers for the following ops similar to https://github.com/pytorch/pytorch/blob/71b89a9c85fb37844bef5ba0be5e8b7765c210de/lazy_tensor_core/test/dynamic_lazy_tensor5.py#L22-L35

- [ ] `addmm(Tensor self, Tensor mat1, Tensor mat2, *, Scalar beta=1, Scalar alpha=1) -> Tensor` grad for `mat1` : `mm_mat1_backward(grad, mat2, mat1.sizes(), mat1.strides(), alpha)`
- [ ] `cat(Tensor[] tensors, int dim=0) -> Tensor` grad for `tensors` : `cat_tensors_backward(grad, to_args_sizes(tensors), to_args_scalartypes(tensors), dim)`
- [ ] `div.Tensor_mode(Tensor self, Tensor other, *, str? rounding_mode) -> Tensor` grad for `result` : `rounding_mode.has_value() ? result.new_zeros(result.sizes()) : self_t / other_p - other_t * (self_p / other_p) / other_p`
- [ ] `expand(Tensor(a) self, int[] size, *, bool implicit=False) -> Tensor(a)` grad for `self` : `at::sum_to(grad, self.sizes())`
- [ ] `index_select(Tensor self, int dim, Tensor index) -> Tensor` grad for `self` : `index_select_backward(grad, self.sizes(), dim, index)`
- [ ] `mean(Tensor self, *, ScalarType? dtype=None) -> Tensor` grad for `self` : `grad.expand(self.sizes()).to(self.scalar_type()) / self.numel()`
- [ ] `mm(Tensor self, Tensor mat2) -> Tensor` grad for `self` : `mm_mat1_backward(grad, mat2, self.sizes(), self.strides(), 1)`
- [ ] `repeat(Tensor self, int[] repeats) -> Tensor` grad for `self` : `repeat_backward(grad, repeats, self.sizes())`
- [ ] `select.int(Tensor(a) self, int dim, int index) -> Tensor(a)` grad for `self` : `select_backward(grad, self.sizes(), dim, index)`
- [ ] `slice.Tensor(Tensor(a) self, int dim=0, int? start=None, int? end=None, int step=1) -> Tensor(a)` grad for `self` : `slice_backward_wrapper(grad, self.sizes(), dim, start, end, step)`
- [ ] `squeeze(Tensor(a) self) -> Tensor(a)` grad for `self` : `unsqueeze_to(grad, self.sizes())`
- [ ] `squeeze.dim(Tensor(a) self, int dim) -> Tensor(a)` grad for `self` : `unsqueeze_to(grad, dim, self.sizes())`
- [ ] `squeeze_(Tensor(a!) self) -> Tensor(a!)` grad for `self` : `unsqueeze_to(grad, self.sizes())`
- [ ] `squeeze_.dim(Tensor(a!) self, int dim) -> Tensor(a!)` grad for `self` : `unsqueeze_to(grad, dim, self.sizes())`
- [ ] `sum(Tensor self, *, ScalarType? dtype=None) -> Tensor` grad for `self` : `grad.expand(self.sizes())`
- [ ] `sum.dim_IntList(Tensor self, int[1] dim, bool keepdim=False, *, ScalarType? dtype=None) -> Tensor` grad for `self` : `sum_backward(grad, self.sizes(), dim, keepdim)`
- [ ] `topk(Tensor self, int k, int dim=-1, bool largest=True, bool sorted=True) -> (Tensor values, Tensor indices)` grad for `self` : `value_selecting_reduction_backward(grad, dim, indices, self.sizes(), true)`
- [ ] `view(Tensor(a) self, int[] size) -> Tensor(a)` grad for `self` : `grad.reshape(self.sizes())`
Repository: pytorch
Issue: List of issues to unblock dynamic shapes in Lazy Tensor
Labels: triaged,lazy

 
- [ ] Add autograd wrappers for ops that use sizes in their derivatives: https://github.com/pytorch/pytorch/issues/68287
- [ ] Add autograd wrappers for ops that take sizes as their arguments in forward. https://github.com/pytorch/pytorch/issues/68298
- [ ] Support `zeros` and `zeros_like` in Lazy TS backend, as autograd calls `zeros_like` and `zeros` : https://github.com/pytorch/pytorch/blob/71b89a9c85fb37844bef5ba0be5e8b7765c210de/torch/csrc/autograd/custom_function.cpp#L33
- [ ] Replace `sum_to` with `sum_to_size` and check if it works through a dispatcher
- [ ] Add a python binding to generate a check that gradients for outputs match output shapes in LTC IR: https://github.com/pytorch/pytorch/blob/71b89a9c85fb37844bef5ba0be5e8b7765c210de/torch/autograd/__init__.py#L36
- [ ] Generate a list of compound ops that use ` sizes` for hf_Bert, MaskRCNN
- [ ] Rewrite compound ops that use `sizes` in python or handle `size()` in C++
Repository: pytorch
Issue: INTERNAL ASSERT FAILED at "/opt/conda/conda-bld/pytorch_1634272068185/work/aten/src/ATen/native/LinearAlgebraUtils.h":244
Labels: triaged,module: linear algebra

## 🐛 Bug

Calling `torch.linalg.svd` on a large float64 tensor on the CPU (size 90k x ~34k) leads to this error. `torch.linalg.eigh` on `tensor.T@tensor` seg faults.
## To Reproduce

Steps to reproduce the behavior:

1. I don't know. I have a large tensor of type float64. Calling `torch.linalg.svd`on it produces this error.

```
Intel MKL ERROR: Parameter 12 was incorrect on entry to DGESDD.
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
/tmp/ipykernel_3300/2679862595.py in <module>
----> 1 torch.linalg.svd(tensor)

RuntimeError: falseINTERNAL ASSERT FAILED at "/opt/conda/conda-bld/pytorch_1634272068185/work/aten/src/ATen/native/LinearAlgebraUtils.h":244, please report a bug to PyTorch. svd_cpu: Argument 12 has illegal value. Most certainly there is a bug in the implementation calling the backend library.
```
## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Environment

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): '1.10.0'
 - OS (e.g., Linux): Linux
 - How you installed PyTorch (`conda`, `pip`, source): conda
 - Build command you used (if compiling from source):
 - Python version: 3.9.5
 - CUDA/cuDNN version:
 - GPU models and configuration:On the CPU
 - Any other relevant information:

## Additional context
`torch.linalg.eigh` on `tensor.T@tensor` seg faults.

cc @jianyuh @nikitaved @pearu @mruberry @walterddr @IvanYashchuk @xwang233 @Lezcano
Repository: pytorch
Issue: [DDP] Debug mode should ensure reduction is finished in backward pass
Labels: oncall: distributed,better-engineering,pt_distributed_rampup,module: ddp

## 🚀 Feature

Currently if something goes wrong in DDP reduction, it will be reported in the next forward pass, i.e. in `ensure_prior_reduction_finished`: https://github.com/pytorch/pytorch/blob/master/torch/csrc/distributed/c10d/reducer.cpp#L1657.

This is due to perf reasons where we don't want to do a hard wait/barrier in the backwards pass for performance reasons.

However, this can have issues, i.e. if user has a collective before DDP forward pass, then will result in a hang, but ideally we'd like to report something went wrong with the reduction in the backward pass. Thus in debug_mode, we can use `queue_callback` to insert a barrier and some logging about parameters that had issues (i.e. gradient hooks not fired) during the backward pass. We'd have to ensure `queue_callback` can be called multiple times and the ordering is such that this one runs after the one that DDP reducer inserts.

cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @SciPioneer @H-Huang
Repository: pytorch
Issue: [Lazy] Add torch.autograd.Function wrappers for the following ops in order to support dynamic shapes
Labels: triaged,lazy

Add torch.autograd.Function wrappers for the following ops similar to https://github.com/pytorch/pytorch/blob/71b89a9c85fb37844bef5ba0be5e8b7765c210de/lazy_tensor_core/test/dynamic_lazy_tensor5.py#L22-L35

- [ ] `as_strided(Tensor(a) self, int[] size, int[] stride, int? storage_offset=None) -> Tensor(a)`
- [ ] `as_strided_(Tensor(a!) self, int[] size, int[] stride, int? storage_offset=None) -> Tensor(a!)`
- [ ] `empty.memory_format(int[] size, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None, MemoryFormat? memory_format=None) -> Tensor`
- [ ] `empty_strided(int[] size, int[] stride, *, ScalarType? dtype=None, Layout? layout=None, Device? device=None, bool? pin_memory=None) -> Tensor`
- [ ] `expand(Tensor(a) self, int[] size, *, bool implicit=False) -> Tensor(a)`
- [ ] `view(Tensor(a) self, int[] size) -> Tensor(a)`
Repository: vscode
Issue: js-debug console.log type messages do not include source links if additional objects are present
Labels: bug,debug

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
Version: 1.62.2
Commit: 3a6960b964327f0e3882ce18fcebd07ed191b316
Date: 2021-11-11T20:59:05.913Z
Electron: 13.5.2
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Darwin x64 20.6.0

Steps to Reproduce:

1. Create a new JavaScript Debug Terminal
2. Create a small example file like:

```
console.log("simple string param");
console.log("multiple", "string", "params");
console.log("Hello world!", { abc: 321} );
debugger;
```
3. Run the program with `node <program>.js` and step past the `console.log`

The the first few log statements will include a link back to the original call, but the last log statement will be expandable and not include a link back to the source.

<img width="689" alt="Screen Shot 2021-11-12 at 5 29 27 PM" src="https://user-images.githubusercontent.com/22535/141600721-efd1c913-d74f-4e6f-8334-553fcf3132fd.png">

It would be helpful to be able to jump to those log statements as well.
Repository: vscode
Issue: Cursor Follow Outline
Labels: feature-request,outline

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->
Just looking at the function/symbol name might not be good enough in the outline, and so it might be useful if the cursor in a file automatically moved to the declaration/definition of the symbol in reaction to scrolling in the outline view (the small box on the left). This way I do not have to press enter at every object in the outline to see what is going on there.

This would practically be the inverse of "follow cursor" as shown here:
https://www.youtube.com/watch?v=PpLyVv8BG3k&ab_channel=Code2020

Thanks!