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

Starting to work on coroutines. #243

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Starting to work on coroutines. #243

wants to merge 9 commits into from

Conversation

nicolasnoble
Copy link
Contributor

@nicolasnoble nicolasnoble commented Jan 16, 2025

This introduces a Coroutine class in the pa namespace, which we will then be able to use for a lightweight scheduler.

std::coroutine_handle<>::from_address(awaitingCoroutine).resume();
}
}
[[no_unique_address]] std::monostate value_{};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary for this?:

https://github.com/triton-inference-server/perf_analyzer/pull/243/files#diff-053471f1e45d31573787f7b9b3b13d623b2d2cbff9026b8e8d43bf3d4c95f2fdR122-R124

In other words if the structs didn't have the same list of data member identifiers, the typedef line wouldn't work?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's for the await_resume at the end, and the various other generic places where we haul the result of the promise.

@@ -0,0 +1,136 @@
// Copyright 2025, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: rename test_coroutine.cc

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.

2 participants