luminal icon indicating copy to clipboard operation
luminal copied to clipboard

Removing Primops

Open jafioti opened this issue 1 year ago • 1 comments

  • 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

jafioti avatar Feb 27 '24 05:02 jafioti

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.

jafioti avatar Mar 01 '24 20:03 jafioti