-
Notifications
You must be signed in to change notification settings - Fork 96
gin: add GDAKI plugin with stub implementations #1197
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
Open
anshumang
wants to merge
1
commit into
aws:master
Choose a base branch
from
anshumang:gdaki-stubs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /* | ||
| * Copyright (c) 2026 Amazon.com, Inc. or its affiliates. All rights reserved. | ||
| */ | ||
|
|
||
| #ifndef NCCL_OFI_GIN_GDAKI_H_ | ||
| #define NCCL_OFI_GIN_GDAKI_H_ | ||
|
|
||
| #include "nccl_ofi.h" | ||
|
|
||
| /* | ||
| * Return true if GDAKI mode is requested via OFI_NCCL_GIN_GDAKI=1 env var. | ||
| */ | ||
| bool nccl_ofi_gin_gdaki_enabled(); | ||
|
|
||
| /* | ||
| * The GDAKI plugin. Shared functions (init, devices, listen, connect) | ||
| * are nullptr and get copied from the proxy plugin at init time. | ||
| */ | ||
| extern ncclGin_v11_t nccl_ofi_gin_gdaki_plugin; | ||
|
|
||
| #endif /* NCCL_OFI_GIN_GDAKI_H_ */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,151 @@ | ||
| /* | ||
| * Copyright (c) 2026 Amazon.com, Inc. or its affiliates. All rights reserved. | ||
| * | ||
| * GDAKI stub implementations for the GIN plugin API. | ||
| * These provide the full ncclGin_v11_t plugin for GDAKI mode. | ||
| * | ||
| * Task: GDAKI stub implementation | ||
| */ | ||
|
|
||
| #include "config.h" | ||
|
|
||
| #include "rdma/gin/nccl_ofi_gin_gdaki.h" | ||
| #include "nccl_ofi.h" | ||
| #include "nccl_ofi_api.h" | ||
| #include "nccl_ofi_param.h" | ||
|
|
||
| bool nccl_ofi_gin_gdaki_enabled() | ||
| { | ||
| return ofi_nccl_gin_gdaki.get(); | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_get_properties(int dev, ncclNetProperties_v11_t *props) | ||
| { | ||
| nccl_ofi_properties_t ofi_properties; | ||
| ncclResult_t ret = nccl_net_ofi_get_properties(dev, &ofi_properties); | ||
| if (ret != ncclSuccess) { | ||
| return ret; | ||
| } | ||
|
|
||
| props->name = ofi_properties.name; | ||
| props->pciPath = ofi_properties.pci_path; | ||
| props->guid = ofi_properties.guid; | ||
| props->ptrSupport = NCCL_PTR_HOST; | ||
| if (ofi_properties.hmem_support) { | ||
| props->ptrSupport |= NCCL_PTR_CUDA; | ||
| } | ||
| if (ofi_properties.dmabuf_support) { | ||
| props->ptrSupport |= NCCL_PTR_DMABUF; | ||
| } | ||
|
|
||
| props->regIsGlobal = ofi_properties.regIsGlobal; | ||
| props->speed = ofi_properties.port_speed; | ||
| props->port = ofi_properties.port_number; | ||
| props->latency = ofi_properties.latency; | ||
| props->maxComms = ofi_properties.max_communicators; | ||
| props->maxRecvs = ofi_properties.max_group_receives; | ||
| props->netDeviceType = NCCL_NET_DEVICE_GIN_GDAKI; | ||
| props->netDeviceVersion = NCCL_NET_DEVICE_INVALID_VERSION; | ||
| props->vProps.ndevs = 1; | ||
| props->vProps.devs[0] = dev; | ||
| props->maxP2pBytes = ofi_properties.max_p2p_bytes; | ||
| props->maxCollBytes = ofi_properties.max_coll_bytes; | ||
|
|
||
| return ncclSuccess; | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_createContext(void *collComm, int nSignals, int nCounters, | ||
| void **ginCtx, | ||
| ncclNetDeviceHandle_v11_t **devHandle) | ||
| { | ||
| NCCL_OFI_WARN("gin GDAKI: createContext not yet implemented (nSignals=%d, nCounters=%d)", | ||
| nSignals, nCounters); | ||
| return ncclInternalError; | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_destroyContext(void *ginCtx) | ||
| { | ||
| NCCL_OFI_WARN("gin GDAKI: destroyContext not yet implemented"); | ||
| return ncclSuccess; | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_regMrSym(void *collComm, void *data, size_t size, int type, | ||
| uint64_t mrFlags, void **mhandle, void **ginHandle) | ||
| { | ||
| NCCL_OFI_WARN("gin GDAKI: regMrSym not yet implemented"); | ||
| return ncclInternalError; | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_regMrSymDmaBuf(void *collComm, void *data, size_t size, | ||
| int type, uint64_t offset, int fd, | ||
| uint64_t mrFlags, void **mhandle, | ||
| void **ginHandle) | ||
| { | ||
| NCCL_OFI_WARN("gin GDAKI: regMrSymDmaBuf not yet implemented"); | ||
| return ncclInternalError; | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_deregMrSym(void *collComm, void *mhandle) | ||
| { | ||
| NCCL_OFI_WARN("gin GDAKI: deregMrSym not yet implemented"); | ||
| return ncclSuccess; | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_closeColl(void *collComm) | ||
| { | ||
| NCCL_OFI_WARN("gin GDAKI: closeColl not yet implemented"); | ||
| return ncclSuccess; | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_closeListen(void *listenComm) | ||
| { | ||
| NCCL_OFI_WARN("gin GDAKI: closeListen not yet implemented"); | ||
| return ncclSuccess; | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_ginProgress(void *collComm) | ||
| { | ||
| NCCL_OFI_WARN("gin GDAKI: ginProgress not yet implemented"); | ||
| return ncclSuccess; | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_queryLastError(void *ginCtx, bool *hasError) | ||
| { | ||
| NCCL_OFI_WARN("gin GDAKI: queryLastError not yet implemented"); | ||
| *hasError = false; | ||
| return ncclSuccess; | ||
| } | ||
|
|
||
| static ncclResult_t nccl_ofi_gin_gdaki_finalize(void *ctx) | ||
| { | ||
| NCCL_OFI_WARN("gin GDAKI: finalize not yet implemented"); | ||
| return ncclSuccess; | ||
| } | ||
|
|
||
| /* | ||
| * GDAKI plugin. Function pointers for the ncclGin_v11_t interface: | ||
| * - iput, iputSignal, test are nullptr (no CPU involvement in GDAKI mode) | ||
| * - init, devices, listen, connect are copied from the proxy plugin at | ||
| * init time. | ||
| */ | ||
| ncclGin_v11_t nccl_ofi_gin_gdaki_plugin = { | ||
| .name = "Libfabric_GDAKI", | ||
| .init = nullptr, /* Copied from proxy plugin at init time */ | ||
| .devices = nullptr, /* Copied from proxy plugin at init time */ | ||
| .getProperties = nccl_ofi_gin_gdaki_get_properties, | ||
| .listen = nullptr, /* Copied from proxy plugin at init time */ | ||
| .connect = nullptr, /* Copied from proxy plugin at init time */ | ||
| .createContext = nccl_ofi_gin_gdaki_createContext, | ||
| .regMrSym = nccl_ofi_gin_gdaki_regMrSym, | ||
| .regMrSymDmaBuf = nccl_ofi_gin_gdaki_regMrSymDmaBuf, | ||
| .deregMrSym = nccl_ofi_gin_gdaki_deregMrSym, | ||
| .destroyContext = nccl_ofi_gin_gdaki_destroyContext, | ||
| .closeColl = nccl_ofi_gin_gdaki_closeColl, | ||
| .closeListen = nccl_ofi_gin_gdaki_closeListen, | ||
| .iput = nullptr, /* No CPU involvement in GDAKI mode */ | ||
| .iputSignal = nullptr, /* No CPU involvement in GDAKI mode */ | ||
| .test = nullptr, /* No CPU involvement in GDAKI mode */ | ||
| .ginProgress = nccl_ofi_gin_gdaki_ginProgress, | ||
| .queryLastError = nccl_ofi_gin_gdaki_queryLastError, | ||
| .finalize = nccl_ofi_gin_gdaki_finalize | ||
| }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.