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

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

copybara-service[bot]
Copy link

[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

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: 697760432
@copybara-service copybara-service bot merged commit 3844060 into main Nov 18, 2024
1 check passed
@copybara-service copybara-service bot deleted the test_696961542 branch November 18, 2024 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant