code: def _kernel_make_viewless_tensor(inp, requires_grad):
      """Make a viewless tensor.
  
      View tensors have the undesirable side-affect of retaining a reference
      to the originally-viewed tensor, even after manually setting the '.data'
      field. This method creates a new tensor that links to the old tensor's
      data, without linking the viewed tensor, referenced via the '._base'
      field.
      """
      out = torch.empty(
          (1,),
          dtype=inp.dtype,
          device=inp.device,
          requires_grad=requires_grad,
      )
      out.data = inp.data
      return out
  
imports: import math
  import operator
  from functools import reduce
  import torch
  from megatron.core import parallel_state
  from megatron.core.dist_checkpointing.mapping import ShardedTensor
label_desc: Use image node_id 6 for calling a global function with example usage: _kernel_make_viewless_tensor(inp, requires_grad) and returns: out