class_docstr: Lowering base class of the Universal Modular Accelerator Interface (UMA).
class_docstr_tok: ["Lowering","base","class","of","the","Universal","Modular","Accelerator","Interface","(","UMA",")","."]
docstr: Lower a S-TIR primitive function to a NS-TIR primitive function.
  
  Parameters
  ----------
  prim_func : tvm.tir.PrimFunc
      The primitive function to lower.
  
  Returns
  -------
  out : tvm.tir.PrimFunc
      The lowered non-schedulable TensorIR primitive function.
docstr_tok: ["Lower","a","S-TIR","primitive","function","to","a","NS-TIR","primitive","function",".","Parameters","--","--","--","--","--","prim_func",":","tvm.tir.PrimFunc","The","primitive","function","to","lower",".","Returns","--","--","--","-","out",":","tvm.tir.PrimFunc","The","lowered","non-schedulable","TensorIR","primitive","function","."]
code: def _lower_stir_to_nstir(
      self, prim_func: tvm.tir.PrimFunc
  ) -> tvm.tir.PrimFunc:
      """Lower a S-TIR primitive function to a NS-TIR primitive function.
  
      Parameters
      ----------
      prim_func : tvm.tir.PrimFunc
          The primitive function to lower.
  
      Returns
      -------
      out : tvm.tir.PrimFunc
          The lowered non-schedulable TensorIR primitive function.
  
      """
      curr_ctxt = tvm.transform.PassContext().current()
      assert "tir.add_lower_pass" not in curr_ctxt.config
  
      pass_map = {
          PassPhase.TIR_PHASE_0: 0,
          PassPhase.TIR_PHASE_1: 1,
          PassPhase.TIR_PHASE_2: 2,
          PassPhase.TIR_PHASE_3: 3,
      }
      lower_passes = [(pass_map[k], v) for k, v in self._tir_passes]
  
      with tvm.transform.PassContext(
          opt_level=curr_ctxt.opt_level,
          required_pass=curr_ctxt.required_pass,
          disabled_pass=curr_ctxt.disabled_pass,
          instruments=curr_ctxt.instruments,
          config={
              **dict(curr_ctxt.config),
              "tir.add_lower_pass": lower_passes,
          },
      ):
          mod = tvm.lower(tvm.ir.IRModule.from_expr(prim_func))
      prim_func = mod[prim_func.attrs["global_symbol"]]
      return prim_func
  
file_path: tvm/python/tvm/relay/backend/contrib/uma/api/lower.py
imports: from typing import List, Tuple, Callable, Optional
  import tvm
  from tvm import relay, te
  from tvm.relay.op.op import register_strategy
  from .None import _ffi_api
  from .utils import PassPhase
label_desc: Use image node_id 3 for calling the UMALower obj's underlying member method code with example usage: obj._lower_stir_to_nstir(prim_func) and returns: prim_func