class_docstr: A function declaration expression.
  
  Parameters
  ----------
  params: List[Union[tvm.tir.Var, tvm.tir.Buffer]]
      List of input parameters to the function.
  
  body: tvm.tir.Stmt
      The body of the function.
  
  ret_type: tvm.ir.Type
      The return type annotation of the function.
  
  buffer_map : Map[tvm.tir.Var, tvm.tir.Buffer]
      The buffer binding map.
  
  attrs: Optional[tvm.Attrs]
      Attributes of the function, can be None
  
  span : Optional[Span]
      The location of this itervar in the source code.
class_docstr_tok: ["A","function","declaration","expression",".","Parameters","--","--","--","--","--","params",":","List","[","Union","[","tvm.tir.Var",",","tvm.tir.Buffer","]","]","List","of","input","parameters","to","the","function",".","body",":","tvm.tir.Stmt","The","body","of","the","function",".","ret_type",":","tvm.ir.Type","The","return","type","annotation","of","the","function",".","buffer_map",":","Map","[","tvm.tir.Var",",","tvm.tir.Buffer","]","The","buffer","binding","map",".","attrs",":","Optional","[","tvm.Attrs","]","Attributes","of","the","function",",","can","be","None","span",":","Optional","[","Span","]","The","location","of","this","itervar","in","the","source","code","."]
code: def __init__(
      self,
      params,
      body,
      ret_type=None,
      buffer_map=None,
      attrs=None,
      span=None,
  ):
      param_list = []
      buffer_map = {} if buffer_map is None else buffer_map
      for x in params:
          x = tvm.runtime.convert(x) if not isinstance(x, Object) else x
          if isinstance(x, Buffer):
              var = Var(x.name, dtype="handle")
              param_list.append(var)
              buffer_map[var] = x
          elif isinstance(x, Var):
              param_list.append(x)
          else:
              raise TypeError("params can only contain Var or Buffer")
  
      self.__init_handle_by_constructor__(
          _ffi_api.PrimFunc,
          param_list,
          body,
          ret_type,
          buffer_map,
          attrs,
          span,
      )
  
imports: import collections
  import inspect
  from typing import Callable, List, Mapping, Optional, Tuple, Union
  import tvm
  import tvm._ffi
  import tvm.runtime
  from tvm.ir import BaseFunc, Range
  from tvm.runtime import Object, Scriptable
  from ..runtime.ndarray import NDArray
  from .None import _ffi_api
  from .buffer import Buffer
  from .expr import PrimExpr, Var
label_desc: Use image node_id 1 to create a new PrimFunc object from inherited base classes: BaseFunc, Scriptable with example: obj = PrimFunc(params, body, ret_type, buffer_map, attrs, span)