Skip to content

Commit

Permalink
Try #597:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Feb 15, 2023
2 parents 1250cbe + 4e7da7d commit 2274a34
Show file tree
Hide file tree
Showing 41 changed files with 372 additions and 305 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ setup_arm64_machine: &setup_arm64_machine

docker_default: &docker_default
docker:
- image: pikaorg/pika-ci-base:14
- image: pikaorg/pika-ci-base:15

defaults: &defaults
<<: *working_dir_default
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build:
name: github/linux/coverage
runs-on: ubuntu-latest
container: pikaorg/pika-ci-base:14
container: pikaorg/pika-ci-base:15

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
build:
name: github/linux/debug/fast
runs-on: ubuntu-latest
container: pikaorg/pika-ci-base:14
container: pikaorg/pika-ci-base:15

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_hip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
build:
name: github/linux/hip/fast
runs-on: ubuntu-latest
container: pikaorg/pika-ci-hip:7
container: pikaorg/pika-ci-hip:8
steps:
- uses: actions/checkout@v3
- name: Update apt repositories for ccache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_release_fetchcontent.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
build:
name: github/linux/fetchcontent/fast
runs-on: ubuntu-latest
container: pikaorg/pika-ci-base:14
container: pikaorg/pika-ci-base:15

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_sanitizers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
build:
name: github/linux/sanitizers/fast
runs-on: ubuntu-latest
container: pikaorg/pika-ci-base:14
container: pikaorg/pika-ci-base:15

steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linux_tracy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
build:
name: github/linux/tracy/fast
runs-on: ubuntu-latest
container: pikaorg/pika-ci-base:14
container: pikaorg/pika-ci-base:15

steps:
- name: Check out Tracy
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/cscs-ault/env-hipcc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ hip_version="5.3.3"
hwloc_version="2.6.0"
spack_compiler="gcc@${gcc_version}"
spack_arch="linux-centos8-zen"
stdexec_version="c0fe16f451137b00ceb85d912ec3a288990ce766"
stdexec_version="6510f5bd69cc03b24668f26eda3dd3cca7e81bb2"

# The xnack- architectures are not supported by rocblas@5.3.3
spack_spec="pika@main+rocm+p2300 amdgpu_target='gfx906:xnack-' arch=${spack_arch} %${spack_compiler} malloc=system cxxstd=${cxx_std} ^boost@${boost_version} ^hwloc@${hwloc_version} ^hip@${hip_version} ^whip amdgpu_target='gfx906:xnack-' ^stdexec@${stdexec_version}"
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/cscs/env-clang-13.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ boost_version="1.79.0"
hwloc_version="2.6.0"
spack_compiler="clang@${clang_version}"
spack_arch="cray-cnl7-broadwell"
stdexec_version="c0fe16f451137b00ceb85d912ec3a288990ce766"
stdexec_version="6510f5bd69cc03b24668f26eda3dd3cca7e81bb2"

spack_spec="pika@main arch=${spack_arch} %${spack_compiler} cxxflags=-stdlib=libc++ malloc=system cxxstd=${cxx_std} +p2300 ^boost@${boost_version} ^hwloc@${hwloc_version} ^fmt cxxflags=-stdlib=libc++ ^stdexec@${stdexec_version}"

Expand Down
2 changes: 1 addition & 1 deletion .jenkins/cscs/env-clang-14-cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ hwloc_version="2.7.0"
cuda_version="11.5.0"
spack_compiler="clang@${clang_version}"
spack_arch="cray-cnl7-haswell"
stdexec_version="c0fe16f451137b00ceb85d912ec3a288990ce766"
stdexec_version="6510f5bd69cc03b24668f26eda3dd3cca7e81bb2"

spack_spec="pika@main arch=${spack_arch} %${spack_compiler} +cuda malloc=system cxxstd=${cxx_std} +p2300 ^boost@${boost_version} ^cuda@${cuda_version} +allow-unsupported-compilers ^hwloc@${hwloc_version} ^stdexec@${stdexec_version}"

Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ pika optionally requires:
* `Boost.Context, Thread, and Chrono <https://boost.org>`_ on macOS
* `stdexec <https://github.com/NVIDIA/stdexec>`_ when
``PIKA_WITH_P2300_REFERENCE_IMPLEMENTATION`` is enabled (currently tested with commit
`c0fe16f451137b00ceb85d912ec3a288990ce766
<https://github.com/NVIDIA/stdexec/commit/c0fe16f451137b00ceb85d912ec3a288990ce766>`).
`6510f5bd69cc03b24668f26eda3dd3cca7e81bb2
<https://github.com/NVIDIA/stdexec/commit/6510f5bd69cc03b24668f26eda3dd3cca7e81bb2>`).
The integration is experimental.


Expand Down
17 changes: 10 additions & 7 deletions libs/pika/async_cuda/include/pika/async_cuda/then_on_host.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ namespace pika::cuda::experimental {
struct then_on_host_receiver_impl<Receiver,
F>::then_on_host_receiver_type
{
using is_receiver = void;

PIKA_NO_UNIQUE_ADDRESS std::decay_t<Receiver> receiver;
PIKA_NO_UNIQUE_ADDRESS std::decay_t<F> f;
cuda_scheduler sched;
Expand Down Expand Up @@ -117,7 +119,7 @@ namespace pika::cuda::experimental {
});
}

friend constexpr pika::execution::experimental::detail::empty_env
friend constexpr pika::execution::experimental::empty_env
tag_invoke(pika::execution::experimental::get_env_t,
then_on_host_receiver_type const&) noexcept
{
Expand All @@ -138,6 +140,8 @@ namespace pika::cuda::experimental {
template <typename Sender, typename F>
struct then_on_host_sender_impl<Sender, F>::then_on_host_sender_type
{
using is_sender = void;

std::decay_t<Sender> sender;
std::decay_t<F> f;
cuda_scheduler sched;
Expand Down Expand Up @@ -169,7 +173,7 @@ namespace pika::cuda::experimental {

using completion_signatures =
pika::execution::experimental::make_completion_signatures<
Sender, pika::execution::experimental::detail::empty_env,
Sender, pika::execution::experimental::empty_env,
pika::execution::experimental::completion_signatures<
pika::execution::experimental::set_error_t(
std::exception_ptr)>,
Expand Down Expand Up @@ -226,12 +230,11 @@ namespace pika::cuda::experimental {
PIKA_FORWARD(Receiver, receiver), s.f, s.sched});
}

friend cuda_scheduler tag_invoke(
pika::execution::experimental::get_completion_scheduler_t<
pika::execution::experimental::set_value_t>,
then_on_host_sender_type const& s) noexcept
friend constexpr auto tag_invoke(
pika::execution::experimental::get_env_t,
then_on_host_sender_type const& s)
{
return s.sched;
return pika::execution::experimental::get_env(s.sender);
}
};
} // namespace then_on_host_detail
Expand Down
31 changes: 16 additions & 15 deletions libs/pika/async_cuda/include/pika/async_cuda/then_with_stream.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ namespace pika::cuda::experimental::then_with_stream_detail {
struct then_with_cuda_stream_sender_impl<Sender,
F>::then_with_cuda_stream_sender_type
{
using is_sender = void;

PIKA_NO_UNIQUE_ADDRESS std::decay_t<Sender> sender;
PIKA_NO_UNIQUE_ADDRESS std::decay_t<F> f;
cuda_scheduler sched;
Expand Down Expand Up @@ -185,8 +187,7 @@ namespace pika::cuda::experimental::then_with_stream_detail {

using completion_signatures =
pika::execution::experimental::make_completion_signatures<
std::decay_t<Sender>,
pika::execution::experimental::detail::empty_env,
std::decay_t<Sender>, pika::execution::experimental::empty_env,
pika::execution::experimental::completion_signatures<
pika::execution::experimental::set_error_t(
std::exception_ptr)>,
Expand Down Expand Up @@ -249,6 +250,7 @@ namespace pika::cuda::experimental::then_with_stream_detail {

struct then_with_cuda_stream_receiver
{
using is_receiver = void;
using then_with_cuda_stream_receiver_tag = void;

operation_state& op_state;
Expand Down Expand Up @@ -465,10 +467,9 @@ namespace pika::cuda::experimental::then_with_stream_detail {
});
}

friend constexpr pika::execution::experimental::detail::
empty_env
tag_invoke(pika::execution::experimental::get_env_t,
then_with_cuda_stream_receiver const&) noexcept
friend constexpr pika::execution::experimental::empty_env
tag_invoke(pika::execution::experimental::get_env_t,
then_with_cuda_stream_receiver const&) noexcept
{
return {};
}
Expand Down Expand Up @@ -502,8 +503,8 @@ namespace pika::cuda::experimental::then_with_stream_detail {
pika::util::detail::transform_t<
pika::execution::experimental::value_types_of_t<
std::decay_t<Sender>,
pika::execution::experimental::detail::empty_env,
std::tuple, pika::detail::variant>,
pika::execution::experimental::empty_env, std::tuple,
pika::detail::variant>,
value_types_helper>,
pika::detail::monostate>;
#else
Expand Down Expand Up @@ -551,7 +552,7 @@ namespace pika::cuda::experimental::then_with_stream_detail {
pika::util::detail::transform_t<
pika::execution::experimental::value_types_of_t<
then_with_cuda_stream_sender_type,
pika::execution::experimental::detail::empty_env,
pika::execution::experimental::empty_env,
pika::util::detail::pack, pika::util::detail::pack>,
result_types_helper>,
pika::detail::monostate>>>;
Expand Down Expand Up @@ -603,12 +604,11 @@ namespace pika::cuda::experimental::then_with_stream_detail {
PIKA_FORWARD(Receiver, receiver), s.f, s.sched, s.sender);
}

friend cuda_scheduler tag_invoke(
pika::execution::experimental::get_completion_scheduler_t<
pika::execution::experimental::set_value_t>,
then_with_cuda_stream_sender_type const& s) noexcept
friend constexpr auto tag_invoke(
pika::execution::experimental::get_env_t,
then_with_cuda_stream_sender_type const& s)
{
return s.sched;
return pika::execution::experimental::get_env(s.sender);
}
};

Expand All @@ -619,7 +619,8 @@ namespace pika::cuda::experimental::then_with_stream_detail {
{
auto completion_sched =
pika::execution::experimental::get_completion_scheduler<
pika::execution::experimental::set_value_t>(sender);
pika::execution::experimental::set_value_t>(
pika::execution::experimental::get_env(sender));
static_assert(std::is_same_v<std::decay_t<decltype(completion_sched)>,
cuda_scheduler>,
"then_with_cuda_stream can only be used with senders whose "
Expand Down
18 changes: 10 additions & 8 deletions libs/pika/async_mpi/include/pika/async_mpi/transform_mpi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ namespace pika::mpi::experimental {
template <typename Sender, typename F>
struct transform_mpi_sender_impl<Sender, F>::transform_mpi_sender_type
{
using is_sender = void;

std::decay_t<Sender> sender;
std::decay_t<F> f;
stream_type stream;
Expand All @@ -117,7 +119,7 @@ namespace pika::mpi::experimental {
using completion_signatures =
pika::execution::experimental::make_completion_signatures<
std::decay_t<Sender>,
pika::execution::experimental::detail::empty_env,
pika::execution::experimental::empty_env,
pika::execution::experimental::completion_signatures<
pika::execution::experimental::set_error_t(
std::exception_ptr)>,
Expand Down Expand Up @@ -164,6 +166,8 @@ namespace pika::mpi::experimental {

struct transform_mpi_receiver
{
using is_receiver = void;

operation_state& op_state;

template <typename Error>
Expand Down Expand Up @@ -264,10 +268,9 @@ namespace pika::mpi::experimental {
});
}

friend constexpr pika::execution::experimental::detail::
empty_env
tag_invoke(pika::execution::experimental::get_env_t,
transform_mpi_receiver const&) noexcept
friend constexpr pika::execution::experimental::empty_env
tag_invoke(pika::execution::experimental::get_env_t,
transform_mpi_receiver const&) noexcept
{
return {};
}
Expand All @@ -290,7 +293,7 @@ namespace pika::mpi::experimental {
pika::util::detail::transform_t<
pika::execution::experimental::value_types_of_t<
std::decay_t<Sender>,
pika::execution::experimental::detail::empty_env,
pika::execution::experimental::empty_env,
std::tuple, pika::detail::variant>,
value_types_helper>,
pika::detail::monostate>;
Expand Down Expand Up @@ -342,8 +345,7 @@ namespace pika::mpi::experimental {
pika::util::detail::transform_t<
pika::execution::experimental::value_types_of_t<
transform_mpi_sender_type,
pika::execution::experimental::detail::
empty_env,
pika::execution::experimental::empty_env,
pika::util::detail::pack,
pika::util::detail::pack>,
result_types_helper>,
Expand Down
19 changes: 5 additions & 14 deletions libs/pika/execution/include/pika/execution/algorithms/bulk.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,10 @@ namespace pika::bulk_detail {

static constexpr bool sends_done = false;

template <typename CPO,
// clang-format off
PIKA_CONCEPT_REQUIRES_(
pika::execution::experimental::detail::is_receiver_cpo_v<CPO> &&
pika::execution::experimental::detail::has_completion_scheduler_v<
CPO, std::decay_t<Sender>>)
// clang-format on
>
friend constexpr auto tag_invoke(
pika::execution::experimental::get_completion_scheduler_t<CPO>,
bulk_sender_type const& sender)
friend constexpr decltype(auto) tag_invoke(
pika::execution::experimental::get_env_t, bulk_sender_type const& s)
{
return pika::execution::experimental::get_completion_scheduler<CPO>(
sender.sender);
return pika::execution::experimental::get_env(s.sender);
}

template <typename Receiver>
Expand Down Expand Up @@ -183,7 +173,8 @@ namespace pika::execution::experimental {
{
auto scheduler =
pika::execution::experimental::get_completion_scheduler<
pika::execution::experimental::set_value_t>(sender);
pika::execution::experimental::set_value_t>(
tag_invoke(pika::execution::experimental::get_env, sender));
return pika::functional::tag_invoke(bulk_t{}, PIKA_MOVE(scheduler),
PIKA_FORWARD(Sender, sender), shape, PIKA_FORWARD(F, f));
}
Expand Down
Loading

0 comments on commit 2274a34

Please sign in to comment.