Skip to content
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

[PAL/vm-common] Check the "break" variable less frequently in delay() #42

Open
wants to merge 1 commit into
base: dimakuv/add-candle-rust-example
Choose a base branch
from

Commits on Jul 31, 2024

  1. [PAL/vm-common] Check the "break" variable less frequently in delay()

    Previously, `delay()` function accessed the "break out of loop early"
    variable `continue_gate` basically on every CPU cycle. This variable
    is typically a global variable causing high contention on multi-core
    workloads. This e.g. manifested in the Candle Quantized LLaMA app.
    
    This commit fixes this by checking the variable less frequently.
    The current heuristic is to check it every 1 ms.
    
    Signed-off-by: Dmitrii Kuvaiskii <[email protected]>
    dimakuv authored and dimstav23 committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    1d7aee2 View commit details
    Browse the repository at this point in the history