jafioti / luminal

Deep learning at the speed of light.

Home Page:https://luminalai.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Removing Primops

jafioti opened this issue · 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

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.