Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

pl752
Copy link
Contributor

@pl752 pl752 commented Apr 21, 2025

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
Copy link
Collaborator

ngxson commented Apr 21, 2025

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
Copy link
Contributor Author

pl752 commented Apr 21, 2025

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