mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Min / max reductions (#2041)
This commit is contained in:
committed by
GitHub
parent
9ecefd56db
commit
515f104926
@@ -15,6 +15,14 @@ void all_sum(Group group, const array& input, array& output, Stream stream) {
|
||||
group.raw_group()->all_sum(input, output, stream);
|
||||
}
|
||||
|
||||
void all_max(Group group, const array& input, array& output, Stream stream) {
|
||||
group.raw_group()->all_max(input, output, stream);
|
||||
}
|
||||
|
||||
void all_min(Group group, const array& input, array& output, Stream stream) {
|
||||
group.raw_group()->all_min(input, output, stream);
|
||||
}
|
||||
|
||||
void all_gather(Group group, const array& input, array& output, Stream stream) {
|
||||
group.raw_group()->all_gather(input, output, stream);
|
||||
}
|
||||
@@ -57,6 +65,16 @@ class EmptyGroup : public GroupImpl {
|
||||
throw std::runtime_error(
|
||||
"Communication not implemented in an empty distributed group.");
|
||||
}
|
||||
|
||||
void all_max(const array&, array&, Stream) override {
|
||||
throw std::runtime_error(
|
||||
"Communication not implemented in an empty distributed group.");
|
||||
}
|
||||
|
||||
void all_min(const array&, array&, Stream) override {
|
||||
throw std::runtime_error(
|
||||
"Communication not implemented in an empty distributed group.");
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
Reference in New Issue
Block a user