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

[tsl:concurrency] Add CountDownAsyncValueRef to concurrency library #19403

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Nov 15, 2024

  1. [tsl:concurrency] Add CountDownAsyncValueRef to concurrency library

    This idiom is used in a few places in XLA:CPU executor, and TPU runtime.
    
    Conceptually it's similar to https://en.cppreference.com/w/cpp/thread/latch, but for async values.
    
    BM_CountDownSuccess/4        31.4 ns         31.4 ns     19308520
    BM_CountDownSuccess/8        37.1 ns         37.0 ns     18911191
    BM_CountDownSuccess/16       57.3 ns         57.3 ns     12371255
    BM_CountDownSuccess/32       90.1 ns         90.0 ns      7746279
    BM_CountDownError/4          75.8 ns         75.8 ns      8899579
    BM_CountDownError/8           110 ns          110 ns      6349328
    BM_CountDownError/16          171 ns          171 ns      4068219
    BM_CountDownError/32          290 ns          290 ns      2402659
    
    PiperOrigin-RevId: 696961542
    ezhulenev authored and Google-ML-Automation committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    dd2d502 View commit details
    Browse the repository at this point in the history