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
ch4/ipc: refactor IPC and add CMA module #6579
Draft
hzhou
wants to merge
11
commits into
pmodels:main
Choose a base branch
from
hzhou:2306_cma
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+824
−434
Conversation
This file contains 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
The _get_ipc_attr functions should check the threshold and set ipc_type to MPIDI_IPCI_TYPE__NONE if it doesn't meet threshold. Thus, there is no need to return the threshold to the caller. Not exposing threshold allows more sophiscated threshold checking if needed. Slight refactor to streamline the do_ipc check.
We no longer use the status and the ipc fields. Remove.
Move relevant code together.
Check MPIR_CVAR_CH4_IPC_GPU_HANDLE_CACHE at the caller place rather than inside ipc_handle_cache_search and MPIDI_GPU_ipc_handle_cache_insert. This keeps the search and insert utility functions simple, and avoids the extra insert_successful check. Also, move MPIDI_GPU_ipc_handle_cache_insert into the branch to avoid extra checking and setting handle_status.
Store MPL_gpu_ipc_mem_handle_t directly rather than MPIDI_IPCI_ipc_handle_t. Add separate utilities to avoid mixing different requirement of caching local ipc handles versus caching remote mapped addresses.
Directly cache mapped_base_addr.
Refactor and move the code into MPIDI_GPU_copy_data. The gpu related code belongs in gpu_post.c.
hzhou
force-pushed
the
2306_cma
branch
2 times, most recently
from
July 6, 2023 19:07
b7d2568
to
d7cb5ea
Compare
Make ipc attr query and ipc handle preparation orthogonal and use separate data structure to avoid complication. In attr query, we focus on whether we should enable IPC, and only cache necessary information locally that is sufficient for preparing the handle. All the actual handle preparation logic moved to the separate function later. Different IPC features have different logic. Move most of the special data structure and logic inside the feature code to avoid changes in one feature affecting the code in other features. ch4/ipc: refactor fixup
This is cleaner.
The xpmem functions are now always guarded by #ifdef MPIDI_CH4_SHM_ENABLE_XPMEM.
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.
Pull Request Description
This is a temporary PR for reference. It will be rebased and possibly split into separate PRs.
[skip warnings]
Author Checklist
Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
Commits are self-contained and do not do two things at once.
Commit message is of the form:
module: short description
Commit message explains what's in the commit.
Whitespace checker. Warnings test. Additional tests via comments.
For non-Argonne authors, check contribution agreement.
If necessary, request an explicit comment from your companies PR approval manager.