class_docstr: Compile and run a given profiler executable.
class_docstr_tok: ["Compile","and","run","a","given","profiler","executable","."]
docstr: Run the profiler executable corresponding to op_name with args.
docstr_tok: ["Run","the","profiler","executable","corresponding","to","op_name","with","args","."]
code: def evaluate(self, op, args):
      """Run the profiler executable corresponding to op_name with args."""
      op_name = op["name"]
      opath = os.path.join(self.binary_prefix, op_name)
      if not os.path.exists(opath):
          self._compile(op)
      if not os.path.exists(opath):
          # Bail out if compilation fails for a whatever reason (e.g. static assert failure)
          return float("inf")
      cmd = [opath]
      for arg in args:
          cmd.append(str(arg))
      try:
          logger.info("invoking evaluation %s", cmd)
          sp = subprocess.run(cmd, capture_output=True, check=True)
          rt = float(sp.stdout)
          if rt == 0.0:
              # This seems to happen with split-k using invalid split-k-slices
              rt = float("inf")
          logger.info("%s, %f", op_name, rt)
      except subprocess.CalledProcessError:
          rt = float("inf")
      return rt
  
imports: import logging
  import os
  import re
  import tempfile
  import subprocess
  import multiprocessing
  import tvm._ffi
  from tvm.tir import IntImm
  from tvm.runtime import Object
  from .None import _ffi_api
  from .library import MathInstruction, DataType, DataTypeTag, OpcodeClass, MathOperation, TileDescription, EpilogueFunctor
  from .gemm_operation import instantiate_gemm_template
  from .conv2d_operation import instantiate_conv2d_template
label_desc: Use image node_id 4 for calling the ProfilerEngine obj's underlying member method code with example usage: obj.evaluate(op, args) and returns: rt, float