mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Reduce a little overhead (#871)
* some small overhead improvements * use result_type in rms_norm * remove release force * fix + use non-vector version * revert compile change * fix ops * a little more overhead * a little more cleanup and overhead
This commit is contained in:
@@ -54,6 +54,12 @@ struct PrintFormatter {
|
||||
extern PrintFormatter global_formatter;
|
||||
|
||||
/** The type from promoting the arrays' types with one another. */
|
||||
inline Dtype result_type(const array& a, const array& b) {
|
||||
return promote_types(a.dtype(), b.dtype());
|
||||
}
|
||||
inline Dtype result_type(const array& a, const array& b, const array& c) {
|
||||
return promote_types(result_type(a, b), c.dtype());
|
||||
}
|
||||
Dtype result_type(const std::vector<array>& arrays);
|
||||
|
||||
std::vector<int> broadcast_shapes(
|
||||
|
||||
Reference in New Issue
Block a user