sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: torch.view_copy(x, dtype) diverges from eager when the destiny dtype has less bytes than the origin
Labels: triaged,module: functionalization,oncall: pt2

### 🐛 Describe the bug

```python
import torch

def fn(x):
    return torch.view_copy(x, torch.int8)

x = torch.zeros((2, ), dtype=torch.int32, device='cuda') + 0x00010203

assert torch.allclose(fn(x), torch.compile(fn)(x))
```

We get:
```python
tensor([3, 3], device='cuda:0', dtype=torch.int8)                      # compiled
tensor([3, 2, 1, 0, 3, 2, 1, 0], device='cuda:0', dtype=torch.int8)    # eager
```

Looking at the generated code 
```python
@triton.jit                                                                                                                                                                                                          
def triton_(in_ptr0, out_ptr0, xnumel, XBLOCK : tl.constexpr):                                                                                                                                                       
    xnumel = 2                                                                                                                                                                                                       
    xoffset = tl.program_id(0) * XBLOCK                                                                                                                                                                              
    xindex = xoffset + tl.arange(0, XBLOCK)[:]                                                                                                                                                                       
    xmask = xindex < xnumel                                                                                                                                                                                          
    x0 = xindex                                                                                                                                                                                                      
    tmp0 = tl.load(in_ptr0 + (x0), xmask)                                                                                                                                                                            
    tmp1 = tmp0.to(tl.int8)                                                                                                                                                                                          
    tl.store(out_ptr0 + (x0), tmp1, xmask)    
```
we see that we use `.to` in triton, which does a semantic cast, not a bitwise cast. It's not easy to generate the correct kernel in triton without using a few ad-hoc tricks AFAIK. We should just fallback in this case.

### Versions

master

cc @bdhirsh @ezyang @anijain2305 @chauhang @penguinwu
Repository: pytorch
Issue: Setting the 0D tensor of only one element to `fill_value` of `full()`/`full_like()` works against error message
Labels: module: docs,module: error checking,triaged,actionable,module: python frontend

### 🐛 Describe the bug

Setting the 1D tensor of only one element to `fill_value` of [full_like()](https://pytorch.org/docs/stable/generated/torch.full_like.html) gets the error as shown below:

```python
import torch

my_tensor = torch.tensor([0, 1, 2])

torch.full_like(input=my_tensor, fill_value=torch.tensor([8])) # Error
```

> TypeError: full_like(): argument 'fill_value' must be Number, not Tensor

But setting the 0D tensor of only one element to `fill_value` of `full_like()` works against the error message above as shown below:

```python
import torch

my_tensor = torch.tensor([0, 1, 2])

torch.full_like(input=my_tensor, fill_value=torch.tensor(8)) # tensor([8, 8, 8])
```

### Versions

```python
import torch

torch.__version__ # 2.3.0+cu121
```

cc @svekars @brycebortree @malfet @albanD
Repository: node
Issue: Allow `Buffer.copy` to take an `ArrayBuffer`
Labels: buffer,feature request,performance

### What is the problem this feature will solve?

Avoid creating a temporary typed buffer:

```js
Buffer.from(arrayBuffer).copy(dst, 0)
```

### What is the feature you are proposing to solve the problem?

```js
Buffer.copy(arrayBuffer, dst, 0)
```

### What alternatives have you considered?

_No response_
Repository: react-native
Issue: Add support for textAlign:start/end
Labels: Help Wanted :octocat:,p: Facebook,Partner,Never gets stale

### Description

React Native is missing support for `textAlign:start` and `textAlign:end` on Text and TextInput elements - https://developer.mozilla.org/en-US/docs/Web/CSS/text-align#syntax

These values are important for supporting RTL layouts, and should react to the `direction` style on ancestral Views on all platforms.

### Steps to reproduce

1. Set textAlign:end
2. Notice it doesn't work

### React Native Version

0.75

### Affected Platforms

Runtime - Android, Runtime - iOS

### Output of `npx react-native info`

```text
.
```


### Stacktrace or Logs

```text
.
```


### Reproducer

.

### Screenshots and Videos

_No response_
Repository: PowerToys
Issue: Keyboard settings
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

v0.82.0

### Installation method

PowerToys auto-update

### Running as admin

None

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

Hi! I´m using Power Toys, but in the option "keyboard manager" i can´t change in the keyboard MAC the key to extract the CD to the delete key. Could you help me with the procedure?

### ✔️ Expected Behavior

Replace CD rip feature by delete

### ❌ Actual Behavior

It does not exist or I cannot find the name of the CD extract key to replace its function.

### Other Software

_No response_
Repository: go
Issue: x/build/cmd/relui: consider failing to add a reviewer a soft failure
Labels: Builders,NeedsFix

Right now the `CreateAutoSubmitChange` method is willing to create a CL, fail to add a reviewer, and report the failure to the caller. This leaves CLs behind and is generally not the optimal behavior. Instead it should log the problem but otherwise proceed, provided the CL itself was successfully created.

CC @golang/release, @thanm.
Repository: ant-design
Issue: Default value for List's add operation deleted when strictmode and preserve is false
Labels: 🐛 Bug,Inactive

### Reproduction link

[![Edit on StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/react-vogfax?file=demo.tsx)

### Steps to reproduce

create a list form
add `<StrictMode>`
add preserve={false} to the form
add default value for the add operation

### What is expected?

adds a list item with the default value

### What is actually happening?

default value gets deleted

| Environment | Info |
| --- | --- |
| antd | 5.19.0 |
| React | 18.3.1 |
| System | Windows 11 |
| Browser | Chrome 126.0 |

---
I think form has a bug with useEffect

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: godot
Issue: Fullscreen mode's border color does not update when transparent background is disabled
Labels: bug,platform:windows,topic:porting

### Tested versions

v4.3.dev6.official [89850d553]
v4.3.beta2.official [b75f0485b]

### System information

Godot v4.3.dev6 - Windows 10.0.19044 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.5161) - Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz (16 Threads)

### Issue description

I have transparency and borderless enabled on my main window for a splash screen which I then disable when the game loads, but Fullscreen mode which normally draws a 1 pixel border of clear color draws a transparent border instead despite disabling transparency.

I would expect the 1 pixel border to be the solid default clear color.



### Steps to reproduce

1) Enable Transparency, Per Pixel Transparency, Borderless, and a transparent PNG splash screen in the project settings.
2) Run a script that disables Window.transparency and switches Window.mode to Fullscreen when the game loads.

The 1 pixel border is transparent instead of the clear color.

Oddly, if Transparency is disabled in the project settings and enabled when the game loads the border is also transparent even though I'd expect it to be black if it weren't being updated.

### Minimal reproduction project (MRP)

[transparent-splash-fullscreen-mrp.zip](https://github.com/user-attachments/files/16073122/transparent-splash-fullscreen-mrp.zip)
Repository: node
Issue: Workers only pipe one message to stdout before they stop running
Labels: worker

### Version

22.4.0 (i also tried earlier versions and the bug is always present)

### Platform

Both in Linux and Windows, all OS versions.


### Subsystem

worker_threads

### What steps will reproduce the bug?

```js
const { Worker } = require("worker_threads");

let worker = new Worker(`function print_three_and_work(){
	console.log("a");
	console.log("b");
	console.log("c");

	while(true){}
}

print_three_and_work();`, {eval: true});
```

or

```js
const { Worker } = require("worker_threads");

let worker = new Worker(`function print_three_and_work(){
	console.log("a");
	console.log("b");
	console.log("c");

	while(true){}
}

print_three_and_work();`, {eval: true, stdout: true});

worker.stdout.on("data", function(chunk){
	process.stdout.write(chunk);
});
```

### How often does it reproduce? Is there a required condition?

It always happens.

### What is the expected behavior? Why is that the expected behavior?

All logged messages should be piped to the main thread's stdout while the worker is running.

### What do you see instead?

Only the first message is piped. All other messages are not piped while the worker is running. They get piped all at once once the worker stops running.

(I see "a" instead of seeing "a \n b \n c".)

### Additional information

https://github.com/nodejs/node/issues/40961

I believe this other issue has a similar problem but it was misunderstood as having something to do with "process.exit", while instead it must be because of something else.
Repository: flutter
Issue: [camera_android_camerax] Support RGBA_8888 image format group 
Labels: c: new feature,platform-android,p: camera,package,c: proposal,P2,team-android,triaged-android

### Use case

The plugin only supports YUV_420 image format group, because Flutter does not support RGBA format currently.
But the camerax library allows RGBA_8888 format group as well.
Supporting RGBA_8888 format would allow flutter developers to do computer vision tasks like face detection, image classification, image segmentation, etc.

### Proposal

Expecting the plugin to be able to do something like this:
```
CameraController cameraController = CameraController(
    cameras![selectedCameraIndex],
    ResolutionPreset.medium,
    imageFormatGroup: ImageFormatGroup.rgba8888,
);
cameraController.startImageStream((CameraImage image) {
    ///Computer vision tasks with rgba8888 image format group bytes
});
```
### Reference
Found this while reading the documented source code of intializeCamera in `packages\camera\camera_android_camerax\lib\src\android_camera_camerax.dart`
```
  /// Initializes the camera on the device.
  ///
  /// Since initialization of a camera does not directly map as an operation to
  /// the CameraX library, this method just retrieves information about the
  /// camera and sends a [CameraInitializedEvent].
  ///
  /// [imageFormatGroup] is used to specify the image format used for image
  /// streaming, but CameraX currently only supports YUV_420_888 (supported by
  /// Flutter) and RGBA (not supported by Flutter). CameraX uses YUV_420_888
  /// by default, so [imageFormatGroup] is not used.
  @override
  Future<void> initializeCamera(
    int cameraId, {
    ImageFormatGroup imageFormatGroup = ImageFormatGroup.unknown,
  }) async {
  ...
  }
```
Repository: PowerToys
Issue: Add settings button to Registry Preview and Environment Variables Editor
Labels: Idea-Enhancement,Needs-Triage,Product-Registry Preview,Product-Environment Variables

### Description of the new feature / enhancement

DevHome Designer feedback was to have Launch As Admin toggle in individual settings. Proposal is to add Settings button to Registry Preview and Environment Variables Editor, similar to what's existing in Hosts File Editor. This will spawn utility specific Settings window and that will have toggle for Launch As admin. Hosts File Editor already has this behavior.

### Scenario when this would be used?

In DevHome, to toggle utility's launch level.

### Supporting information

_No response_
Repository: PowerToys
Issue: Add AutomationIds to UI components in Hosts File Editor, Registry Preview and Environment Variables Editor
Labels: Idea-Enhancement,Needs-Triage,Product-Hosts File Editor,Product-Registry Preview,Product-Environment Variables

### Description of the new feature / enhancement

Add AutomationIds to UI components such as buttons, dialog boxes, toggles etc. This will allow us to write automated tests.

### Scenario when this would be used?

This will be beneficial for developing DevHome automated tests.

### Supporting information

_No response_
Repository: opencv
Issue: Resize Mat with "not-fitting" scale shifts image
Labels: bug,category: imgproc,needs investigation

### System Information

OpenCV version: 4.8.0
Win7-64
mingw-64

### Detailed description

Resize Mat with "not-fitting" scale shifts image

### Steps to reproduce

Read a png image with even dimensions
Shrink by 50% (bi-linear, bi-cubic, Lanczos4).
Resize back to orig dimension.
Compare (visually): OK.

Now crop one pixel horiz and vert - dimensions are uneven now.
Do the same as above.
Compare (visually):
forth-and-back is shifted by about half a pixel.
Seen best in the bottom-right corner.

Tried with other image libs or GUI: No problem there.

I haven't tested if this is only for factor two, or holds for
every "non-fitting" scaling.

This is important for me, as I depend on pixel-exact comparing.

```
Mat myMat;
int nScaleFactor;

myMat= imread ("test_even.png");
Size origSize (myMat.cols, myMat.rows);
cout << "nScaleFactor: ";
cin >> nScaleFactor;

resize(myMat, myMat, Size (), 1.0/nScaleFactor, 1.0/nScaleFactor, INTER_LANCZOS4 );
resize(myMat, myMat, origSize, 0, 0, INTER_LANCZOS4 );

imwrite ("ForthAndBack.png", myMat);
```

Even:
![test_even](https://github.com/opencv/opencv/assets/29798181/9cf75c48-f08a-4584-8c68-608c76b9e151)
Uneven:
![test_even-1](https://github.com/opencv/opencv/assets/29798181/916657fc-5dc5-49b8-a5c8-1ce9e2698be6)



### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [ ] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: rust
Issue: Chains of checked_add could get better codegen
Labels: A-LLVM,I-slow,A-codegen,T-compiler,C-bug,I-heavy,S-has-mcve,C-optimization

Here are two slightly different but likely related codegen issues. (Note that I am not entirely comfortable with rust ABI convention so this may be total horseshit)

# 1 

```rust
fn f(x: u64, y: u64) -> Option<u64> {
    let Some(x) = x.checked_add(y) else {
        return None;
    };
    let Some(x) = x.checked_add(y) else {
        return None;
    };
    Some(x)
}
```

gets compiled to (notice the useless move)

```asm
f:
        xor     eax, eax 
        add     rdi, rsi
        jae     .LBB0_2
        ;; This move is useless
        mov     rdx, rdi 
        ret
.LBB0_2:
        add     rdi, rsi
        setae   al
        mov     rdx, rdi
        ret
```

# 2 


```rust
fn f(x: u64, y: u64) -> Option<u64> {
    let Some(x) = x.checked_add(y) else {
        return None;
    };
    let Some(x) = x.checked_add(y) else {
        return None;
    };
    let Some(x) = x.checked_add(y) else {
        return None;
    };
    Some(x)
}
```

gets compiled to

```asm
f:
        add     rdi, rsi
        jb      .LBB0_1
        add     rdi, rsi
        jae     .LBB0_3
.LBB0_1:
        xor     eax, eax
        mov     rdx, rdi
        ret
.LBB0_3:
        xor     eax, eax
        add     rdi, rsi
        setae   al
        mov     rdx, rdi
        ret
```
But could be 

```asm
f:
        xor     eax, eax
        add     rdi, rsi
        jb      .LBB0_1
        add     rdi, rsi
        jb      .LBB0_1
        add     rdi, rsi
        setae   al
        mov     rdx, rdi
        ret
.LBB0_1:
        ret
```

@rustbot label +A-codegen +A-LLVM +C-optimization +I-slow +S-has-mcve +I-heavy +T-compiler -needs-triage
Repository: vscode
Issue: File menu save commands get unexpectedly disabled when using a custom editor
Labels: bug,help wanted,custom-editors

https://github.com/microsoft/vscode/assets/6801309/2954ead6-27ff-48f9-a5a5-5c3273a2643a

<!-- ⚠️⚠️ 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?: N/A this is an extension issue.

<!-- 🪓 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. -->
- VS Code Version: 1.90.2
- OS Version: macOS + Windows

Steps to Reproduce:

1. Open a custom editor
2. Observation: Save commands are enabled in the file menu
3. Focus to another editor
4. Focus back to the custom editor
5. Observation: Save commands are now disabled in the file menu
Repository: opencv
Issue: WarpAffine unexpected results using OpenCl
Labels: question (invalid tracker),category: ocl

### System Information

I'm using UMat type frames to make use of my Intel UHD Graphics 620 and I have discovered a bug in WarpAffine function returning unexpected results.

I have opened a [blog post](https://forum.opencv.org/t/using-opencl-on-image-processing-error-in-warpaffine/18125) on forum for more information.

> OpenCV python version: 4.10.0
> Operating System / Platform: Windows 10
> Python version: 3.12.2

### Detailed description

As you can see in my following code I'm using same `UMat` for input and output.
I have tried using new `UMat`for output and seems it works.

Note: I have discovered the bug using `EmguCv` because I'm working on `C#`. But to be sure I have tested the issue in Python to reproduce it directly on OpenCv.

### Steps to reproduce

Here is an example Python code to test.
```
import os
os.add_dll_directory("C:\\gstreamer\\1.0\\msvc_x86_64\\bin")
 
import cv2 as cv
 
print(cv.getBuildInformation())
 
img_srcFile = "C:\\Users\\usr\\Downloads\\demo.jpg"
 
srcMat = cv.imread(img_srcFile, cv.IMREAD_UNCHANGED)
srcUMat = cv.UMat(cv.imread(img_srcFile, cv.IMREAD_UNCHANGED))
 
cv.imshow("SrcMat", srcMat)
cv.imshow("SrcUMat", srcUMat)
 
height, width = srcMat.shape[:2]
 
point = ((width - 1 )/ 2, (height - 1 )/ 2)
matrixTransfrom = cv.getRotationMatrix2D(point, 0, 1.3)
 
cv.warpAffine(srcMat, matrixTransfrom, (width, height), srcMat)
cv.imshow("SrcMat -> Zoom", srcMat)
 
cv.warpAffine(srcUMat, matrixTransfrom, (width, height), srcUMat)
cv.imshow("SrcUMat -> Zoom", srcUMat)
 
cv.waitKey(0)
```
![imagen](https://github.com/opencv/opencv/assets/11468643/ebb066b3-f18c-4340-85dd-ce7f1fa1c3f7)

I have fixed temporally using different UMat for output.

```
dstImg = cv.warpAffine(srcUMat, matrixTransfrom, (width, height))
cv.imshow("SrcUMat -> Zoom", dstImg)
```

### Issue submission checklist

- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Repository: go
Issue: runtime: use getrandom(2) for readRandom
Labels: help wanted,NeedsFix,compiler/runtime

### Proposal Details

Currently when we set the random seed on Linux, the runtime's fallback path needs to open, read and then close "/dev/urandom". This requires 3 system calls. A single getrandom does the same thing and is simpler than using `open() -> read() -> closefd()`.

#67001 Raised the minimum supported Linux kernel version to 3.17+, so that "getrandom(2)" can be used in the runtime package and we can do all the things in one system call now.

We can wrap getrandom with `internal/runtime/syscall.Syscall6` so that the helper function `readRandom` will no longer need to open and close "/dev/urandom".

Since Go 1.24 will only support Linux kernel 3.17+ (or 3.10+ with getrandom patches), I think a fallback is unnecessary (and a fallback can easily be added if someone needs it).
Repository: rust
Issue: Review of Reference change regarding receivers and object safety
Labels: A-docs,I-types-nominated,T-types

There are two outstanding changes to the Reference regarding receiver types and object safety:

- https://github.com/rust-lang/reference/pull/1248
- https://github.com/rust-lang/reference/pull/1455

These are related to an outstanding issue filed against the Reference here:

- https://github.com/rust-lang/reference/issues/1247

The rustdocs team would appreciate a review by @rust-lang/types on whether one or both or these PRs are correct and whether the types team (or interested members thereof) would like to see any changes before these are merged.

@rustbot labels +T-types +I-types-nominated
Repository: kubernetes
Issue: /dev/shm can be oversubscribed compared to host
Labels: kind/bug,sig/node,triage/accepted

Hi! I noticed that when we create the emptyDir and specify [Memory as the storage medium](https://github.com/kubernetes/kubernetes/blob/ff8834cdd7abb9a2975f20dffb575d7f00a1d4d3/pkg/volume/emptydir/empty_dir.go#L150) and allow to calculate the sizeLimit "to match the host" - it does so based on the pod resource spec, [here](https://github.com/kubernetes/kubernetes/blob/ff8834cdd7abb9a2975f20dffb575d7f00a1d4d3/pkg/volume/emptydir/empty_dir.go#L122-L132).  I was testing this on an AWS hpc7g instance, which has 64 GB in `/dev/shm` (on the host) and the entire host has 128GB:

![image](https://github.com/kubernetes/kubernetes/assets/814322/d1e6d83b-db58-408b-8b45-7d3de12d4b6c)

And I was really surprised to see that my `/dev/shm` in the container was also 128GB. I think more properly it should match what the host is given, 64GB, because otherwise I think it might be the case we can oversubscribe? I'm worried about the implications of this. My questions are thus:

1. Was this decision intentional (and if not, is this a bug we can fix)
2. If the decision was intentional, how does that work? 

And either way, what are the implications for oversubscription?

Thanks for the feedback! I'm also really grateful for this feature - I was really surprised to see how tiny the default `/dev/shm` is created by docker and containerd (one was like 64M if I remember correctly)!