зеркало из https://github.com/microsoft/torchy.git
304b2470d2 | ||
---|---|---|
autogen | ||
backends | ||
benchmarks/torchvision | ||
scripts | ||
tests | ||
torchy | ||
.gitattributes | ||
.gitignore | ||
LICENSE | ||
README.md | ||
config.h | ||
dispatch.h | ||
gen.py | ||
init.cpp | ||
ops.cpp | ||
ops.h | ||
pytorch.patch | ||
run-tests.sh | ||
setup.py | ||
special_fns.py | ||
stats.cpp | ||
stats.h | ||
tensor.cpp | ||
tensor.h | ||
trace.cpp | ||
trace.h | ||
utils.h |
README.md
Torchy
A tracing JIT for PyTorch. WIP; don't use.
Install
$ python setup.py install
Run
Torchy shouldn't require any change beyond adding a call to torchy.enable()
.
Example:
import torch
import torchy
torchy.enable()
x = torch.tensor(((3.,2.), (4.,5.)))
y = torch.tensor(((5.,6.), (7.,1.)))
w = x.add(x)
z = x.add(y)
w = None # w not computed
print(z)