-
Notifications
You must be signed in to change notification settings - Fork 9
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
#2240: Add Rabenseifner
and Recursive doubling
allreduce algorithms for ObjGroup
#2272
#2240: Add Rabenseifner
and Recursive doubling
allreduce algorithms for ObjGroup
#2272
Conversation
Pipelines resultsPR tests (gcc-12, ubuntu, mpich) Build for 16da9e7 (2024-04-16 12:06:29 UTC)
PR tests (gcc-12, ubuntu, mpich, verbose) Build for 5ce7cd9 (2024-06-18 16:35:02 UTC)
PR tests (gcc-12, ubuntu, mpich, verbose, kokkos) Build for 57b8cab (2024-07-18 15:27:27 UTC)
|
17cfcbd
to
16da9e7
Compare
Results of running allreduce on std::vector<int32_t> with 65536 elements
|
Results of running allreduce on std::vector<int32_t> with 2 elems
|
53da893
to
e3fa49b
Compare
Still missing:
|
Rabenseifner
and Recursive doubling
allreduce algorithms for ObjGroup
Rabenseifner
and Recursive doubling
allreduce algorithms for ObjGroup
80d6712
to
f01bad5
Compare
Regarding the issue with the If users want to use their custom wrapper, then they should provide #include <vector>
#ifdef VT_KOKKOS_ENABLED
#include <Kokkos_Core.hpp>
#endif
template <typename Container>
class DataHandler {
public:
using Scalar = float;
static size_t size(const Container& data);
static Scalar& at(Container& data, size_t idx);
static void set(Container& data, size_t idx, const Scalar& value);
static Container split(Container& data, size_t start, size_t end);
};
template <typename T>
class DataHandler<std::vector<T>> {
public:
using Scalar = T;
static size_t size(const std::vector<T>& data) { return data.size(); }
static T at(const std::vector<T>& data, size_t idx) { return data[idx]; }
static T& at(std::vector<T>& data, size_t idx) { return data[idx]; }
static void set(std::vector<T>& data, size_t idx, const T& value) {
data[idx] = value;
}
static std::vector<T> split(std::vector<T>& data, size_t start, size_t end) {
return std::vector<T>{data.begin() + start, data.begin() + end};
}
};
#ifdef VT_KOKKOS_ENABLED
template <typename T, typename... Props>
class DataHandler<Kokkos::View<T*, Props...>> {
public:
static size_t size(const Kokkos::View<T*, Props...>& data) {
return data.extent(0);
}
static T at(const Kokkos::View<T*, Props...>& data, size_t idx) {
return data(idx);
}
static T& at(Kokkos::View<T*, Props...>& data, size_t idx) {
return data(idx);
}
static void
set(Kokkos::View<T*, Props...>& data, size_t idx, const T& value) {
data(idx) = value;
}
};
#endif // VT_KOKKOS_ENABLED |
Let's go with the |
081570b
to
84e8f72
Compare
84e8f72
to
34615ad
Compare
5ce7cd9
to
168f39a
Compare
b354603
to
5441ffc
Compare
5c4fed6
to
eafa364
Compare
…I for various data types
…nd fix compile issues realted to using Kokkos::View for allreduce
…ssing proxy by reference
… when user's payload is View
eafa364
to
f5e685b
Compare
f5e685b
to
57b8cab
Compare
Closing this PR as #2337 contains updated code. |
Fixes #2240