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

mpid: add MPIR_Data and MPID_{Send,Recv}_data (WIP) #7096

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

Conversation

hzhou
Copy link
Contributor

@hzhou hzhou commented Aug 15, 2024

Pull Request Description

Add new MPID send/recv interfaces that accept a data pointer rather
than the (buf, count, datatype) triplet. This allows carrying more
information for extensions. For example, we can support data chunks that
often occur in pipelining algorithms. We may also extend MPIR_Data to
add memory attributes.

Replace -

MPID_Send(buf, count, datatype, ...);
MPID_Recv(buf, count, datatype, ...);

with

MPID_Send_data(MPIR_Data *data, ...);
MPID_Recv_data(MPIR_Data *data, ...);

, where MPIR_Data is defined as

typedef struct MPIR_Data {
    void *buf;
    MPI_Aint count;
    MPI_Datatype datatype;
    MPI_Aint offset;
    MPI_Aint length;
} MPIR_Data;

This allows MPIR-layer pipelining-like algorithms to break the data into chunks without worrying about creating new chunk datatypes.

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 hzhou changed the title mpid: add MPIR_Data and MPID_{Send,Recv}_data mpid: add MPIR_Data and MPID_{Send,Recv}_data (WIP) Aug 15, 2024
Add new MPID send/recv interfaces that accepts a data pointer rather
than the (buf, count, datatype) triplet. This allows carrying more
information for extensions. For example, we can support data chunks that
often occurs in pipelining algorithms. We may also extend MPIR_Data to
add memory attributes.
Add sendlengh input to MPIR_Localcopy_gpu and MPIR_Ilocalcopy_gpu; add
sendoffset, sendlength, recvoffset input to MPIR_Ilocalcopy.

This is to support partial/chunk data copy.

MPIR_Localcopy is leftalone to minimize backward impact.
Support MPIR_Data in the self path.
The buf, count, datatype triplet are not needed in checking eager limit.
Removing them from the interface facilitates later we add partial
datatype via MPIR_Data.
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