Skip to content

Conversation

@nirandaperera
Copy link
Contributor

Closes #675

Signed-off-by: niranda perera <niranda.perera@gmail.com>
@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 4, 2025

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@nirandaperera nirandaperera added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Dec 4, 2025
rapids-bot bot pushed a commit that referenced this pull request Dec 5, 2025
```c++
    /**
     * @brief Create a deep copy of a message without removing it.
     *
     * This method duplicates the message identified by `mid` while leaving the
     * original message intact inside the container. The returned message is a
     * full deep copy of the payload. If the message is currently being spilled
     * by another thread, this call waits until spilling completes.
     *
     * @param mid Message identifier.
     * @param reservation Memory reservation used for allocating buffers during
     * the deep copy. The reservation also determines the memory type of the
     * returned message.
     *
     * @return A deep copy of the referenced `Message`.
     *
     * @throws std::out_of_range If the message has already been extracted.
     * @throws std::runtime_error If required memory cannot be allocated using
     * the provided reservation.
     */
    [[nodiscard]] Message copy(MessageId mid, MemoryReservation& reservation);
```

Based on #711

Authors:
  - Mads R. B. Kristensen (https://github.com/madsbk)

Approvers:
  - Peter Andreas Entschev (https://github.com/pentschev)

URL: #713
…ded-fanout-state-spillable

Signed-off-by: niranda perera <niranda.perera@gmail.com>
Signed-off-by: niranda perera <niranda.perera@gmail.com>
@nirandaperera nirandaperera marked this pull request as ready for review December 8, 2025 16:11
@nirandaperera nirandaperera requested a review from a team as a code owner December 8, 2025 16:11
@nirandaperera nirandaperera requested a review from madsbk December 8, 2025 18:40
…ded-fanout-state-spillable

Signed-off-by: niranda perera <niranda.perera@gmail.com>
Signed-off-by: niranda perera <niranda.perera@gmail.com>
…ded-fanout-state-spillable

Signed-off-by: niranda perera <niranda.perera@gmail.com>
@nirandaperera nirandaperera force-pushed the Make-unbounded-fanout-state-spillable branch from ab0a1e5 to feb04a8 Compare December 8, 2025 23:20
Signed-off-by: niranda perera <niranda.perera@gmail.com>
Signed-off-by: niranda perera <niranda.perera@gmail.com>
@nirandaperera nirandaperera requested a review from a team as a code owner December 9, 2025 00:17
Signed-off-by: niranda perera <niranda.perera@gmail.com>
nirandaperera and others added 3 commits December 9, 2025 11:02
Co-authored-by: Mads R. B. Kristensen <madsbk@gmail.com>
Signed-off-by: niranda perera <niranda.perera@gmail.com>
@nirandaperera nirandaperera requested a review from madsbk December 9, 2025 19:20
This reverts commit 5606f6a.

Signed-off-by: niranda perera <niranda.perera@gmail.com>
…randaperera/rapidsmpf into Make-unbounded-fanout-state-spillable
Signed-off-by: niranda perera <niranda.perera@gmail.com>
Comment on lines +48 to +61
constexpr std::span<MemoryType const> leq_memory_types(MemoryType mem_type) noexcept {
return std::views::drop_while(MEMORY_TYPES, [&](MemoryType const& mt) {
return mt != mem_type;
});
}

static_assert(std::ranges::equal(leq_memory_types(MemoryType::DEVICE), MEMORY_TYPES));
static_assert(std::ranges::equal(
leq_memory_types(MemoryType::HOST), std::ranges::single_view{MemoryType::HOST}
));
// unknown memory type should return an empty view
static_assert(std::ranges::equal(
leq_memory_types(static_cast<MemoryType>(-1)), std::ranges::empty_view<MemoryType>{}
));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not immediately just have:

template<typename Pred>
constexpr std::span<MemoryType const> filter_types(MemoryType mem_type, Pred pred) noexcept {
    return std::views::filter(MEMORY_TYPES, pred);
}

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would return a Range isnt it? But yes, sure.

nirandaperera and others added 3 commits December 11, 2025 09:33
Co-authored-by: Mads R. B. Kristensen <madsbk@gmail.com>
Signed-off-by: niranda perera <niranda.perera@gmail.com>
Copy link
Member

@madsbk madsbk left a comment

Choose a reason for hiding this comment

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

Looks good

}

nodes.push_back(node::fanout(ctx, in, out_chs, policy));

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

nodes.push_back(
many_input_sink(ctx, out_chs, ConsumePolicy::CHANNEL_ORDER, outs)
);

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

Signed-off-by: niranda perera <niranda.perera@gmail.com>
Signed-off-by: niranda perera <niranda.perera@gmail.com>
Signed-off-by: niranda perera <niranda.perera@gmail.com>
Signed-off-by: niranda perera <niranda.perera@gmail.com>
@nirandaperera
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 189a6db into rapidsai:main Dec 15, 2025
89 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make unbounded fanout state spillable

3 participants