sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: portable_simd bitmask + select generates poor code on ARM64
Labels: A-LLVM,I-slow,A-codegen,T-compiler,A-SIMD,C-bug,I-heavy,T-libs,PG-portable-simd,O-AArch64,C-optimization

Consider the following piece of code:

```rust
#![feature(portable_simd)]

use core::simd::*;
type T = u32;

fn if_then_else64(mask: u64, if_true: &[T; 64], if_false: &[T; 64]) -> [T; 64] {
    let tv = Simd::<T, 64>::from_slice(if_true);
    let fv = Simd::<T, 64>::from_slice(if_false);
    let mv = Mask::<<T as SimdElement>::Mask, 64>::from_bitmask(mask);
    mv.select(tv, fv).to_array()
}
```

On Intel this generates decent code, using masked moves if AVX-512 is available, and if only AVX2 is available it spreads the mask along a vector register, and uses `vpand` and `vpcmpeqd` with vectors like `[1, 2, 4, 8, 16, 32, 64, 128]` to generate masks to blend `if_true` and `if_false` using `vblendvps`.

On ARM it's [a different story](https://rust.godbolt.org/z/nn1x3sYrP). It moves the mask __*one bit at a time*__ into registers before finishing off with a bunch of non-trivial shuffle/comparison instructions and `bsl.16b` to finally do the blends. It is possible to apply essentially the exact same strategy as the code generated on Intel, here coded manually for `u32`:

```rust
fn if_then_else64_manual_u32(mut mask: u64, if_true: &[u32; 64], if_false: &[u32; 64]) -> [u32; 64] {
    let mut out = [0; 64];
    let mut offset = 0;
    for _ in 0..2 {
        let mut bit = Simd::<u32, 4>::from_array([1, 2, 4, 8]);
        let mut mv = Simd::<u32, 4>::splat(mask as u32);
        for _ in 0..8 {
            let tv = Simd::<u32, 4>::from_slice(&if_true[offset..offset+4]);
            let fv = Simd::<u32, 4>::from_slice(&if_false[offset..offset+4]);
            let mv_full = (mv & bit).simd_eq(bit);
            let ret = mv_full.select(tv, fv);
            out[offset..offset+4].copy_from_slice(&ret[..]);
            bit = bit << 4;
            offset += 4;
        }
        mask >>= 32;
    }
    out
}
```


Note that the above isn't some novel trick or anything, it's almost entirely a 1:1 translation of what the compiler generates on AVX2, just using 4-wide instead of 8-wide registers. You can [see for yourself](https://rust.godbolt.org/z/vq1W87dff) how similar the assembly of Intel using `if_then_else64` and ARM using `if_then_else64_manual_u32` is.

The above is ~3.2x faster on my Apple M1 machine than `if_then_else64`, assuming all data is in cache. I would really like it if the compiler could generate this code automatically, just like it does on Intel.
Repository: PowerToys
Issue: Keyboard Manager remapping key to open an app with args not working
Labels: Issue-Bug,Product-Keyboard Shortcut Manager,Needs-Repro,Needs-Triage,Area-App Compat

### Microsoft PowerToys version

0.79.0

### Installation method

GitHub, PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

Keyboard Manager

### Steps to reproduce

App:%LOCALAPPDATA%\Microsoft\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\WsaClient.exe
Args:/launch wsa://com.appgenix.bizcal.fire.pro

### ✔️ Expected Behavior

The Calendar app to open even when it's closed (not just minimized). 
For example a shortcut works perfectly for this purpose with the following target:
C:\Users\Michael\AppData\Local\Microsoft\WindowsApps\MicrosoftCorporationII.WindowsSubsystemForAndroid_8wekyb3d8bbwe\WsaClient.exe /launch wsa://com.appgenix.bizcal.fire.pro

### ❌ Actual Behavior

The Calendar app only shows up when minimized. However, this also works even if I don't put any args - it opens the most recently opened WSA app's window (from all those that are currently minimized = already open).

### Other Software

_No response_
Repository: opencv
Issue: TrackerNano lacks cuda support. 
Labels: feature,category: gpu/cuda (contrib)

### System Information

OpenCV version: 4.8.0
Operating System / Platform: Ubuntu 22.04
Compiler & compiler version: gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0


### Detailed description

The CPU version seems to be working, but the cuda implementation just won't run. Could it be that it requires the models to be converted to trt instead of onnx? 
`        _params.backbone = "../model/nanotrack_backbone_sim.onnx";
        _params.neckhead = "../model/nanotrack_head_sim.onnx";
        _params.backend=5;
        _params.target = 6;
        _tracker = cv::TrackerNano::create(_params);`

### Steps to reproduce

Download the original onnx files :
backBone model: https://github.com/HonglinChu/SiamTrackers/blob/master/NanoTrack/models/onnx/nanotrack_backbone_sim.onnx

headNeck model: https://github.com/HonglinChu/SiamTrackers/blob/master/NanoTrack/models/onnx/nanotrack_head_sim.onnx


Then use a standard code for reading a video file or webcam and try to track with the following 
```       
        _params.backbone = "../model/nanotrack_backbone_sim.onnx";
        _params.neckhead = "../model/nanotrack_head_sim.onnx";
        _params.backend=5;
        _params.target = 6;
        _tracker = cv::TrackerNano::create(_params);
```
Additional instruction can be seen here - https://github.com/opencv/opencv/blob/1eb061f89de0fb85c4c75a2deeb0f61a961a63ad/samples/dnn/nanotrack_tracker.cpp
### 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: tauri
Issue: [bug] taurignore excluding all file except for few of crate excludes entire crate not working
Labels: type: bug,scope: cli.js,scope: cli.rs,status: needs triage

### Describe the bug

 taurignore excluding all file except for few of crate excludes entire crate

```gitinore
# everuthing except for rust files
/*
!/*.toml
!/*.rs
!/icons
!/src
```

at crate root should not ignore files in `src` folder but tauri cli does not watch entire crate

I confirmed this configuration works with gitignore so I think this is a bug in tauri.

I reproducible with both tauri cli v1.5.10 and v1.5.11.

### Reproduction

https://github.com/anatawa12/tauri-issue-9163

run `cargo tauri dev` will not show 

```
        Info Watching /Users/anatawa12/RustroverProjects/tauri-issue-9163 for changes...
```

When I replaced `IgnoreMatcher::is_ignore` with the following code
```
  fn is_ignore(&self, path: &Path, is_dir: bool) -> bool {
    for gitignore in &self.0 {
      if path.starts_with(gitignore.path())
      {
        let parents = gitignore.matched(path, is_dir);
        if parents.is_ignore() {
          println!("ignore: {:?}", parents);
          return true;
        }
      }
    }
    false
  }
```
shows the following message.
```
$ cargo tauri dev
     Running BeforeDevCommand (`:`)
ignore: Ignore(Glob { from: Some("/Users/anatawa12/RustroverProjects/tauri-issue-9163/.taurignore"), original: "/*", actual: "*", is_whitelist: false, is_only_dir: false })
    Finished dev [unoptimized + debuginfo] target(s) in 0.00s
```
 

### Expected behavior

 taurignore excluding all file except for few should not exclude folder from watching.
 

### Full `tauri info` output

```text
[✔] Environment
    - OS: Mac OS 14.3.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.75.0 (82e1608df 2023-12-21)
    ✔ cargo: 1.75.0 (1d8b05cdd 2023-11-20)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.10.0
    - pnpm: 8.15.3
    - yarn: 1.22.19
    - npm: 10.2.3

[-] Packages
    - tauri [RUST]: 1.6.1
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.7
    - tao [RUST]: 0.16.7
    - tauri-cli [RUST]: 1.5.12-beta.2
    - @tauri-apps/api [NPM]: 1.5.3
    - @tauri-apps/cli [NPM]: 1.5.11

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: out
    - devPath: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Webpack
```


### Stack trace

_No response_

### Additional context

[`Gitignore::matched`](https://docs.rs/ignore/latest/ignore/gitignore/struct.Gitignore.html#method.matched) and [`Gitignore::matched_path_or_any_parents`](https://docs.rs/ignore/latest/ignore/gitignore/struct.Gitignore.html#method.matched_path_or_any_parents) returns `Ignore(Glob{original:"/*"})` for the folder contains `.gitignore` file.
Repository: go
Issue: proposal: cmd/go: get: behavior with replaced packages
Labels: Proposal,GoCommand,modules

### Proposal Details

### Introduction:

The current behavior of go `get -u PKG` does not adequately handle packages that have been replaced in the `go.mod` file. This proposal aims to improve the user experience by providing clearer information when a replaced package is encountered during the `go get -u` operation. 

### Details:

When a user runs `go get -u PKG` and PKG has a replacement specified in the `go.mod` file, the go get command currently does not download the latest version of PKG.

### Proposed Enhancement:

Modify the behavior of `go get -u` to detect when a package has been replaced in the `go.mod` file.
If PKG is replaced, display a clear message to the user indicating that PKG is not updated due to the replacement.
Provide guidance to the user, suggesting they check the go.mod file for the replacement settings.
Ideally, include a link to documentation that explains how to update replaces in the `go.mod` file.
The message displayed to the user should be informative and actionable, helping them understand why PKG was not updated and what steps they can take to resolve the issue.

The link provided in the message should direct users to relevant documentation that explains the concept of replaces in the `go.mod` file and provides instructions on updating them.

### Impact:

Improved user experience: Users will receive clearer feedback when attempting to update replaced packages, reducing confusion and frustration.
Better understanding of go.mod functionality: Users will be guided to documentation that helps them understand and manage replaces in the go.mod file.
Repository: go
Issue: proposal: x/sys/windows: deprecate RtlGetNtVersionNumbers
Labels: OS-Windows,Proposal

### Proposal Details

The [windows.RtlGetNtVersionNumbers](https://pkg.go.dev/golang.org/x/sys@v0.18.0/windows#RtlGetNtVersionNumbers) function is not documented in the Microsoft docs. People should use [windows.RtlGetVersion](https://pkg.go.dev/golang.org/x/sys@v0.18.0/windows#RtlGetVersion) instead, which is properly documented in [here](https://learn.microsoft.com/en-us/windows/win32/devnotes/rtlgetversion).

I propose to mark `windows.RtlGetNtVersionNumbers` as deprecated, mentioning `windows.RtlGetVersion` as an alternative.

See [CL 571015](https://go-review.googlesource.com/c/go/+/571015) as an example of how to replace  `windows.RtlGetNtVersionNumbers` with `windows.RtlGetVersion`.

@golang/windows
Repository: next.js
Issue: Client side transition with middleware crashing
Labels: bug,Runtime,Pages Router

### Link to the code that reproduces this issue

https://github.com/Glumac7/middleware-issues

### To Reproduce

In order to reproduce this issue, you need to do the following in order:
1. Clone the repo
2. Install dependencies
3. Build the project and start it
4. Open the following URL: `http://localhost:3000/test1`
5. Open the dev console
6. With the page open, generate a new build and start it again
7. Once the new build is generated, press `go to second page` button
8. You should see an error page and an error in the console `TypeError: Cannot read properties of undefined`

How to make it "work":
1. In `next.config.js`, remove "api.ts" for `pageExtensions`
2. Do the steps 3 - 8
3. It should redirect to `test2/234` instead of an `_error.tsx`

Alternatively, you could install next `v13.4.12` using which you would not need to make these changes to `next.config.js`, because the error occurs from `13.4.13-canary.0` onward.

### Current vs. Expected behavior

Currently, we are getting an error presumably due to the middleware. There are no props in `_app.tsx` when there is a new build and a client side redirect happens on an active user session. When we remove `"api.ts"` from `pageExtensions`, that is, remove the use of the middleware, it works, on both `v13.4.12` and `v13.4.13-canary.0`. If we want to use the middleware, we would need to downgrade to `v13.4.12`.

Expected behaviour should be the same as it is in `v13.4.12` (because the error happens from `v13.4.13-canary.0` onward), that is, for props returned from `getInitialProps` and used in `_app.tsx` not to be `undefined`.

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.3.0: Wed Dec 20 21:30:44 PST 2023; root:xnu-10002.81.5~7/RELEASE_ARM64_T6000
Binaries:
  Node: 18.18.0
  npm: 9.8.1
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.1.3
  eslint-config-next: 14.1.2
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Data fetching (gS(S)P, getInitialProps), Middleware / Edge (API routes, runtime)

### Which stage(s) are affected? (Select all that apply)

next build (local), next start (local), Other (Deployed)

### Additional context

It started happening from `v13.4.13-canary.0` onward, meaning it also happens on the newest next release (`v14.1.3` as of this writing). Works as expected on `v13.4.12`.
Repository: PowerToys
Issue: Stage Manager Like Feature
Labels: Idea-New PowerToy,Needs-Triage

### Description of the new feature / enhancement

A stage like feature, maybe with some additional feature, does makes sense for multitasking when you don't want to grab win+tab or ctrl+tab , then choose where to go...rather have a stacks of other windows on side and hover and go wherever you want to switch, what are your thoughts?

### Scenario when this would be used?

Multitasking, where you have tons of windows open

### Supporting information

here is a github project already claiming to do so: https://github.com/awaescher/StageManager
![image](https://github.com/microsoft/PowerToys/assets/77123266/9ae1715d-0f72-4a18-bc9d-52314fda6cf5)
Repository: ollama
Issue: Ollama is not using the 100% of RTX4000 VRAM (18 of 20GB)
Labels: performance,nvidia

Hi, thank you for the wonderful ollama project and the amazing community!

<img width="742" alt="Screenshot 2024-03-12 at 8 32 31 AM" src="https://github.com/ollama/ollama/assets/16274031/a47d6ad9-3602-4ffe-984d-0ec858f95b6f">

I am testing the Mixtral 3Bit Quantized model under a RTX400 with 20GB of VRAM. The model is 20GB of size and as you can see in the screenshot of nvidia-smi, ollama is using only 18GB and the rest of the model was loaded to the system RAM.

Is this normal? or is it an issue?, Can I force ollama to use the 100% of VRAM?, thank you!!!
Repository: puppeteer
Issue: [Bug]: puppeteer loads fencedframe as a mainframe instead of childframe
Labels: bug,confirmed,P2

### Minimal, reproducible example

```TypeScript
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch({
    headless: true,
    args: [
      '--disable-gpu',
      '--disable-setuid-sandbox',
      '--disable-site-isolation-trials',
      `--enable-features=${[
        'NetworkServiceInProcess2',
        'PrivacySandboxAdsAPIs',
        'PrivacySandboxAdsAPIsOverride',
      ].join()}`,
      '--enable-privacy-sandbox-ads-apis',
      '--ignore-certificate-errors-skip-list',
      '--no-sandbox',
    ],
  });

  const page = await browser.newPage();

  const advUrl = 'https://protected-audience-demo-advertiser.web.app';
  const pubUrl = 'https://protected-audience-demo-publisher.web.app';
  const ffrUrl = 'https://protected-audience-demo-dsp.web.app/ads/default-ad.html';

  await page.goto(advUrl);
  await page.goto(pubUrl);

  if (page.url() === ffrUrl) {
    throw new Error('page is fencedframe page instead of parent page')
  }

  await new Promise(resolve => setTimeout(resolve, 1000));

  if (page.url() === ffrUrl) {
    throw new Error('page is fencedframe page instead of parent page')
  }

  await page.close();
  await browser.close();
})();
```


### Error string

page is fencedframe page instead of parent page

### Bug behavior

- [ ] Flaky
- [ ] PDF

### Background

I write e2e test for PAAPI usage.

### Expectation

I expect variable _page_ will keep host page instance.
I expect that _fencedframe_ will have the same behavior like if it were _URN iframe_.
I expect that _page.$eval_ and _page.evaluate_ will work on host page instance without forever loading.

### Reality

Variable _page_ loads _fencedframe_ page instance instead of keep host page instance.
_page.$eval_ and _page.evaluate_ never respond and become forever loading.


### Puppeteer configuration file (if used)

_No response_

### Puppeteer version

22.4.1

### Node version

18.17.0

### Package manager

yarn

### Package manager version

1.22.21

### Operating system

Linux
Repository: next.js
Issue: Inconsistency in Accessing URL Query Parameters Between `pages` and `app` Directories
Labels: bug

### Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/festive-leftpad-q96jzs?file=%2Fpages%2Findex.jsx&embed=1&showConsole=true

### To Reproduce

1. Create Two Video Page Components: One in the pages directory (pages/video-classic.jsx) and another in the app directory (app/page/video-modern.jsx).
2. Include Navigation Links: On the home page (pages/index.jsx), add Link components to navigate to both video pages, appending query parameters to the URLs.
``` jsx
<Link href="/video-classic?sourcePage=HomePage&sourceElement=featuredVideo" as="/video-classic">
  Watch the Featured Video from pages directory
</Link>
<Link href="/video-modern?sourcePage=HomePage&sourceElement=featuredVideo" as="/video-modern">
  Watch the Featured Video from app directory
</Link>
```
3. Attempt to Access Query Parameters: In both video page components.
4. Observe the Behavior: The page in the pages directory successfully logs and/or utilizes the query parameters, while the page in the app directory does not—indicating an inconsistency or failure in accessing query parameters in the app directory.

### Current vs. Expected behavior

When navigating to components within the app directory of a Next.js application, query parameters specified in the href prop of a Link component are not accessible using the `searchParams` or `useSearchParams` hook, despite being present in the URL. This issue does not occur with components within the pages directory, where query parameters remain accessible regardless of their presence in the href or as props. This inconsistency affects our ability to handle dynamic content and analytics tracking uniformly across the application.

### Provide environment information

```bash
Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Sun Aug  6 20:05:33 UTC 2023
  Available memory (MB): 4102
  Available CPU cores: 2
Binaries:
  Node: 20.9.0
  npm: 9.8.1
  Yarn: 1.22.19
  pnpm: 8.10.2
Relevant Packages:
  next: 14.2.0-canary.9
```


### Which area(s) are affected? (Select all that apply)

App Router

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local)

### Additional context

The issue arises when using query parameters that are present in the href prop but not the as prop. This setup works as expected for components in the pages directory, suggesting a specific problem with query parameter handling in the app directory.
Repository: TypeScript
Issue: [bug] JS/TS `Format Selection` can delete comments
Labels: Bug,Help Wanted

open a javascript or typescript file 
create a block comment in such a way that a space will be inserted next to it when formatting

example:
```js
const test/* comment */=5
```
select any part of the comment (except the ending `/`)
right click => `Format Selection`
the comment gets deleted ❌
`const test =5`
Repository: next.js
Issue: SSG pages with route rewrites request wrong files from _next/data
Labels: bug,Pages Router

### Link to the code that reproduces this issue

https://github.com/fmacherey/poc-ssg

### To Reproduce

1. yarn build && yarn start
2. open page `localhost:3000/lexikon/a`
3. open dev tools, filter network for "next/data"
4. navigate between "a", "b" and "c"

### Current vs. Expected behavior

You'll see several network requests for the static ssr json files e.g.

```
http://localhost:3000/_next/data/<BUILD_ID>/dict/b.json?character=b
http://localhost:3000/_next/data/<BUILD_ID>/lexikon/b.json?character=b
```

The first GET request is fine and correct, but the secondly listed HEAD request leads to a 404 Not Found. 

Expected: the HEAD request should not occur or at least going correctly to the internal file "dict/b.json" and not the rewritten path (see next.config)

### Provide environment information

```sh
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Wed Feb 21 21:45:49 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6020
  Available memory (MB): 32768
  Available CPU cores: 12
Binaries:
  Node: 20.9.0
  npm: 10.1.0
  Yarn: 1.22.19
  pnpm: 8.15.1
Relevant Packages:
  next: 14.2.0-canary.17 // Latest available version is detected (14.2.0-canary.17).
  eslint-config-next: 14.1.3
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.2
Next.js Config:
  output: N/A
✨  Done in 1.45s.
```


### Which area(s) are affected? (Select all that apply)

Data fetching (gS(S)P, getInitialProps)

### Which stage(s) are affected? (Select all that apply)

next build (local), next start (local)

### Additional context

_No response_
Repository: vscode
Issue: Chat view scroll can create visual confusion
Labels: ux,under-discussion,panel-chat

Not a major issue and not unique to us, but the scrollbar ending at the input box with now clear border between the chat response and the input box had me scrolling when there was no more content.

![Image](https://github.com/microsoft/vscode/assets/6561887/fd4fc082-463a-4daa-87b7-3c8aee765446)



2 ideas:
- have a border
- have "dead space" under the input to allow scrolling all the way