code: def inner(
      x1: torch.Tensor,
      x2: torch.Tensor,
      /,
      *,
      out: Optional[torch.Tensor] = None,
  ) -> torch.Tensor:
      x1, x2 = ivy.promote_types_of_inputs(x1, x2)
      ret_dtype = x1.dtype
      if ivy.is_int_dtype(x1):
          # https://github.com/pytorch/pytorch/issues/103366
          x1 = x1.long()
          x2 = x2.long()
          ret = torch.inner(x1, x2).type(ret_dtype)
          if ivy.exists(out):
              return ivy.inplace_update(out, ret)
          return ret
      return torch.inner(x1, x2, out=out)
  
imports: import torch
  from typing import Union, Optional, Tuple, Literal, List, NamedTuple, Sequence
  from collections import namedtuple
  import ivy
  from ivy import inf
  from ivy.func_wrapper import with_unsupported_dtypes, with_supported_dtypes
  from .None import backend_version
  from .elementwise import _cast_for_unary_op
label_desc: Use image node_id 7 for calling a global function with example usage: inner() and returns: torch, ret, ivy