luminal
luminal copied to clipboard
Removing Primops
- Remove sqrt by doing x.pow(0.5) This requires selectors to reference the same node multiple times.
- Also remove mul, mul is just a.log2().add(b.log2()).exp2(), and div is just a.log2().sub(b.log2()).exp2()
- Remove recip, because recip is just 1 / x
Is it possible to define mod in terms of other primops? I believe not. Also what about LessThan? Perhaps through some crazy concat -> maxreduce -> equals or something, but might not be worth the complexity.