prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Create some sort of serialization / deserialization functionality
  With INT8 about to land, would be a pain to have to calibrate from scratch every time. There should be some mechanism to save and load modules with the TRT engine included. 
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `py/trtorch/__init__.py`
  Content:
  ```
  1 import os
  2 import sys
  3 
  4 if sys.version_info < (3,):
  5     raise Exception("Python 2 has reached end-of-life and is not supported by TRTorch")
  6 
  7 import ctypes
  8 import torch
  9 
  10 from trtorch._version import __version__
  11 from trtorch._compiler import *
  12 from trtorch._types import *
  13 from trtorch import logging
  14
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/py/trtorch/__init__.py b/py/trtorch/__init__.py
  --- a/py/trtorch/__init__.py
  +++ b/py/trtorch/__init__.py
  @@ -11,3 +11,7 @@
   from trtorch._compiler import *
   from trtorch._types import *
   from trtorch import logging
  +
  +def _register_with_torch():
  +    trtorch_dir = os.path.dirname(__file__)
  +    torch.ops.load_library(trtorch_dir + '/lib/trtorch.so')
  \ No newline at end of file
  
verification_info: {"golden_diff": "diff --git a/py/trtorch/__init__.py b/py/trtorch/__init__.py\n--- a/py/trtorch/__init__.py\n+++ b/py/trtorch/__init__.py\n@@ -11,3 +11,7 @@\n from trtorch._compiler import *\n from trtorch._types import *\n from trtorch import logging\n+\n+def _register_with_torch():\n+    trtorch_dir = os.path.dirname(__file__)\n+    torch.ops.load_library(trtorch_dir + '/lib/trtorch.so')\n\\ No newline at end of file\n", "issue": "Create some sort of serialization / deserialization functionality\nWith INT8 about to land, would be a pain to have to calibrate from scratch every time. There should be some mechanism to save and load modules with the TRT engine included. \n", "before_files": [{"content": "import os\nimport sys\n\nif sys.version_info < (3,):\n    raise Exception(\"Python 2 has reached end-of-life and is not supported by TRTorch\")\n\nimport ctypes\nimport torch\n\nfrom trtorch._version import __version__\nfrom trtorch._compiler import *\nfrom trtorch._types import *\nfrom trtorch import logging\n", "path": "py/trtorch/__init__.py"}], "after_files": [{"content": "import os\nimport sys\n\nif sys.version_info < (3,):\n    raise Exception(\"Python 2 has reached end-of-life and is not supported by TRTorch\")\n\nimport ctypes\nimport torch\n\nfrom trtorch._version import __version__\nfrom trtorch._compiler import *\nfrom trtorch._types import *\nfrom trtorch import logging\n\ndef _register_with_torch():\n    trtorch_dir = os.path.dirname(__file__)\n    torch.ops.load_library(trtorch_dir + '/lib/trtorch.so')", "path": "py/trtorch/__init__.py"}]}