code: def features_from_primfunc(
      func: PrimFunc,
      cache_line_bytes: int = 64,
      max_n_bufs: Optional[int] = None,
      log_scale: bool = False,
  ) -> Optional[np.ndarray]:
      """Extract performance features from a PrimFunc.
  
      Parameters
      ----------
      func: PrimFunc
          PrimFunc from which features will be extracted. Each store operation to
          a unique buffer in the function will result in one row of features in
          the output.
  
      cache_line_bytes: int, optional
          Size of a cache line in bytes. Defaults to 64 which is the size for
          most x86 processors.
  
      max_n_bufs: int, optional
          Maximum number of buffers in generated features. This determines the
          length of the resulting feature vector.
  
      log_scale: bool
          Should entries in the feature vector be scaled by log2(x + 1). Defaults
          to False. Use True if using features with a cost model.
  
      Returns
      -------
      Optional[np.ndarray]
          Output features, one row per store into a unique buffer statement in `func`.
      """
      return _ffi_api.FeaturesFromPrimFunc(
          func,
          cache_line_bytes,
          max_n_bufs or DEFAULT_MAX_N_BUFS,
          log_scale,
      ).numpy()
  
file_path: tvm/python/tvm/auto_scheduler/feature.py
imports: from typing import List, Tuple, Union, Optional, Dict
  import struct
  import numpy
  from .loop_state import State, StateObject
  from .measure import MeasureInput, MeasureResult
  from .None import _ffi_api
  from ..tir import PrimFunc
label_desc: Use image node_id 6 for calling a global function with example usage: features_from_primfunc(func, cache_line_bytes, max_n_bufs, log_scale) and returns: _ffi_api