sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [Triton] Add sdpa pattern support for `BertForQuestionAnswering` model
Labels: triaged,oncall: pt2,module: inductor,inductor_pattern_match

### 🚀 The feature, motivation and pitch

In a `BertForQuestionAnswering` model, the core calculation process of the `BertSelfAttention.forward` function can be simplified as:
```python
key_layer = self.transpose_for_scores(self.key(hidden_states))
value_layer = self.transpose_for_scores(self.value(hidden_states))
query_layer = self.transpose_for_scores(mixed_query_layer)
attention_scores = torch.matmul(query_layer, key_layer.transpose(-1, -2))
attention_scores = attention_scores / math.sqrt(self.attention_head_size)
if attention_mask is not None:
    attention_scores = attention_scores + attention_mask
attention_probs = nn.functional.softmax(attention_scores, dim=-1)
attention_probs = self.dropout(attention_probs)
context_layer = torch.matmul(attention_probs, value_layer)
```
During inference, `dropout` layers will be treated as a clone layers. But the graph cannot match the existing pattern.
I hope `torch.compile` can support this static graph.


### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @msaroufim @bdhirsh @anijain2305 @chauhang @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire
Repository: ollama
Issue: Use GTT memory in case of iGPUs to run the model efiiciently.
Labels: feature request

Models run on System memory using CPU is perfectly fine.

But when using integrate GPUs which have limited VRAM locked by vendors, we have model crash due to "low vram memory"

They have feature called GTT memory on linux, and Shared Memory on windows, which they can use whenever their VRAM capacity is nearly full.
Repository: tauri
Issue: [feat] iOS Widget support
Labels: type: feature request,platform: iOS,platform: Android

### Describe the problem

With Tauri 2.0 hitting beta and bringing Mobile support, one key part of the Mobile (and Desktop) ecosystem is still missing: Widgets.

Right now I'm unaware of any way to write Widgets in Tauri, or even combine an Tauri-based App with e.g. a Swift-based Widget.

E.g. something like this:

![GLdyllaW0AA7gpC](https://github.com/tauri-apps/tauri/assets/1189998/0c94043d-9309-46ce-9655-2af66511fa9d)

### Describe the solution you'd like

I would love to see way for Tauri to support Widgets on Mobile and Desktop. My primary focus is personally on iOS and macOS Widgets, but Android Widgets should also be considered, although I would think these are different enough that it might make sense to treat them as completely separate.

While we cannot use Webviews in Widgets, I could imagine a way similar to https://scriptable.app where Tauri exposes an API and a Widget runtime. 

- The Widget API: Configuration of Layout for the View and data loading that should get run in `getSnapshot`/`getTimeline` of the Widget (iOS and macOS is the same)
- The Widget Runtime: Native Swift/Kotlin code that sets up the plumbing and executes what the user has set up in `getSnapshot`/`getTimeline` and the view etc


I'm not entirely sure how Scriptable does it, but it seems to expose a minimal set of the Widget API via JavaScript, which lets you do most things. It hasn't been updated to support interactivity yet though (arrived in iOS 17).

### Alternatives considered

A different approach one could imagine would be a way to link your Widget code from an existing Xcode project together with the Tauri generated Xcode project.

### Additional context

_No response_
Repository: vscode
Issue: how to input chiness in terminal
Labels: bug,confirmation-pending,terminal-input

<!-- ⚠️⚠️ 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/No

<!-- 🪓 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.89.1 (Universal)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:14:24.611Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin x64 21.6.0

Steps to Reproduce:

1. open vscode terminal
2. input '我' cann't   get right result
![image](https://github.com/microsoft/vscode/assets/11611897/e37830d3-b3a7-4d15-8601-f0f7d0635ebc)
result is:
![image](https://github.com/microsoft/vscode/assets/11611897/8931ca11-f6c3-457e-9172-dfa31e20d347)
Repository: ui
Issue: [bug]: Issue when using cloudflare zero trust (with extended tls decryption)
Labels: bug

### Describe the bug

I am getting below error when try to setup shadcn

```
npx shadcn-ui@latest init
FetchError: request to https://ui.shadcn.com/registry/styles/index.json failed, reason: unable to get local issuer certificate
    at ClientRequest.<anonymous> (file:///C:/Users/PalakRukhaya/AppData/Local/npm-cache/_npx/125ee17d583c4e03/node_modules/node-fetch/src/index.js:108:11)
    at ClientRequest.emit (node:events:519:28)
    at TLSSocket.socketErrorListener (node:_http_client:500:9)
    at TLSSocket.emit (node:events:519:28)
    at emitErrorNT (node:internal/streams/destroy:169:8)
    at emitErrorCloseNT (node:internal/streams/destroy:128:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
  type: 'system',
  errno: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
  code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
  erroredSysCall: undefined
}
Failed to fetch styles from registry.
```

### Affected component/components

All

### How to reproduce

Try to enabled Cloudflare zero trust with "CA to system certificate store installed"

### Codesandbox/StackBlitz link

_No response_

### Logs

```bash
Let me know how can i give you logs.
```


### System Info

```bash
Mac OS 14.4.1
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: svelte
Issue: Element reference null in combination with #key block and transition directive
Labels: transition/animation

### Describe the bug

In my project I have a menu on/off button. In the menu, you pick a value and the button's visualization updates based on that value. For better UX I've added transitions with the help of #key block. I also need to keep a reference to the button, but eventually it ends up as null.

1. In the provided reproduction open up your browser developer tools to see console logs of when and to what the reference will change. Initially it (menuToggleButtonRef) will be bound to the button as it should (evident from the console log and the displayed paragraph).
2. Click the Toggle menu button
3. Click the Increase value button
4. Click the Toggle menu button and notice how the reference (value of menuToggleButtonRef) was changed to null

The weirdest part is, if anything, I'd expect the reference to be lost on step 3, when the Toggle button needs to be rerendered due to currentValue change and a #key block referencing it wrapping the button whose reference we're discussing, since due to the transition directive on button, there will be 2 or more buttons (depending how fast you're clicking the Increase value button) in existence while the transitions/animations are running.
No, the reference to the button (menuToggleButtonRef) is set to null when you click on itself (after having changed currentValue) (step 4), which does nothing else but toggle the value of isMenuOpen which shouldn't have to do anything with itself.
To add to the whole confusion, the menuToggleButtonRef appears to regain the reference to the button if you increase the value again.

In short, I'd expect menuToggleButtonRef to never lose reference to the button, but the way it's breaking here, it's doing so exactly the opposite of how I'd imagine.

### Reproduction

https://svelte.dev/repl/4dfcd839402c43bc89f3f92a9c8dc6b0?version=4.2.16

### Logs

_No response_

### System Info

```shell
System:
    OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700
    Memory: 10.72 GB / 15.52 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 20.10.0 - ~/.nvm/versions/node/v20.10.0/bin/node
    Yarn: 1.22.21 - ~/.nvm/versions/node/v20.10.0/bin/yarn
    npm: 10.2.3 - ~/.nvm/versions/node/v20.10.0/bin/npm
    pnpm: 8.15.1 - ~/.nvm/versions/node/v20.10.0/bin/pnpm
```


### Severity

annoyance
Repository: next.js
Issue: Docker standalone is missing sharp
Labels: examples

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:19:22 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T8112
Binaries:
  Node: 20.10.0
  npm: 10.6.0
  Yarn: 1.22.19
  pnpm: 9.0.6
Relevant Packages:
  next: 14.1.0
  eslint-config-next: 14.0.4
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: standalone
```


### Which example does this report relate to?

with-docker

### What browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_

### Describe the Bug

When I deploye the folloeing example https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile the logs output the following error: `Error: 'sharp' is required to be installed in standalone mode for the image optimization to function correctly. Read more at: https://nextjs.org/docs/messages/sharp-missing-in-production` 

### Expected Behavior

The image optimization with the given example works well outside of an vercel hostign system.

### To Reproduce

Just build an image with the given example and let it run on a system where sharp is not installed, so deploy it somwhere else than vercel.
Repository: electron
Issue: [Feature Request]: allow frame drawing while unvisible
Labels: enhancement :sparkles:

### 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.

### Problem Description

In the video, Google Meet was used to reproduce the bug to clearly show the behavior of the application window in inactive mode
There was a bug with both BrowserView and WebContentsView

backgroundThrottling: false doesn't solve my problem.

First, I show the behavior of the application at the moment when it is broadcast via Google Meet, and as you can see, the counter has increased to 20, but should have shown the loaded site content at 15 seconds.
Then I showed the behavior of the application in its normal state, and after the required number of seconds the site was displayed correctly.

IMPORTANT! when I hovered the mouse over the application window at 20 seconds, at that moment the content was displayed in Google Meet, i.e. in this moment

### Proposed Solution

Add the ability to render the application when it is minimized/out of focus

### Alternatives Considered

or find a way to get around it

### Additional Information

```
const { app, BrowserWindow, WebContentsView } = require("electron");
const path = require("node:path");

function createWindow() {
  const mainWindow = new BrowserWindow({
    width: 2000,
    height: 1100,
    webPreferences: {
      preload: path.join(__dirname, "preload.js"),
      backgroundThrottling: false,
    },
  });

  mainWindow.loadFile("index.html");

  // mainWindow.webContents.openDevTools();

  const view1 = new WebContentsView({
    webPreferences: {
      backgroundThrottling: false,
    },
  });
  mainWindow.contentView.addChildView(view1);

  setTimeout(() => {
    view1.webContents.loadURL("https://electronjs.org");
  }, 15000);

  view1.setBounds({ x: 0, y: 0, width: 2000, height: 1100 });
}

app.whenReady().then(() => {
  createWindow();
});

app.on("window-all-closed", function () {
  if (process.platform !== "darwin") app.quit();
});
```
Repository: ollama
Issue: Ask user to restart Ollama after Nvidia driver updates
Labels: feature request,nvidia,gpu

In Windows, if a new version comes, Ollama widget will ask user to restart Ollama to upgrade to the new version. This is a feature I like a lot. However, I think Ollama should also ask the user to restart Ollama if it detect that the GPU driver is upgraded. 

I noticed that after I upgraded my Nvidia GPU driver, Ollama ran very slow. Then I found that the GPU was not working and Ollama only used the CPU. So I made a system reboot and everything went fine.

So I guess Ollama used the old driver with the GPU but since the old driver was no longer existed. It fell back to the CPU. So at this time, it is best if Ollama can ask the user to restart Ollama so the speed wouldn't be slow.
Repository: go
Issue: proposal: crypto/x509: add sentinel errors
Labels: Proposal,Proposal-Crypto

### Proposal Details

The ParsePKCS8PrivateKey function of the x509 package has a couple of errors that would benefit from being converted into sentinel errors to support the `errors.Is`. The errors are returned [here](https://cs.opensource.google/go/go/+/refs/tags/go1.22.3:src/crypto/x509/pkcs8.go;l=39) and [here](https://cs.opensource.google/go/go/+/refs/tags/go1.22.3:src/crypto/x509/pkcs8.go;l=42).

By converting these into package level and exported sentinel errors, downstream users will be able to use these in conjunction with `errors.Is` in order to determine an appropriate action, instead of resorting to parsing the error or blindly trying to parse the data with other functions.

I believe, but please correct me if I'm wrong, such a change would not break backwards compatibility given that the error returned would still be the same. My suggestion would be to create 3 new sentinel errors at the package level like this:

```go
var ErrUseParseECPrivateKey = errors.New("x509: failed to parse private key (use ParseECPrivateKey instead for this key format)")
var ErrUseParsePKCS1PrivateKey = errors.New("x509: failed to parse private key (use ParsePKCS1PrivateKey instead for this key format)")
var ErrUseParsePKCS8PrivateKey = errors.New("x509: failed to parse private key (use ParsePKCS8PrivateKey instead for this key format)")
```

The third, last, sentinel error is added as functions ParsePKCS1PrivateKey and ParseECPrivateKey can return similar errors and would also benefit from returning a sentinel error instead.

Additionally, it looks like `ParsePKIXPublicKey` can return a similar error about using `ParsePKCS1PublicKey` instead, which could also benefit from returning a sentinel error.
Repository: ui
Issue: [bug]: The source code for the combobox form has a bug
Labels: bug

### Describe the bug

The source code for the combobox form is missing CommandList, so it throws an error

### Affected component/components

Combobox

### How to reproduce

Copy the source code for the combobox form and implement in a code editor

### Codesandbox/StackBlitz link

https://codesandbox.io/p/devbox/l5jn8d?file=%2Fmy-app%2Fapp%2Fpage.tsx

### Logs

_No response_

### System Info

```bash
combobox form: any browser
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: tauri
Issue: [feat] Can provide an "afterBundleCommand" hook function? 
Labels: type: feature request

### Describe the problem

Sometimes, I need to run some custom scripts after building the installer application (`{appname}-setup.exe`) and before generating the update package(such as `setup.nsis.zip` or `setup.nsis.zip.sign`). 

This is because I need to manually sign the `{appname}-setup.exe` file, and without this `afterBundleCommand` hook, I won't be able to complete this before generating the update package.

### Describe the solution you'd like
Can you provide a hook "afterBundleCommand" to execute after the installer application is generated?

Alternatively, are there any alternative solutions?

Thanks alot!

### Additional context

_No response_
Repository: go
Issue: x/website/_content: make security best practices more visible and easier to navigate on Go website
Labels: Documentation,NeedsInvestigation,FeatureRequest

### Go version

1.22

### Output of `go env` in your module/workspace:

```shell
n/a
```


### What did you do?

I tried to locate security related information on [https://go.dev](https://go.dev ) in preparation for deploying a Go app. 



### What did you see happen?

My overall experience is that I had to look really hard to ensure that I've found all the security related information for making a Go app, and I have no idea if I was successful or not. 

- Currently, on the go.dev homepage, the only direct link to a security page is under the Why Go menu item in the navigation bar of the header. Security might be an important feature for promoting Go to new developers, but the Why Go section of the website was not an intuitive place for me (as an existing developer) to look for security related information.  Even if it’s only a reminder about the importance of security, it would be helpful if the security section of the website was more visible.

- The FAQ section of the website (linked to on the Go User Manual webpage) doesn’t have a “Security” section. 

- Not only is there no link to anything security related from the “Docs” menu on the header navigation bar, the Go User Manual page (which is linked to under the Docs menu) doesn’t have links to either [Security - The Go Programming Language](https://go.dev/doc/security/) or [Security Best Practices for Go Developers - The Go Programming Language](https://go.dev/doc/security/best-practices) .  Currently, the only link I can find to the latter is on the former.  I assume the Go User Manual should have those links because it is subtitled “a complete introduction to building software with Go.”

- In the Accessing Databases section of the Go User Manual, there is one article about SQL injection (“[Avoiding SQL injection risk - The Go Programming Language](https://go.dev/doc/database/sql-injection)”), but this link about SQL injection isn’t on either of the Security pages linked to in the bullet-point above.

- Visibility is worse for mobile than desktop. On Desktop, if I happen to hover over the Why Go menu, the menu opens and I can see the menu items (where security is listed). On mobile, if I hover over Why Go, it only opens if I click it, which, as an existing Go user, I have little inclination to do. 

- Although “Security” is listed under the “Why Go” menu in the header nav bar, it is not listed under the Why Go section in the footer. There are no security links in the footer.


### What did you expect to see?

Everything security related on one page. That one page linked to from obvious places (FAQ, Go User Manual etc). Consistency between header and footer navigation (i.e.  security is listed under Why Go in the header but not in the footer navigation).
Repository: ant-design
Issue: TimePicker panel will keep scrolling after selecting a time.
Labels: Inactive,unconfirmed

### Reproduction link

[https://stackblitz.com/edit/react-gbhomy?file=demo.tsx](https://stackblitz.com/edit/react-gbhomy?file=demo.tsx)

### Steps to reproduce

For rc-picker used by TimePicker, I found the code below in useScrollTo.ts seemed to be buggy. After selecting a time from the time panel, the panel ul will scroll to the target li position. But when the target li is reaching top, the scrolling is not stopped, causing the scroll event could not be triggered on mouse-wheel scrolling.
```javascript
// Break if dist get larger, which means user is scrolling
if (scrollDistRef.current !== null && scrollDistRef.current < dist) {
  stopScroll();
  return;
}
scrollDistRef.current = dist;
```
When the scenario above happens, the `scrollDistRef.current` is always equal to `dist`. So the stopScroll will be never called.
As I observed, on the latest Chrome, the scroll event can be fired even if the scrolling is not stopped. But the scroll event not triggered on older version Chrome (like v89) in this case.


### What is expected?

The scrolling should be stopped when the target li reaches top and no longer sets the `scrollTop` of ul.

### What is actually happening?

The scrolling is not stopped and keeping setting the `scrollTop` to the same value, which will have side effect on my component.

| Environment | Info |
| --- | --- |
| antd | 5.15.1 |
| React | 16.8 |
| System | Windows 11 |
| Browser | Chrome 124 |

---
I tried to changed the termimal condition as below, the scrolling is stopped and can be scrolled manually again:
```javascript
if (scrollDistRef.current !== null && (scrollDistRef.current < dist || Math.abs(scrollDistRef.current - dist) < Number.EPSILON)) {
  stopScroll();
  return;
}
```
That is, to stop scrolling when `scrollDistRef` and `dist` is equal (dist does not change anymore).

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: angular
Issue: Angular Update Guide zone.js
Labels: P3,area: docs

### Describe the problem that you experienced

The [Angular Update Guide](https://update.angular.io/?v=16.0-17.0) (in this case 16 to 17) states (in point 3) that 
> Make sure that you are using a supported version of Zone.js before you upgrade your application. Angular v16 supports Zone.js > version 0.14.x or later.

...but the `ng update @angular/core@17 @angular/cli@17` command from point 4 updates zone.js for you.

Is there something I'm missing, or is point 3 redundant?

### Enter the URL of the topic with the problem

https://update.angular.io/?v=16.0-17.0

### Describe what you were looking for in the documentation

_No response_

### Describe the actions that led you to experience the problem

_No response_

### Describe what you want to experience that would fix the problem

_No response_

### Add a screenshot if that helps illustrate the problem

_No response_

### If this problem caused an exception or error, please paste it here

_No response_

### If the problem is browser-specific, please specify the device, OS, browser, and version

_No response_

### Provide any additional information here in as much as detail as you can

_No response_