rentruewang / koila

Prevent PyTorch's `CUDA error: out of memory` in just 1 line of code.
https://rentruewang.com/koila/
Apache License 2.0
1.82k stars 62 forks source link

Modify getting-started.py to actually use the lazy tensor. #1

Closed ousou closed 2 years ago

ousou commented 2 years ago

Also assert that the outputs are the same when using the normal tensor and the lazy tensor.

Previously the lazy tensor wasn't used at all, so the script didn't really verify that the lazy tensor does the same thing as the normal tensor.

rentruewang commented 2 years ago

Thanks so much for the input! I must have been really tired when putting together this example. I'll modify the example and make the example more clear.