sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: There is a problem with GPU memory reclamation
Labels: module: memory usage,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

The following code causes the GPU memory to overflow (GPU Memory Usage: 12959MB):
```
import torch

distances = []

VA = torch.randn(1, 40, 64, 1, 1).cuda()
VB = torch.ones(64, 1, 64, 128, 128).cuda()

VA.requires_grad = True
VB.requires_grad = True

for i in range(40):
    VA_ = VA[:,i].unsqueeze(1)
    distance = VB - VA_
    distance = torch.square(distance)
    distance = torch.sum(distance,dim=2)
    distances.append(distance)
distances = torch.cat(distances, dim=1)
distances = distances.cuda()
```

However, if we compute the 'distances'in the CPU first, then move the 'distances'tensor to the GPU, the GPU memory would not overflow (GPU Memory Usage: 2659MB). The reproduced code is as follows,

```
import torch

distances = []

VA = torch.randn(1, 40, 64, 1, 1).cpu()
VB = torch.ones(64, 1, 64, 128, 128).cpu()

VA.requires_grad = True
VB.requires_grad = True


for i in range(40):
    VA_ = VA[:,i].unsqueeze(1)
    distance = VB - VA_
    distance = torch.square(distance)
    distance = torch.sum(distance,dim=2)
    distances.append(distance)
distances = torch.cat(distances, dim=1)
distances = distances.cuda()
```

It means that the 'distances' from different computing devices would utilize different memory.
In my opinion, this is wrong.

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Environment

 - PyTorch Version (e.g., 1.0):
This bug is reproduced in three pytorch versions, including 1.7, 1.8, and 1.10.
Other than these three version, I haven't tried the other version. 

 - OS (e.g., Linux): Ubuntu 16.04


## Additional context

<!-- Add any other context about the problem here. -->
Repository: pytorch
Issue: `torch.utils.checkpoint.checkpoint_sequential` is not optimal
Labels: module: checkpoint,triaged

## 🐛 Bug

It is not exactly a bug, but some inefficiency of the implementation which is easy to fix. `torch.utils.checkpoint.checkpoint_sequential` splits given sequential model into `segments` approximately equal pieces. The problem is that now last piece may be significantly larger than the other pieces which leads to some ineffeciency of the memory footprint (assuming that all submodules of sequential module are the same. I guess it is the main use case of this function).

Let us look at the current implementation:
```
segment_size = len(functions) // segments
# the last chunk has to be non-volatile
end = -1
for start in range(0, segment_size * (segments - 1), segment_size):
    end = start + segment_size - 1
    input = checkpoint(run_function(start, end, functions), input,
                       preserve_rng_state=preserve)
return run_function(end + 1, len(functions) - 1, functions)(input)
```

For sequential module of the length 9 and for 5 segments, it will produce [1, 1, 1, 1, 5] split. Whereas more memory efficient split would be [1, 2, 2, 2, 2] or even [2, 2, 2, 2, 1]. So now we get some memory overhead which can be eliminated by the correct splitting.
Repository: storybook
Issue: Actions: Clear log on remount
Labels: feature request,addon: actions,needs triage

Similar to Interactions, I think we should clear the Actions panel when remounting. Currently it only clears when switching stories.
Repository: electron
Issue: [Bug]: Kiosk mode is poorly documented
Labels: documentation :notebook:,status/confirmed,pr welcome

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.

### Electron Version

16.0.0

### What operating system are you using?

Ubuntu

### Operating System Version

Ubuntu Mate 20.04

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

Application should run in kiosk mode.
I am setting the window params like this:
```
const win = new BrowserWindow({
        width: 1080,
        height: 1920,
        autoHideMenuBar: true,
        useContentSize: true,
        resizable: false,
        kiosk: true,
        webPreferences: {
            preload: path.join(__dirname, "preload.js")
        }
    });
```
a debug output clearly shows, that the kiosk mode is active:
```
console.log("Is kiosk:", win.isKiosk());
```
=> outputs: ```Is kiosk: true```

These settings are working under Ubuntu running Xfce, it seems that there is a problem with the mate desktop env?

### Actual Behavior

Application opens windowed, showing close and minimize buttons.

### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: create-react-app
Issue: react-scripts uses older version of react-dev-utils i.e, v11.0.3
Labels: stale,needs triage

Hi
when I used react-scripts package , the version of react-dev-utils which I got is v11.0.3 instead of v11.0.4 , as the older version of react-dev-utils uses immer of version 8.0.1 which has type confusion vulnerability , it is effecting my work kindly resolve this issue.
Repository: TypeScript
Issue: Support React Native Platform-specific extensions in TypeScript with Import Unions
Labels: Suggestion,Awaiting More Feedback

# Suggestion

## 🔍 Search Terms

react native platform forking 

## ✅ Viability Checklist

My suggestion meets these guidelines:

* [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [X] This wouldn't change the runtime behavior of existing JavaScript code
* [X] This could be implemented without emitting different JS based on the types of the expressions
* [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [X] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

## ⭐ Suggestion

Support React Native Platform-specific extensions in TypeScript by typing the
import as a type union of the available modules.

In React Native any module file can be replaced by a platform-specific
implementation. For example a `UserProfileImage.tsx` module can have additional
implementations such as `UserProfileImage.windows.tsx` ,
`UserProfileImage.macos.tsx` and `UserProfileImage.ios.tsx`. React Native will
resolve to module with the most specificity, and each platform will bundle with
its own file.

This suggestion is to add support in TypeScript to support platform-specific
extensions in such a way that importing a forked module will type it as
a Union Type combining the type of each of the forked modules.

The react native resolution would be enabled as a typescript configuration, together
with a list of platforms to support.

## 📃 Motivating Example

Say we have the following file modules:

- `UserProfileImage.tsx`
- `UserProfileImage.windows.tsx`
- `UserProfileImage.macos.tsx`
- `UserProfileImage.android.tsx`

Which is imported as follows:

```typescript
import UserProfileImage from "./UserProfileImage"
```

Because `UserProfile` is a forked module, the resulting UserProfile type will
not be the base module (or any of the forks), but a union type of all of
them. Essentially, with tokens matching the filename the type will be as follows:

```typescript
type UserProfileModule =
    | typeof UserProfileImage
    | typeof UserProfileImageWindows
    | typeof UserProfileImageIOS        
    | typeof UserProfileImageAndroid;
```
This will provide type safety for the imported module, and ensure that the code
works in all the represented platforms.

## 💻 Use Cases

This will be useful for any React Native project using Platform-specific extensions. Currently the easiest way to solve this is to fork TypeScript and modify the module resolution to handle the platforms as a set of file extensions and run TypeScript once per platform, with different parameters.
Repository: pytorch
Issue: istft gradcheck fails on ROCm
Labels: module: autograd,module: rocm,triaged,module: fft

## 🐛 Bug

The `OpInfo`gradcheck test being added in #68198 fails on ROCm.

## To Reproduce

Remove the test skip from `istft`'s `OpInfo`:
https://github.com/pytorch/pytorch/blob/81ab5d165f786bb64d844d89b3f596e65f5f53cb/torch/testing/_internal/common_methods_invocations.py#L8592-L8593


cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @soulitzer @Lezcano @Varal7 @jeffdaily @sunway513 @jithunnair-amd @ROCmSupport @KyleCZH @mruberry @peterbell10
Repository: pytorch
Issue: Strides issue on unsqueezed channels last tensor
Labels: triaged,module: memory format

## 🐛 Bug

## To Reproduce

```python
t = torch.rand(1, 3, 32, 32).to(memory_format=torch.channels_last)
print(t.stride()) # (3072, 1, 96, 3)
print(t[0].stride())  # (1, 96, 3)
tt = t[0].unsqueeze(0)
print(tt.stride())  # (3, 1, 96, 3)
```
I'd expect stride[0] to be 3072.

On C++ side, I have an impression that due to that we can observe an incoherence with memory format:
```c++
auto t = at::rand({1, 3, 32, 32}).contiguous(at::MemoryFormat::ChannelsLast);
std::cout << t.sizes()
> [1, 3, 32, 32]
std::cout << t.suggest_memory_format()
> ChannelsLast
std::cout << (t.is_contiguous(at::MemoryFormat::ChannelsLast) ? "true" : "false");
> true

auto t0 = t[0];
auto t1 = t0.unsqueeze(0);
std::cout << t0.sizes()
> [3, 32, 32]
std::cout << t1.sizes()
> [1, 3, 32, 32]
std::cout << (t1.is_contiguous(at::MemoryFormat::ChannelsLast) ? "true" : "false");
> true
std::cout << t1.suggest_memory_format()
> Contiguous   <------ ????
```
I'd expect `t1.suggest_memory_format()` to give `ChannelsLast`

## Environment

PyTorch 
```
__version__ = '1.11.0a0+gitd4ae789'
debug = True
cuda = None
git_version = 'd4ae7896554d156732de34c3d3600050f9cb18ec'
hip = None
```

cc @VitalyFedyunin @jamesr66a
Repository: youtube-dl
Issue: add site support for txxx.com and quality selection too if possible
Labels: site-support-request

<!--

######################################################################
  WARNING!
  IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN ISSUE CLOSED AS INCOMPLETE
######################################################################

-->


## Checklist

<!--
Carefully read and work through this check list in order to prevent the most common mistakes and misuse of youtube-dl:
- First of, make sure you are using the latest version of youtube-dl. Run `youtube-dl --version` and ensure your version is 2021.06.06. If it's not, see https://yt-dl.org/update on how to update. Issues with outdated version will be REJECTED.
- Make sure that all provided video/audio/playlist URLs (if any) are alive and playable in a browser.
- Make sure that site you are requesting is not dedicated to copyright infringement, see https://yt-dl.org/copyright-infringement. youtube-dl does not support such sites. In order for site support request to be accepted all provided example URLs should not violate any copyrights.
- Search the bugtracker for similar site support requests: http://yt-dl.org/search-issues. DO NOT post duplicates.
- Finally, put x into all relevant boxes (like this [x])
-->

- [x] I'm reporting a new site support request
- [x] I've verified that I'm running youtube-dl version **2021.06.06**
- [x] I've checked that all provided URLs are alive and playable in a browser
- [x] I've checked that none of provided URLs violate any copyrights
- [x] I've searched the bugtracker for similar site support requests including closed ones


## Example URLs

<!--
Provide all kinds of example URLs support for which should be included. Replace following example URLs by yours.
-->

- Single video: https://www.youtube.com/watch?v=BaW_jenozKc
- Single video: https://youtu.be/BaW_jenozKc
- Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc


## Description

<!--
Provide any additional information.
If work on your issue requires account credentials please provide them or explain how one can obtain them.
-->

WRITE DESCRIPTION HERE
Repository: flutter
Issue: [web] Add proper support for boxHeightStyle and boxWidthStyle
Labels: a: text input,a: typography,platform-web,e: web_html,P2,team-web,triaged-web

[`Paragraph.getBoxesForRange`](https://api.flutter.dev/flutter/dart-ui/Paragraph/getBoxesForRange.html) receives `boxHeightStyle` and `boxWidthStyle` as arguments but they are being ignored. This is causing some tests to fail (e.g. the ["text selection style 2"](https://github.com/flutter/flutter/blob/245168f85c7e6ea32b2019c73b39c28f481098d0/packages/flutter/test/material/text_field_test.dart#L840) test in `test/material/text_field_test.dart`).
Repository: flutter
Issue: Proposal to allow customization of the TextField toolbar
Labels: a: text input,framework,f: material design,c: proposal,team-design,triaged-design


**Use case:**

I have a simple TextField in my web app and I want to give the user custom options when they right-click on it (like 'set to default value'), this conflicts with the default TextField toolbar (copy, paste, etc). I have ways to show a custom ContextMenu that work fine in other cases, but the problem is the TextField consumes right-click events even if you disable the toolbar, so even if I add a GestureDetector, it doesn't notify me when the user right-clicks on the TextField.

I tried this:
`toolbarOptions: ToolbarOptions(
   selectAll: false,
   paste: false,
   cut: false,
   copy: false,
),`
on the TextField, and the toolbar no longer shows, but the right-click event is still consumed.

**Proposal:**

Either add a way to completely disable the toolbar, to allow custom handling of right-click events.
Or allow a way to add custom actions to the toolbar, and preferably some visual customization options.


Thanks for your time.
Repository: create-react-app
Issue: Latest version of react-dev-utils using immer v8.0.1
Labels: needs triage,issue: bug report

when I used react-dev-utils , the version of immer which I got is v8.0.1 instead of  v9.0.6, immer of version 8.0.1 which has type confusion vulnerability , it is effecting my work kindly resolve this issue.
Repository: TypeScript
Issue: TemplateStringsArray could contain undefined and should always have index 0
Labels: Suggestion,Awaiting More Feedback

# Bug Report

### 🔎 Search Terms

TemplateStringsArray undefined

### 🕗 Version & Regression Information

- This is a crash
- This changed between versions ______ and 4.4.4
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because _______

### ⏯ Playground Link

[Playground link with relevant code 1](https://www.typescriptlang.org/play?noUncheckedIndexedAccess=true#code/GYVwdgxgLglg9mABMMAKKBTAtgBwDYCGmAXIgCrb5EYDKUATjGAOYDOAgvfQQJ4CUpVgybNEAbwBQiaYnoYoIekky5CmAHTcA7gG0ADAF0A3BIC+QA)

[Playground link with relevant code 2](https://www.typescriptlang.org/play?#code/GYVwdgxgLglg9mABMJAKKBTAtgBwDYCGmAXIgCrb5EYDKUATjGAOYDOAgvfQQJ4CUpVgybNEAbwBQiaYnoYoIekky5CmANoAGALoBuCQF8gA)

### 💻 Code

```ts
function fn (template :TemplateStringsArray) :string {
    return template.raw[0];
}
```

```ts
function fn (template :TemplateStringsArray) :string {
    return template[0];
}
```

### 🙁 Actual behavior

1. the first sample throw an error (when `"noUncheckedIndexedAccess": true`)

2. the second sample doesn't throw an error (when `"noUncheckedIndexedAccess": false`)

### 🙂 Expected behavior

1. the first sample should never throw an error (because 0 index of `template.raw` will always be a string):

```js
console.log``;// [ '' ]
```

2. the second sample should always throw an error (because item of `template` could be `undefined`):

```js
console.log`\unknown`;// [ undefined ]
```
Repository: ant-design
Issue: Typography.Text ellipsis does not re-expand correctly when copyable={ true }
Labels: 🐛 Bug,help wanted,Inactive

- [x] 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://codepen.io/AbhinavVishak/pen/xxLmZWj?editors=0010](https://codepen.io/AbhinavVishak/pen/xxLmZWj?editors=0010)

### Steps to reproduce
Drag the slider smaller, to compress text then expand

### What is expected?
Typography.Text should re-expand occupying the parent container, just like Typography.Paragraph

### What is actually happening?
The typography.Text remains in the smallest width with ellipsis and title

| Environment | Info |
|---|---|
| antd | 4.17.0 |
| React | 17.0.2 |
| System | Macos Monterey |
| Browser | Chrome 95.0.4638.69 |


<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: neovim
Issue: defaults: restore cursor position when opening a file
Labels: enhancement,defaults,compatibility,events

### Feature already in Vim?

Yes, Vim 7.4.2111

### Feature description

What it says on the tin. Vim uses an autocommand in `defaults.vim` for this: https://github.com/vim/vim/blob/728104da6cd561b8cb2c7142769f7526d725958e/runtime/defaults.vim#L103-L110

(Note: This is the last open item transferred from #6289 so that that issue could be put out of its misery.)
Repository: rust
Issue: Tracking Issue for RFC #2972: Constrained Naked Functions 
Labels: B-RFC-approved,T-lang,A-naked,C-tracking-issue,disposition-merge,finished-final-comment-period,S-tracking-ready-to-stabilize,F-naked_functions

This is a tracking issue for the RFC "Constrained Naked Functions" (rust-lang/rfcs#2972).
The feature gate for the issue is `#![feature(naked_functions)]`.

### About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.

### Steps
<!--
Include each step required to complete the feature. Typically this is a PR
implementing a feature, followed by a PR that stabilises the feature. However
for larger features an implementation could be broken up into multiple PRs.
-->

- [x] Implement the RFC
- [x] Confirm that all errors and warnings are emitted properly
- [ ] Final review of attributes that are incompatible with `#[naked]`
- [ ] Determine precise inlining gurantees
- [x] Adjust documentation ([see instructions on rustc-dev-guide][doc-guide])
- [x] Stabilization PR ([see instructions on rustc-dev-guide][stabilization-guide])
  - https://github.com/rust-lang/rust/pull/134213

[stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr
[doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs

### Unresolved Questions
<!--
Include any open questions that need to be answered before the feature can be
stabilised.
-->

None.

### Implementation history

<!--
Include a list of all the PRs that were involved in implementing the feature.
-->
Repository: node
Issue: fsPromises.mkdir() returns an incomplete path when the recursive option is passed
Labels: fs

### Version

17.0.0

### Platform

Linux failsafe 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

### Subsystem

file system

### What steps will reproduce the bug?

```js
const { mkdir } = require('fs/promises');
const { resolve } = require('path');

async function makeDirectory () {
  const path = resolve('./test/project/lol/hi')
  const dirCreation = await mkdir(path, { recursive: true });
  
  return dirCreation;
}

console.log(makeDirectory());
```

will log/return `/home/bnb/GitHub/tmp/promisesmkdir/test` rather than `/home/bnb/GitHub/tmp/promisesmkdir/test/project/lol/hi`, despite actually creating the latter.

### How often does it reproduce? Is there a required condition?

100% of the time as far as I can tell.

### What is the expected behavior?

Output the full path.

### What do you see instead?

A partial path, seemingly just the first directory that was created rather than every directory that was created.

### Additional information

<3
Repository: vscode
Issue: Debugging on OSX with iTerm as external terminal creates a new window each time
Labels: feature-request,debug

Issue Type: <b>Bug</b>

I don't know whether this should count as a bug report or a feature request, but since the behaviour differs between Terminal and iTerm I've filed it as a bug.

--- 

To reproduce, simply start a debugging session using the following settings:
* settings.json
```
  "terminal.explorerKind": "external",
  "terminal.external.osxExec": "iTerm.app",
```
* launch.json
```
   "console":"externalTerminal",
``` 


This will send the command to start the debugging server and execute the program to iTerm, but it will create a new window and session each time, regardless of whether there are any existing windows open, including windows created from previous debugging sessions. 

The expected behavior is to use the same terminal session when debugging the same program multiple times. This is also in line with how Terminal behaves when it is used as the external terminal, as successive debugging attempts will use the same window/session as previous runs.

---

VS Code version: Code 1.62.2 (3a6960b964327f0e3882ce18fcebd07ed191b316, 2021-11-11T20:59:05.913Z)
OS version: Darwin x64 19.6.0
Restricted Mode: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz (4 x 2300)|
|GPU Status|2d_canvas: enabled<br>gpu_compositing: enabled<br>metal: disabled_off<br>multiple_raster_threads: enabled_on<br>oop_rasterization: enabled<br>opengl: enabled_on<br>rasterization: enabled<br>skia_renderer: disabled_off_ok<br>video_decode: enabled<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|8, 6, 5|
|Memory (System)|16.00GB (0.10GB free)|
|Process Argv|--crash-reporter-id e272faef-ec57-439e-960e-46857511d6ef|
|Screen Reader|no|
|VM|0%|
</details>
<!-- generated by issue reporter -->
Repository: godot
Issue: set_as_top_level problem with modulate
Labels: discussion,topic:core,documentation,topic:2d

### Godot version

3.4 stable

### System information

w10 64

### Issue description

Activating "set_as_top_level" on a sprite node causes that node not to inherit "modulate" from the parent.



### Steps to reproduce

Add node2d
add two sprite nodes as his sons
Active "set_as_top_level" in a sprite node
Change the modulate of the node2D sprite father
Run the program

sprite with "set_as_top_level" activated does not inherit modulate from parent

### Minimal reproduction project

[testModulate.zip](https://github.com/godotengine/godot/files/7549500/testModulate.zip)