code: def get_kernel_category(kernel_mod):
      """
      Given the module defining a triton kernel, return the category of the kernel.
      Category can be one of:
      - pointwise
      - reduction
      - persistent_reduction
  
      Currently we simply decide the category depending on what decorator is imported
      by the kernel.
      """
      choices = [
          ch
          for ch in _kernel_category_choices
          if ch in kernel_mod.__dict__
      ]
      if len(choices) == 1:
          return choices[0]
      else:
          return "unknown"
  
file_path: pytorch/torch/_inductor/wrapper_benchmark.py
imports: import dataclasses
  import tempfile
  from collections import defaultdict
  import torch
  from torch.autograd import DeviceType
  from .utils import create_bandwidth_info_str, do_bench, get_num_bytes
label_desc: Use image node_id 2 for calling a global function with example usage: get_kernel_category(kernel_mod) and returns: choices, str