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

core/hmem: introduce hmem_data field to memory registration #8787

Merged
merged 1 commit into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/ofi_mr.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,21 @@ int ofi_mr_map_verify(struct ofi_mr_map *map, uintptr_t *io_addr,
* registration.
*/

/* libfabric internal flags starting from 60 to 63 */
/**
* OFI_HMEM_DATA_GDRCOPY_HANDLE indicates that hmem_data points to
* a gdrcopy_handle data structure
*/
#define OFI_HMEM_DATA_GDRCOPY_HANDLE (1ULL << 60)

struct ofi_mr {
struct fid_mr mr_fid;
struct util_domain *domain;
uint64_t key;
uint64_t flags;
enum fi_hmem_iface iface;
uint64_t device;
void *hmem_data;
shefty marked this conversation as resolved.
Show resolved Hide resolved
};

void ofi_mr_update_attr(uint32_t user_version, uint64_t caps,
Expand Down
1 change: 1 addition & 0 deletions include/rdma/fi_domain.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ struct fi_mr_attr {
int neuron;
int synapseai;
} device;
void *hmem_data;
wenduwan marked this conversation as resolved.
Show resolved Hide resolved
};

struct fi_mr_modify {
Expand Down
4 changes: 4 additions & 0 deletions man/fi_mr.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ struct fi_mr_attr {
int neuron;
int synapseai;
} device;
void *hmem_data;
};
```
## mr_iov
Expand Down Expand Up @@ -669,6 +670,9 @@ This field is ignore unless the iface field is valid.
*synapseai*
: For FI_HMEM_SYNAPSEAI, the device identifier for Habana Gaudi hardware.

## hmem_data
The hmem_data field is reserved for future use and must be null.

## fi_hmem_ze_device

Returns an hmem device identifier for a level zero <driver, device> tuple.
Expand Down