class_docstr: Compile and run a given profiler executable.
class_docstr_tok: ["Compile","and","run","a","given","profiler","executable","."]
code: def _compile(self, op):
      os.makedirs(self.binary_prefix, exist_ok=True)
      opath = os.path.join(self.binary_prefix, op["name"])
      if os.path.exists(opath):
          return
      fi = tempfile.NamedTemporaryFile(
          "w", delete=False, prefix=self.binary_prefix, suffix=".cu"
      )
      fi.write(op["src"])
      fi.close()
      cmd = self.cmd.format(
          cflags=self.cflags, src=fi.name, output=opath
      )
      logger.info("invoking compilation %s", cmd)
      os.system(cmd)
      os.unlink(fi.name)
  
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 2 for calling the ProfilerEngine obj's underlying member method code with example usage: obj._compile(op) without return types