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

Adding Read Put Packet operation at Executor #441

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

caiomcbr
Copy link
Contributor

@caiomcbr caiomcbr commented Jan 6, 2025

No description provided.

@caiomcbr caiomcbr requested a review from yzygitzh January 6, 2025 04:07
@caiomcbr caiomcbr changed the title Implementing Read Put Packet operation at Executor Adding Read Put Packet operation at Executor Jan 6, 2025
@yzygitzh
Copy link
Member

yzygitzh commented Jan 7, 2025

This looks good to me, but I remember @Binyang2014 suggested a more general solution instead of hacking the code path.

@caiomcbr caiomcbr requested a review from Binyang2014 February 11, 2025 03:31
Comment on lines +361 to +366
// Ensuring Data Is Ready
size_t nPackets = size * 2 / sizeof(PacketType);
for (size_t pkt_idx = threadIdx.x; pkt_idx < nPackets; pkt_idx += blockDim.x) {
PacketType* pkts = (PacketType*)((char*)scratch + scratchBaseOffset + srcOffsets[ch_idx] * 2);
PacketPayload<PacketType> data = pkts[pkt_idx].read(flag);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you give an example for this case? It's for sending packet via intra node channel then trans via inter node channel? If so, we may need more threads for this, not just #tid < nDstChannels

size_t nPackets = size * 2 / sizeof(PacketType);
for (size_t pkt_idx = threadIdx.x; pkt_idx < nPackets; pkt_idx += blockDim.x) {
PacketType* pkts = (PacketType*)((char*)scratch + scratchBaseOffset + srcOffsets[ch_idx] * 2);
PacketPayload<PacketType> data = pkts[pkt_idx].read(flag);
Copy link
Contributor

Choose a reason for hiding this comment

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

We may need to set data to back to the scratch buffer, not sure if compiler will optimize the instruction if we only read the data

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