Skip to content

[v5.0.x] btl,mtl/ofi: set device only flag#13752

Merged
janjust merged 1 commit intoopen-mpi:v5.0.xfrom
aingerson:main
Apr 15, 2026
Merged

[v5.0.x] btl,mtl/ofi: set device only flag#13752
janjust merged 1 commit intoopen-mpi:v5.0.xfrom
aingerson:main

Conversation

@aingerson
Copy link
Copy Markdown
Contributor

In OFI, the FI_HMEM_DEVICE_ONLY registration flag signals to the provider that the memory is only on the device and is not unified memory (which can migrate between the GPU and host). IPC is only usable with device only memory and is not valid for unified memory. Without this flag, providers cannot provide optimizations like IPC. Set the flag if the address was found to be non-unified memory. This enables IPC copies in OFI.

The flag is available starting in v1.13.0 so this adds a configure check to make sure we only use it if available.

This also includes an indentation fix and typos within the scope of the patch

@github-actions github-actions bot added this to the v5.0.10 milestone Feb 27, 2026
@aingerson
Copy link
Copy Markdown
Contributor Author

@angainor

@angainor
Copy link
Copy Markdown

angainor commented Mar 3, 2026

Thanks. I'll test.

@angainor
Copy link
Copy Markdown

@aingerson I have tested this patch now, applying it to 5.0.10 and using libfabric 2.4.0 - works as it should.

@aingerson
Copy link
Copy Markdown
Contributor Author

@bwbarrett Is this ok to include in v5.0.x?

Copy link
Copy Markdown
Member

@bwbarrett bwbarrett left a comment

Choose a reason for hiding this comment

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

I don't have any problem with the patch itself (except maybe the useless change in accelerator.h). However, this should either target main OR should be a cherry pick that includes the cherry-picked-from line.

In OFI, the FI_HMEM_DEVICE_ONLY registration flag signals to the
provider that the memory is only on the device and is not unified
memory (which can migrate between the GPU and host). IPC is only
usable with device only memory and is not valid for unified memory.
Without this flag, providers cannot provide optimizations like IPC.
Set the flag if the address was found to be non-unified memory.
This enables IPC copies in OFI.

The flag is available starting in v1.13.0 so this adds a configure
check to make sure we only use it if available.

This also includes an indentation fix and typos within the scope of
the patch

Cherry-picked from commit e1d8fb8

Signed-off-by: Zach Dworkin <zachary.dworkin@intel.com>
Signed-off-by: Alexia Ingerson <alexia.ingerson@intel.com>
@aingerson
Copy link
Copy Markdown
Contributor Author

@bwbarrett Thanks for the notes! I've updated to include the cherry pick line that was missing. Sorry about that.
I also removed the accelerator.h change which was there because I noticed the original patch added a new flag which was never used (from an old version of the implementation, sorry, my bad). I'm going to open a new PR for main to remove it.

@janjust janjust merged commit 4880f81 into open-mpi:v5.0.x Apr 15, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants