tinygrad icon indicating copy to clipboard operation
tinygrad copied to clipboard

Neg operator

Open calledit opened this issue 2 years ago • 1 comments

The neg operator is converted to a sub at tinygrad/tensor.py:263 Now, that neg is a hardware supported llop. It seams strange to convert every use of neg to sub on the higher abstraction layer.

What is the intent?

calledit avatar Nov 15 '22 09:11 calledit

The constant folder should deal with this, then it's one less op. But I'm fine with adding it, it might make optimization easier, will merge PR.

geohot avatar Nov 15 '22 22:11 geohot

Constant folder is fine

geohot avatar Jan 28 '23 07:01 geohot