Skip to content

Commit 736e914

Browse files
committed
feat(//py): register trtorch with torch op library to support
deserializing modules in python Signed-off-by: Naren Dasan <[email protected]> Signed-off-by: Naren Dasan <[email protected]>
1 parent eb636ec commit 736e914

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: py/trtorch/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@
1111
from trtorch._compiler import *
1212
from trtorch._types import *
1313
from trtorch import logging
14+
15+
def _register_with_torch():
16+
trtorch_dir = os.path.dirname(__file__)
17+
torch.ops.load_library(trtorch_dir + '/lib/trtorch.so')

0 commit comments

Comments
 (0)