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
@@ -46,8 +46,14 @@ void AllReduce::eval_cpu(
|
||||
case Sum:
|
||||
distributed::detail::all_sum(group(), in, outputs[0], stream());
|
||||
break;
|
||||
case Max:
|
||||
distributed::detail::all_max(group(), in, outputs[0], stream());
|
||||
break;
|
||||
case Min:
|
||||
distributed::detail::all_min(group(), in, outputs[0], stream());
|
||||
break;
|
||||
default:
|
||||
throw std::runtime_error("Only all reduce sum is supported for now");
|
||||
throw std::runtime_error("Only all reduce sum, min and max are supported for now");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user