-
Notifications
You must be signed in to change notification settings - Fork 40
Implementation of ResourceRqId #1042
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Kobzol
reviewed
Dec 29, 2025
Member
Kobzol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Read through it commit-by-commit, so some things might be out-of-date. Looks like a great change!
Kobzol
approved these changes
Jan 2, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces ResourceRqId (and LocalResourceRqId).
Overall idea is to replace ResourceRequestVariants (self-contained resource request description) by ResourceRqId (u32) that is an index into global table of resources (the table is updated when a new type resource request occurs; we assume that is a relatively low number of different resource requests).
To make submits self-contained, the task graph submit uses LocalResourceRqId, that is the same idea but ID is valid only within the submit. The resource request map to (local) ids is attached to the submit of the task graph. It reduce size of submits (ResourceRequests are not repeated) and when the task is attached to the server we need to resolve local ids to global ids only once, not for each task).
It is mainly preparation for the new scheduler that heavily relies on grouping by resource requests.
Advantages for the current implementation:
Future open questions:
resource_rq_idis now part of server Task structure (so it is slightly bigger) instead of SharedData. On the other hand it allows to share SharedData when resource request is different and it saves one dereference to share data when only resource request is needed. The server needs to access resource requests much often compared to other "shared data". But I feel a kind of schizophrenia between ResrouceRqs and SharedData.