mlx icon indicating copy to clipboard operation
mlx copied to clipboard

Change the variance computation

Open angeloskath opened this issue 2 years ago • 2 comments

Changes the computation of variance to a faster one (but slightly less numerically stable). Not sure if we want to merge this but the performance benefit for large reductions is quite big.

angeloskath avatar Dec 30 '23 08:12 angeloskath

What do you think about waiting for multi-output primitives and doing a primitive for this instead?

awni avatar Dec 30 '23 20:12 awni

I think it may be worth doing a primitive but no reason for a multi output one imho.

Computing the mean and passing it as an argument to the variance primitive makes a lot of sense I think.

angeloskath avatar Dec 30 '23 21:12 angeloskath

Should we close this PR? I don't think we intend to merge it right?

awni avatar Jan 25 '24 04:01 awni

We can close it but what do we intend to do? Shall we do a primitive? And if yes why? Are we thinking of not merging due to possible numerical instability?

angeloskath avatar Jan 27 '24 11:01 angeloskath