Skip to content

llama-gemma3-cli: Sigint rework in gemma3 vision example#13043

Closed
pl752 wants to merge 1 commit into
ggml-org:masterfrom
pl752:weird_sigint
Closed

llama-gemma3-cli: Sigint rework in gemma3 vision example#13043
pl752 wants to merge 1 commit into
ggml-org:masterfrom
pl752:weird_sigint

Conversation

@pl752

@pl752 pl752 commented Apr 21, 2025

Copy link
Copy Markdown
Contributor

Purpose
Converted SIGINT handler to notify the main through the flag, instead of just exiting
Added the logic to interrupt the program in the predictable states

Rationale
Original code abruptly ends the program on sigint, without flushing stdout or printing any stats
Changed the behavior to only setting global state flags or force quit, if the application didn't respond to the flag change
State flags are volatile, due to them being changed in the interrupt and only read in the main code, which doesn't guarantee proper handling of unobserved changes in some of the compilers with enabled -O2 or higher.

@ngxson

ngxson commented Apr 21, 2025

Copy link
Copy Markdown
Collaborator

There is an on-going work and llama-gemma3-cli will be soon moved to llama-mtmd-cli, I think we should go back to this PR later because this is not very important atm

See: #13012

@pl752

pl752 commented Apr 21, 2025

Copy link
Copy Markdown
Contributor Author

Okay, thank you for the response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants