ofi: Add TX endpoint multiplexing (TxMuxing) to improve transmit throughput#1
Draft
ofi: Add TX endpoint multiplexing (TxMuxing) to improve transmit throughput#1
Conversation
Co-authored-by: bcmIntc <108841484+bcmIntc@users.noreply.github.com>
…ages Co-authored-by: bcmIntc <108841484+bcmIntc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review code for TxMuxing feature
ofi: Add TX endpoint multiplexing (TxMuxing) to improve transmit throughput
Mar 9, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds transmit multiplexing support to the OFI transport, allowing a single SHMEM context to distribute TX operations across multiple OFI endpoints in round-robin order. Each additional endpoint draws from the shared STX pool for hardware-level parallelism while sharing the primary endpoint's counters and CQ — keeping
put_quiet/get_wait/fencesemantics unchanged.New environment variable
SHMEM_OFI_TX_MUX_ENDPOINTS(default:1= disabled) — number of TX endpoints per contextshmem_transport_ctx_t(transport_ofi.h)num_tx_eps,tx_ep_idx,tx_ep_arr[],tx_stx_idxs[]shmem_transport_ofi_get_tx_ep(ctx): round-robin selector; returnsctx->epwhen muxing is off (zero overhead on hot path)fi_write,fi_read,fi_inject_atomic,fi_fetch_atomicmsg, etc.) updated to use the selected endpoint;fi_atomicvalidcapability queries retainctx->epshmem_transport_ofi_ctx_init/shmem_transport_ctx_destroy(transport_ofi.c)OFI_TX_MUX_ENDPOINTS - 1additional endpoints; each bound to a shared STX from the pool, and to the sharedput_cntr,get_cntr, and CQtx_stx_idxsinitialized to-1sentinel viamemset; additional STX references released on destroy independently ofctx->stx_idxctx->eptotarget_ep)Example usage
# Use 4 TX endpoints per context (e.g. with OFI_STX_MAX=4) SHMEM_OFI_TX_MUX_ENDPOINTS=4 SHMEM_OFI_STX_MAX=4 oshrun -n 16 ./app💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.