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

General: C++ API updates #19

Closed
wants to merge 10 commits into from
Closed

General: C++ API updates #19

wants to merge 10 commits into from

Conversation

mkhazraee
Copy link
Contributor

  • Based on internal discussions within the group and external feedback.

* Based on internal discussions within the group and external feedback.

Signed-off-by: Moein Khazraee <[email protected]>
// There are two steps, initial preparations for each side, followed by a
// selection by indices to prepare a full transfer request.

// Prepares descriptors for one side of a transfer request. For local
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest to add some text formatting here to improve readability. I.e.:

Prepares descriptors for one side of a transfer request.
* For local initiator side, remote_agent should be passed as NIXL_INIT_AGENT.
* For local target side in local transfers agent's own name is passed as remote_agent.

Also, I don't follow the description here. What is local target or initiator side?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed about formatting, will do.
So for ucx we should pass local metadata for the initiator side, and remote metadata for the target, even if target is the same agent. You mentioned better to do it once, instead of each time parse the local metadata to extract the remote metadata.

const nixl_xfer_op_t &operation,
const nixl_xfer_dlist_t &local_descs,
const nixl_xfer_dlist_t &remote_descs,
const std::string &remote_agent,
Copy link
Contributor

Choose a reason for hiding this comment

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

so the agent stays string? We had discussions it turns blob as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kapil made this comment in the meeting that for logging, string makes more sense, and that's what users want. And if they pass something that has \0, anyways we process it properly. That's more intuitive too.

nixl_xfer_state_t postXferReq (nixlXferReqH* req);
/*** Transfer Request Prepration ***/

// Method 1, for when memory addresses of the transfer is not known
Copy link
Contributor

Choose a reason for hiding this comment

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

Why phrasing it this way?
Maybe its the opposite - all the addresses are known a prior, and you create this handle at app initialization and use it throughout. it's actually the best scenario that may happen!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, it's both, should update the comment, known priori or the time of transfer. But that kind of sounds all the time. I'll think about it how to make it say there are no blocks.

// Makes a full transfer request by selecting indices from already prepared sides.
// NIXL automatically determines the backend that can perform the transfer.
// The notification message can be given in optional extra_params.
nixl_status_t selectXferSides (
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like select word - there are 2 sides passed into this function and they are already "selected"
I think it should be something like "buildXferReq"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure about this myself either. Previously it was makeXferReq, very similar to buildXferReq. But the point being these are preprations, the post actually makes it. So not sure what else to call it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Select sounded like there are some preps, we're selecting from them, it's still prep. But agreed there should be a better word.

@mkhazraee mkhazraee force-pushed the mkhazraee/cpp_api_updates branch from d8653e9 to 747f93e Compare March 14, 2025 02:59
@mkhazraee mkhazraee closed this Mar 14, 2025
@mkhazraee mkhazraee deleted the mkhazraee/cpp_api_updates branch March 16, 2025 04:58
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.

3 participants