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

mpix: add MPIX_Query_pointer_attr #7049

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

hzhou
Copy link
Contributor

@hzhou hzhou commented Jul 2, 2024

Pull Request Description

It is not always easy to check what kind of memory type user has as seen by MPI. For example, a memory from a Python library. Add MPIX_Query_pointer_attr for the debugging purpose.

Synopsis:

int rc, type, device;
rc = MPIX_Query_pointer_attr(sum, &type, &device);
printf("MPIX_Query_pointer_attr: sum=%p, rc=%x, type=%d, device=%d\n", sum, rc, type, device);

, where type is one of -

/* MPIX_Query_pointer_attr */
enum MPIX_Pointer_type {
    MPIX_POINTER_UNREGISTERED_HOST = 0,
    MPIX_POINTER_REGISTERED_HOST,
    MPIX_POINTER_DEV,
    MPIX_POINTER_MANAGED
};

[skip warnings]

Author Checklist

  • Provide Description
    Particularly focus on why, not what. Reference background, issues, test failures, xfail entries, etc.
  • Commits Follow Good Practice
    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.
  • Passes All Tests
    Whitespace checker. Warnings test. Additional tests via comments.
  • Contribution Agreement
    For non-Argonne authors, check contribution agreement.
    If necessary, request an explicit comment from your companies PR approval manager.

hzhou added 2 commits July 9, 2024 16:52
The abstraction of device id as an integer is a good abstraction above
MPL. The opaqueness of MPL_gpu_device_handle_t, on the other hand, makes
it useless, since the upperlayer can't do anything with it.

For ZE, simply expose the internal device id. For new GPU runtimes that
does support integer device ids, we can similarly do a map as in
mpl_gpu_ze.c.
It is not always easy to check what kind of memory type user has as seen
by MPI. For example, a memory from a Python library. Add
MPIX_Query_pointer_attr for the debugging purpose.
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