sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: ollama
Issue: ROCm Memory Issues with Long Contexts 
Labels: bug

### What is the issue?

Similar (?) to #1952. I've been noticing that ollama will crash when using long context lengths on ROCm. In particular, the most noticeable thing is that I can continue large conversations with ollama from start, while the model remains loaded in memory. But after coming back later and the model needs to reload, it cannot process the context.

Here is message I put in 1952.

------


Would like to prod this issue again, as I am still seeing this with GLM4 at 65k context size. Loads fine without much context, but has issues loading larger contexts. I even set the context size to 8k o_O. 

Important bits:
* It looks like GPU VRAM hits 100% but then can't spill over into memory for larger contexts. `rocm-smi` shows VRAM going 98%... 99%.. 100%, then crash.
* Forcing GPU layers down to 15 out of 41 and disabling mmap and setting num_batch to 256 for GLM 4 makes VRAM hover around 35%, with 8k context size.
*  Leaving mmap disabled and num_batch at 256, and letting it load all 41 GPU layers into memory uses 69% VRAM.
* Setting num_ctx to 60,000 will still make it try to load all layers into the GPU, and then it crashes because it runs out of VRAM.
* Moving num_gpu down to 30 or even 20 allows it to load more context. But this is only delaying the inevitable. Long enough context will = crash.

Shouldn't ollama be calculating that it needs to load less layers into the GPU in this situation? Like I can adjust it manually, but if ollama receives num_ctx that'll make the model crash, shouldn't it start using system RAM instead?

### OS

Linux

### GPU

AMD

### CPU

AMD

### Ollama version

0.2.5
Repository: opencv
Issue: Test_ONNX_layers.PyTorchAttentionSingleHead test fails in 5.x with OpenCL back-end
Labels: bug,category: ocl,category: dnn (onnx)

### System Information

OS: Windows, Linux
branch: 5.x, not reproducible with 4.x


### Detailed description

```
2024-07-16T11:02:43.4122013Z [ RUN      ] Test_ONNX_layers.PyTorchAttentionSingleHead/0, where GetParam() = OCV/OCL
2024-07-16T11:02:43.4513917Z unknown file: error: C++ exception with description "OpenCV(5.0.0-pre) C:\GHA-OCV-1\_work\opencv\opencv\opencv\modules\core\src\umatrix.cpp:1065: error: (-215:Assertion failed) _cn >= 0 && _newndims > 0 && _newndims <= CV_MAX_DIM && _newsz in function 'cv::UMat::reshape'
2024-07-16T11:02:43.4519296Z " thrown in the test body.
2024-07-16T11:02:43.4521450Z [  FAILED  ] Test_ONNX_layers.PyTorchAttentionSingleHead/0, where GetParam() = OCV/OCL (39 ms)
2024-07-16T11:02:43.4525077Z [ RUN      ] Test_ONNX_layers.PyTorchAttentionSingleHead/1, where GetParam() = OCV/OCL_FP16
2024-07-16T11:02:43.4580148Z unknown file: error: C++ exception with description "OpenCV(5.0.0-pre) C:\GHA-OCV-1\_work\opencv\opencv\opencv\modules\core\src\umatrix.cpp:1065: error: (-215:Assertion failed) _cn >= 0 && _newndims > 0 && _newndims <= CV_MAX_DIM && _newsz in function 'cv::UMat::reshape'
2024-07-16T11:02:43.4585490Z " thrown in the test body.
```

### Steps to reproduce

Remove disabler:
```
TEST_P(Test_ONNX_layers, PyTorchAttentionSingleHead) {
    if (target == DNN_TARGET_OPENCL)
        applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL);
    
    if (target == DNN_TARGET_OPENCL_FP16)
        applyTestTag(CV_TEST_TAG_DNN_SKIP_OPENCL_FP16);
...
```

build and run test
`./bin/opencv_test_dnn --gtest_filter=*PyTorchAttentionSingleHead*`

### 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: proposal: time: Add TickerFunc
Labels: Proposal

### Proposal Details

I propose TickerFunc to time package. This API is similar with time.AfterFunc. 
Currently, if we execute some func regularly, we must write the code like following.

```go
func main() {
	t := time.NewTicker(1 * time.Second)
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()
	go func() {
		for {
			select {
			case <-t.C:
				println("tick")
			case <-ctx.Done():
				return
			}
		}
	}()
        time.Sleep(N * time.Second)
        cancel()
        <-ctx.Done()
}
```

As you can see, this code is so complicated to what I want to do and if we forget the context or something to cancel, then this goroutine will be leaked.

```
TickerFunc(ctx context.Context, d Duration, f func()) *Ticker
```


The following code is example when I use time.TickerFunc.

```go
func main() {
    ctx, cancel := context.WithCancel(context.Background())
    defer cancel()
    time.TickerFunc(ctx, 1*time.Second, func() {
        println("tick")
    })
    time.Sleep(N * time.Second)
    cancel()
    <-ctx.Done()
}

func TickerFunc(ctx context.Context, d time.Duration, f func()) *time.Ticker {
    t := time.NewTicker(d)
    go func() {
        for {
            select {
            case <-t.C:
                f()
            case <-ctx.Done():
                t.Stop()
                return
            }
        }
    }()
    return t
}
```

It's simpler than first one. In additional, since we must pass the context, we can prevent to leak goroutine.
This API is helpful to execute simple task which you want do repeatedly.
Repository: next.js
Issue: Module css is not working with Parallel Route
Labels: bug

### Link to the code that reproduces this issue

https://github.com/developer-choi/nextjs-bug-report-1

### To Reproduce

See README.md https://github.com/developer-choi/nextjs-bug-report-1

### Current vs. Expected behavior

### expectation
I written **border** style in [layout.module.css](https://github.com/developer-choi/nextjs-bug-report-1/blob/master/src/app/layout.module.css)
The layout.module.css must work.
![image](https://github.com/user-attachments/assets/4f0ba37c-ed47-4783-966e-9939576b9372)

### bug (current)
The layout.module.css was not working.
![image](https://github.com/user-attachments/assets/8b2bf82e-1320-4549-87fe-72a9919ae387)

### Motivation
I wanted to show pages conditionally.
so, I used Parallel Routes. 
but layout.module.css was not working. 
I attach repository URL.

https://github.com/developer-choi/nextjs-bug-report-1

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 16152
  Available CPU cores: 20
Binaries:
  Node: 20.15.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.5 // Latest available version is detected (14.2.5).
  eslint-config-next: 14.2.5
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.5.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local)

### Additional context

_No response_
Repository: pytorch
Issue: Torch compile can't support Tensor.item
Labels: triaged,oncall: pt2,module: dynamo

### 🐛 Describe the bug

I try to compile diffusion model unet with torch.compile. But got 
```
transformations(instructions, code_options)
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 165, in _fn
    return fn(*args, **kwargs)
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/convert_frame.py", line 500, in transform
    tracer.run()
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 2149, in run
    super().run()
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 810, in run
    and self.step()
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 773, in step
    getattr(self, inst.opname)(inst)
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 489, in wrapper
    return inner_fn(self, inst)
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 1219, in CALL_FUNCTION
    self.call_function(fn, args, {})
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/symbolic_convert.py", line 674, in call_function
    self.push(fn.call_function(self, args, kwargs))
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/variables/misc.py", line 562, in call_function
    return self.obj.call_method(tx, self.name, args, kwargs)
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/variables/tensor.py", line 434, in call_method
    result = handler_method(*args, **kwargs)
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/variables/tensor.py", line 667, in method_item
    unimplemented("Tensor.item")
  File "/home/admin/miniconda3/envs/diffusers/lib/python3.10/site-packages/torch/_dynamo/exc.py", line 190, in unimplemented
    raise Unsupported(msg)
torch._dynamo.exc.Unsupported: Tensor.item
```

I don't know where the problem is and how to fix it. Anyone can help? I can't thank you enough.

### Versions

torch == '2.3.1+cu121' on A100 


cc @ezyang @anijain2305 @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames
Repository: PowerToys
Issue: PowerRename counter does not increment for the next row when it finds a file which already has the correct counter value, causing duplicate file names
Labels: Issue-Bug,Needs-Triage

### Microsoft PowerToys version

0.82.0

### Installation method

PowerToys auto-update

### Running as admin

Yes

### Area(s) with issue?

PowerRename

### Steps to reproduce

I have a set of files that needs to remain in a specific order, but new files will occasionally be inserted between two existing files. I have used a 010, 020, 030 prefix so the numbering is sparse enough to insert the new file as e.g. 025, 028 etc. without needing to manually renumber all the files after it. (The way we used to do with BASIC line numbers. 👴)

Occasionally, I have wanted to renumber all the files so they go back to neat increments of 10, so I reached for PowerRename.

I have found that when PowerRename finds a file in the sequence that already has the correct counter value (so does not need to be renamed), it does not increment the counter, which means the next file becomes a duplicate number.

![image](https://github.com/user-attachments/assets/22631e50-4954-4d0a-a269-15df0523069e)

### ✔️ Expected Behavior

Given the following input files:

- 010 Filename.txt
- 020 Filename.txt
- 025 Filename.txt
- 030 Filename.txt

The output should be:

- 010 Filename.txt -> 010 Filename.txt
- 020 Filename.txt -> 020 Filename.txt
- 025 Filename.txt -> **030 Filename.txt**
- 030 Filename.txt -> **040 Filename.txt**

### ❌ Actual Behavior

The output is instead:

- 010 Filename.txt -> 010 Filename.txt
  - The file did not need to be renamed, as expected
- 020 Filename.txt -> **010 Filename.txt**
  - The counter did not increment on the previous file, so has created a duplicate file name
- 025 Filename.txt -> **020 Filename.txt**
  - The counter incremented successfully for the first time, but is 10 behind the expected value
- 030 Filename.txt -> 030 Filename.txt
  - The counter didn't increment previously, so this file did not need to be renamed but should have been

### Other Software

_No response_
Repository: kubernetes
Issue: Why doesn't the device plugin pass the containerID parameter
Labels: sig/node,kind/feature,lifecycle/rotten,triage/needs-information,needs-triage

### What would you like to be added?

Without containerID, I cannot perform secondary preferences for devices in the GetPreferredAllocation interface

### Why is this needed?

Without containerID, I cannot perform secondary preferences for devices in the GetPreferredAllocation interface
Repository: TypeScript
Issue: Instantiation expressions don't reject incompatible signatures in situations with mixed call and construct signatures
Labels: Help Wanted,Possible Improvement

### 🔎 Search Terms

instantiation expression signature applicable incompatible call construct class

### 🕗 Version & Regression Information

- This is the behavior in every version I tried

### ⏯ Playground Link

https://www.typescriptlang.org/play/?ts=5.6.0-dev.20240717#code/MYGwhgzhAEBiD29oG8C+BYAUFgLgTwAcBTaAFSIh2gF4UtpoAeU6IgDxyIDsATGLgK4BbAEZEATgD4AFGHEBzAFxkAlMtIBuetC5EA7kxbtOvGJXEBLLvJlylq5QnhbMqF1h5FQcksHhdKaE5KdQocFz8AqiscMC4cCzBOHhogsMYAIgzJFyA

### 💻 Code

```ts
class Foo {}

type Test = {
  <T extends number>(arg: T): T;
  new <T extends string>(arg: T): Foo;
};

declare const test: Test;
const intantiated = test<"">;
```


### 🙁 Actual behavior

An error gets reported:
> Type 'string' does not satisfy the constraint 'number'.(2344)

And the final type of `instantiated` is computed as:
```ts
const intantiated: {
    <T extends number>(arg: T): T;
    new (arg: ""): Foo;
}
```

### 🙂 Expected behavior

I'm not 100% sure but it feels like this type could be successfully instantiated to `{ new (arg: ""): Foo; }`. This is the only signature that matches the given type arguments.

### Additional information about the issue

_No response_
Repository: godot
Issue: Draw Skeleton2D gizmos independently of editor camera zoom
Labels: enhancement,topic:editor,confirmed,usability,topic:animation,topic:2d

### Tested versions

v4.3.beta3.official [82cedc83c]
4.2-stable, 
4.1-stable
4.0-stable.

### System information

w10 64

### Issue description

I'm testing the "skeleton" example in godot 4.3 beta 3 extract from here:

![Captura5](https://github.com/user-attachments/assets/d54487ce-be4b-48f2-9245-28b0e9d4c9a7)

This is what appears when you open the character's scene.

![Captura4](https://github.com/user-attachments/assets/d4901c6e-5af6-4b7d-a427-ad1b1ab68d15)

I assume this is a bug or problem with the display of the bones because the documentation does not show it like this:

![Captura6](https://github.com/user-attachments/assets/6ca460fd-2431-4959-b96e-6fbcf767678d)

I'm talking about the look of the bones, they look too big, I'm not talking about the problems that show a yellow notice.

### Steps to reproduce

...

### Minimal reproduction project (MRP)

...
Repository: angular
Issue: registerOnValidatorChange not called when bind in template form on the form element
Labels: area: forms,forms: DOM

### Which @angular/* package(s) are the source of the bug?

forms

### Is this a regression?

No

### Description

In template form, the method `registerOnValidatorChange` of a custom validator directive isn't called when the validator is an the form element.

In the reproduction stackblitz, I put a `console.log` in the `registerOnValidatorChange` of `CustomValidatorDirective`. You can see in the console that the `validate` is called as espected but the `registerOnValidatorChange` is never called.

### Please provide a link to a minimal reproduction of the bug

https://stackblitz.com/edit/registeronvalidatorchange-not-call-ex?description=An%20angular-cli%20project%20based%20on%20@angular/animations,%20@angular/common,%20@angular/compiler,%20@angular/core,%20@angular/forms,%20@angular/platform-browser,%20@angular/platform-browser-dynamic,%20@angular/router,%20core-js,%20rxjs,%20tslib%20and%20zone.js&file=src%2Fmain.ts,src%2Fapp.module.ts,src%2Fapp.component.ts,src%2Fcustom-validator.directive.ts,integrations.snippets.userData.settingsRaw&template=node&title=Angular%20Starter

### Please provide the exception or error you saw

```true
`registerOnValidatorChange` is not called
```


### Please provide the environment you discovered this bug in (run `ng version`)

```true
Angular CLI: 18.1.0
Node: 18.20.3
Package Manager: npm 10.2.3
OS: linux x64

Angular: 18.1.0

Package                         Version
---------------------------------------------------------
@angular-devkit/build-angular   18.1.0
@angular/animations             18.1.0
@angular/cli                    18.1.0
@angular/common                 18.1.0
@angular/compiler-cli           18.1.0
@angular/compiler               18.1.0
@angular/core                   18.1.0
@angular/forms                  18.1.0
@angular/platform-browser       18.1.0
@angular/router                 18.1.0
rxjs                            7.8.1
tslib                           2.6.3
typescript                      5.4.5
zone.js                         0.14.7
```


### Anything else?

It's maybe related to this issue: https://github.com/angular/angular/issues/20268
Repository: go
Issue: runtime: stalls under Rosetta2 with MacOS 14.5 
Labels: NeedsInvestigation,compiler/runtime

### Go version

go version go1.22.4 darwin/arm64

### Output of `go env` in your module/workspace:

```shell
n/a
```


### What did you do?

I have a go amd64 binary that is running fine with Rosetta2 in MacOS 14.4 and earlier. After upgrading to MacOS 14.5 it stalls.

As a workaround, running the binary with `GODEBUG=asyncpreemptoff=1` works.

The binary is https://github.com/pulumi/pulumi-aws with version `v6.42.0+`.

I wasn't able to create a minimal example that triggers this, but to reproduce it you can do the following (you need an AWS account but nothing gets created):
- install pulumi: `brew install pulumi`
- create project: `mkdir rosetta-stall-repro && cd rosetta-stall-repro && pulumi new aws-typescript`
- select the affected version (this in turn downloads the go binary): `yarn upgrade @pulumi/aws@6.42.0`
- run the arm64 binary (works): `pulumi preview`
- download the amd64 binary:
    - `pushd ~/.pulumi/plugins/resource-aws-v6.42.0`
    - `wget https://github.com/pulumi/pulumi-aws/releases/download/v6.42.0/pulumi-resource-aws-v6.42.0-darwin-amd64.tar.gz`
    - `tar -xvzf pulumi-resource-aws-v6.42.0-darwin-amd64.tar.gz`
    - `popd`
- run the amd64 binary (stalls): `pulumi preview`




### What did you see happen?

Getting the following error before the runtime stalls:
```
assertion failed [arm_interval().contains(address)]: code fragment does not contain the given arm address
(CodeFragmentMetadata.cpp:48 instruction_extents_for_arm_address)
```

CodeFragmentMetadata.cpp seems to be part of Rosetta2:
```
strings /Library/Apple/usr/libexec/oah/runtime | grep CodeFragmentMetadata.cpp
CodeFragmentMetadata.cpp
```

### What did you expect to see?

The runtime shouldn't stall and execute normally.
Repository: tauri
Issue: [bug] Can show video streams transcoded from RTSP to WebRTC protocol in browser, but not in desktop app.
Labels: type: bug,platform: macOS,status: needs triage

### Describe the bug

Hello! I'm developing video viewer which is streamed through webrtc_proxy, which is the server that receive rtsp stream, parse rtp packets, and stream those packets to tauri frontend(generated by create-tauri-app with react ts template) with webrtc protocol.

In this environment, I found that if I show this page using browser(i.e. http://localhost:1420), is is worked well, but if I execute it using tauri frontend(i.e. desktop webview), it is not..

I have checked streaming raw packets using wireshark, and I can see that udp packets streamed by webrtc_proxy are streamed well.

The directory structure is:
![image](https://github.com/user-attachments/assets/44fb4fed-6cc0-4a2a-af82-2805c05484e0)

Can I get some help?
Thanks!

### Reproduction

_No response_

### Expected behavior

Can show WebRTC video stream in desktop app.

### Full `tauri info` output

```text
sudo yarn tauri info
yarn run v1.22.22
$ tauri info

[✔] Environment
    - OS: Mac OS 14.5.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 20.12.2
    - yarn: 1.22.22
    - npm: 10.7.0

[-] Packages
    - tauri [RUST]: 2.0.0-beta.24
    - tauri-build [RUST]: 2.0.0-beta.19
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - @tauri-apps/api [NPM]: 2.0.0-beta.15
    - @tauri-apps/cli [NPM]: 2.0.0-beta.22

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: material-ui
Issue: [Joy-ui] [Table] Focus style on table rows is inconsistent
Labels: on hold,component: table,package: joy-ui

### Steps to reproduce

Link to live example: https://mui.com/joy-ui/react-table/

Steps:

1. Enable the "sticky header" on the first example
2. Set the first row to `:focus-visible`

Note: On chrome/edge the focus also looks different! The firefox one is blue with lines above and below, while the chrome/edge version is black and all around.




### Current behavior

The top part of the outline is missing (hidden below header)


Firefox:

![grafik](https://github.com/user-attachments/assets/2a2d8593-49b4-4c5c-963f-9de3ce543738)

Edge:

![grafik](https://github.com/user-attachments/assets/6320085c-55e1-4cda-8da5-72c078c42d52)

### Expected behavior

Looks the same as focus for second row (line below and above)

![grafik](https://github.com/user-attachments/assets/619f65a7-4297-49e9-9fec-063ebcb18464)


### Context

I want to support keyboard navigation using these focus styles.

### Your environment

<details>
  <summary><code>npx @mui/envinfo</code></summary>

  System:
    OS: Linux 5.15 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
  Binaries:
    Node: 20.14.0 - ~/.nvm/versions/node/v20.14.0/bin/node
    npm: 9.6.7 - ~/.nvm/versions/node/v20.14.0/bin/npm
    pnpm: 8.12.1 - ~/.local/share/pnpm/pnpm
  Browsers:
    Firefox
</details>


**Search keywords**: focus table row sticky header