parameters: (serialized_engine: bytes, device=Device._current_device())
return_statement: return torch.jit._recursive.wrap_cpp_module(cpp_mod)
docstring: Takes a pre-built serialized TensorRT engine and embeds it within a TorchScript module
  
      Takes a pre-built serialied TensorRT engine (as bytes) and embeds it within a TorchScript module.
      Registers the forward method to execute the TensorRT engine with the function signature:
  
          forward(Tensor[]) -> Tensor[]
  
      Module can be save with engine embedded with torch.jit.save and moved / loaded according to torch_tensorrt portability rules
  
      Arguments:
          serialized_engine (bytes): Serialized TensorRT engine from either torch_tensorrt or TensorRT APIs
  
      Keyword Arguments:
          device (Union(torch_tensorrt.Device, torch.device, dict)): Target device to run engine on. Must be compatible with engine provided. Default: Current active device
  
      Returns:
          torch.jit.ScriptModule: New TorchScript module with engine embedded
docstring_summary: Takes a pre-built serialized TensorRT engine and embeds it within a TorchScript module
docstring_tokens: Takes a pre - built serialized TensorRT engine and embeds it within a TorchScript module
function: def embed_engine_in_new_module(serialized_engine: bytes, device=Device._current_device()) -> torch.jit.ScriptModule:
      """Takes a pre-built serialized TensorRT engine and embeds it within a TorchScript module
  
      Takes a pre-built serialied TensorRT engine (as bytes) and embeds it within a TorchScript module.
      Registers the forward method to execute the TensorRT engine with the function signature:
  
          forward(Tensor[]) -> Tensor[]
  
      Module can be save with engine embedded with torch.jit.save and moved / loaded according to torch_tensorrt portability rules
  
      Arguments:
          serialized_engine (bytes): Serialized TensorRT engine from either torch_tensorrt or TensorRT APIs
  
      Keyword Arguments:
          device (Union(torch_tensorrt.Device, torch.device, dict)): Target device to run engine on. Must be compatible with engine provided. Default: Current active device
  
      Returns:
          torch.jit.ScriptModule: New TorchScript module with engine embedded
      """
      cpp_mod = _C.embed_engine_in_new_module(serialized_engine, _parse_device(device))
      return torch.jit._recursive.wrap_cpp_module(cpp_mod)
function_tokens: def embed_engine_in_new_module ( serialized_engine : bytes , device = Device . _current_device ( ) ) -> torch . jit . ScriptModule : cpp_mod = _C . embed_engine_in_new_module ( serialized_engine , _parse_device ( device ) ) return torch . jit . _recursive . wrap_cpp_module ( cpp_mod )