Feature/task bench support#6876
Conversation
|
Can one of the admins verify this patch? |
8b98668 to
76253cb
Compare
hkaiser
left a comment
There was a problem hiding this comment.
@guptapratykshh Did you implement the HPX version of task_bench?
|
Yes, i am working on HPX implementation, utilizing hpx::execution::experimental::fork_join_executor to efficiently handle intra node parallelism for task graph |
Thanks! The only thing I'm unsure of is whether we really should add the whole task_bench code base to our repository. Wouldn't it be better to upstream your changes to them? |
|
@hkaiser, you are right, i have upstreamed the implementation to task bench - StanfordLegion/task-bench#101 |
|
@guptapratykshh I'm going to close this without merging. Please re-open if you feel that we will pursue this PR any further. |
|
@hkaiser now we should re-open this PR as this StanfordLegion/task-bench#101 is merged as well as the race condition(StanfordLegion/task-bench#94 (comment)) has also been fixed in that PR |
|
@guptapratykshh when pushing to this PR, please remove the task-bench code by force-pushing to remove it completely from the git history. |
Up to standards ✅🟢 Issues
|
e014ade to
464f5de
Compare
There was a problem hiding this comment.
Pull request overview
Adds TaskBench benchmark support to the HPX examples by integrating an external TaskBench checkout and building HPX TaskBench driver executables as part of the examples build.
Changes:
- Introduces
examples/task_benchCMake logic that fetches TaskBench and builds the core library + HPX driver executables. - Adds
task_benchto the top-level examples subdirectory list so it is built when examples are enabled.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| examples/task_bench/CMakeLists.txt | Fetches upstream TaskBench and defines build targets for TaskBench core + HPX drivers. |
| examples/CMakeLists.txt | Registers task_bench as an examples subdirectory. |
20c5f35 to
302334a
Compare
211e50d to
f4b86a5
Compare
aed6eb3 to
4b57333
Compare
|
While this looks good in principle, I'd like to avoid pulling in the new example unconditionally. Could you please add an explicit option |
| # (https://github.com/StanfordLegion/task-bench) as an external dependency. No | ||
| # task-bench source files are vendored here. | ||
|
|
||
| cmake_minimum_required(VERSION 3.17) |
| # core_random.c and siphash.c are C files; enable C so cmake can compile them. | ||
| enable_language(C) | ||
|
|
| find_package(MPI) | ||
| if(MPI_FOUND) | ||
| if(COMMAND add_hpx_executable) |
| hpx_option( | ||
| HPX_WITH_EXAMPLES_TASKBENCH | ||
| BOOL | ||
| "Enable the task-bench example (fetched from upstream StanfordLegion/task-bench, default: OFF)." | ||
| OFF | ||
| CATEGORY "Build Targets" | ||
| ADVANCED |
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
9efda81 to
ea25a41
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
examples/task_bench/CMakeLists.txt:94
- Same issue as above:
target_link_libraries(hpx_distributed PRIVATE hpx_include)refers to a non-existent target and will break the build. Rely onadd_hpx_executable’s default HPX linkage or link against an actual exported HPX target (e.g.HPX::hpx).
add_hpx_executable(
hpx_distributed
SOURCES "${task_bench_SOURCE_DIR}/hpx/hpx_distributed.cc"
FOLDER "Examples/TaskBench"
)
target_link_libraries(hpx_distributed PRIVATE hpx_include)
else()
| # hpx_include carries the libs/full/include/include path (and all its | ||
| # transitive module deps such as hpx_segmented_algorithms) that hpx/hpx.hpp | ||
| # requires. It is only defined when HPX_WITH_DISTRIBUTED_RUNTIME=ON, which is | ||
| # already guaranteed by the guard above. | ||
| target_link_libraries(hpx_fork_join PRIVATE hpx_include) | ||
| else() |
| # on Windows. Skip the entire example on MSVC builds. | ||
| if(MSVC) |
| if(HPX_WITH_EXAMPLES_TASKBENCH) | ||
| set(subdirs ${subdirs} task_bench) | ||
| endif() |
Signed-off-by: guptapratykshh <pratykshgupta9999@gmail.com>
Fixes #4274
Proposed Changes
examples/task_bench/that builds the HPX task-bench drivers from the upstream task-bench repository (StanfordLegion/task-bench) via CMakeFetchContent. No task-bench source files are vendored in this PR — everything is fetched from upstream.hpx_fork_join— fork-join executor for intra-node parallelism (no MPI required)hpx_distributed— default parallel executor + MPI for inter-node parallelism (built only when MPI is found)HPX_WITH_EXAMPLES_TASKBENCH(default OFF) that gates the example. Users must explicitly enable it (-DHPX_WITH_EXAMPLES_TASKBENCH=ON) to build task-bench alongside HPX.core/library) and whenHPX_WITH_DISTRIBUTED_RUNTIME=OFF.Any background context you want to provide?
Checklist
Not all points below apply to all pull requests.