Rayan Hatout

Results 52 comments of Rayan Hatout

Updated the map to a list comp and `.__class__ ==` to `.__class__ is` @roelofvandijk I'd rather not micro-optimize the existing assertions in the scope of this PR, we're already changing...

Not sure why it's skipping some tests

So the rationale for this change is that these two lines in `__init__`, as well as the apply method, completely dominate in the original Function class by trying to accommodate...

Reverted the split, managed to get some performance back thanks to @roelofvandijk's suggestion Before: ``` lazy.py: 0.9999 seconds tensor.py: 0.8685 seconds shapetracker.py: 0.4519 seconds ops.py: 0.3123 seconds symbolic.py: 0.1109 seconds...

Should probably add a pytest decorator to skip the float64 tests on Mac since it's not supported

Cooled down the copy paste, we lost a tiny bit of perf but the lazy ops are much more concise and readable now (apart from permute which has some optimizations...

Ok about to push the changes you requested above once I make mypy happy re: mypy, it's super upset because I tried to put actual types on the LazyOp object...

Yeah it would raise a `NotImplementedError` if called on a LazyOp (which shouldn't happen by construction but that can potentially double up as an extra measure to catch breaking changes?)...

Hmm yeah okay cool I'm happy with just stubbing

Actually this only solves half of the battle, the other half is attribute accesses. We can get around that by having `@property` stubs but then it gets a bit ridiculous...