Implement P2300 bulk adapter for HPX executors#7240
Implement P2300 bulk adapter for HPX executors#7240shivansh023023 wants to merge 1 commit intoTheHPXProject:masterfrom
Conversation
|
Can one of the admins verify this patch? |
Up to standards ✅🟢 Issues
|
- Integrated hpx::execution::experimental::bulk with internal bulk_sync_execute - Implemented robust tag_invoke(connect_t) with full const-correctness - Fixed receiver reference collapsing using std::decay_t - Added executor_algorithm_bulk unit tests for parallel and sequenced execution
5cdcfbd to
7b3fc5f
Compare
|
@shivansh023023 Just FYI, before you invest more time into our old sender/receiver implementation: #7123 will soon remove almost all of our code related to this. Please focus your efforts on whatever stays after this has been merged. |
|
Thank you for the heads-up regarding #7123. I appreciate the guidance to avoid spending effort on code that will soon be deprecated. I will pause my work on the current P2300 bulk adapter and follow the progress of #7123 closely. Once that is merged, I’ll re-evaluate how to implement the bulk functionality within the new framework. In the meantime, I’ll focus on finishing the review items for PR #7070 (local convenience header) and cleaning up any remaining issues on my other active PRs that are unaffected by the sender/receiver removal. |
| HPX_NO_UNIQUE_ADDRESS std::decay_t<Shape> shape_; | ||
| HPX_NO_UNIQUE_ADDRESS std::decay_t<F> f_; | ||
|
|
||
| #if defined(HPX_HAVE_STDEXEC) |
There was a problem hiding this comment.
Please remove the case !defined(HPX_HAVE_STDEXEC) as we have dropped our own implementation of senders&receivers.
|
|
||
| #include <hpx/config.hpp> | ||
| #include <hpx/assert.hpp> | ||
| #include <hpx/execution/queries/get_scheduler.hpp> |
There was a problem hiding this comment.
This file does not exist anymore. Please adapt.
| #include <hpx/executors/detail/index_queue_spawning.hpp> | ||
| #include <hpx/executors/execution_policy_mappings.hpp> | ||
| #include <hpx/executors/executor_scheduler.hpp> | ||
| #include <hpx/executors/executor_scheduler_bulk.hpp> |
There was a problem hiding this comment.
Can we get away without pulling this into the executor file? Would forward declaring some of the stdexec types be sufficient?
| #include <hpx/config.hpp> | ||
| #include <hpx/executors/execution_policy_mappings.hpp> | ||
| #include <hpx/executors/executor_scheduler.hpp> | ||
| #include <hpx/executors/executor_scheduler_bulk.hpp> |
There was a problem hiding this comment.
Same here: can avoid pulling in the stdexec types here?
P2300
bulkIntegration for HPX ExecutorsDescription
This PR implements the P2300
bulksender adapter specifically for HPX's legacy executors, including theparallel_executorandsequenced_executor. By bridging thehpx::execution::experimental::bulkalgorithm with HPX's internalbulk_sync_executemechanism, this change ensures that data-parallel workloads are properly load-balanced and optimized using HPX's high-performance partitioners.Key Technical Improvements:
bulksender to the underlying HPX execution engine for native parallel performance.tag_invokeOverloads: Implemented a full suite ofconnect_toverloads (supporting&&,&, andconst&) to ensure compatibility with consumer algorithms likesync_wait.std::decay_twithin thebulk_receiverto prevent reference collapsing and ensure the safety of deferred functional object execution.executorsmodule rather than the coreexecutionmodule.Proposed Changes
libs/core/executors/include/hpx/executors/executor_scheduler_bulk.hpp: Implementsexecutor_bulk_senderandexecutor_bulk_receiver.libs/core/executors/include/hpx/executors/executor_scheduler.hpp: Exposesget_completion_scheduler_tfor ADL discovery.libs/core/executors/include/hpx/executors/parallel_executor.hpp&sequenced_executor.hpp: Integrated the new bulk headers.libs/core/executors/tests/unit/executor_algorithm_bulk.cpp: Comprehensive validation for sequential and parallel policies.Background context
This work is part of the ongoing effort to modernize HPX's execution model to align with the C++23 Sender/Receiver (P2300) standard. Implementing
bulkis a "Big Impact" milestone because it allows modern asynchronous pipelines to tap into the mature, multi-threaded performance of the HPX runtime.Checklist
executor_algorithm_bulk_testtarget.inspecttool.