code: def get_q_block_size(head_size: int) -> int:
      """
      Returns the query block size required by the kernel given a head size.
      """
      cc_major, cc_minor = torch.cuda.get_device_capability(
          get_accelerator().current_device()
      )  # ignore-cuda
  
      if cc_major < 8:
          raise RuntimeError(
              "Blocked attention requires CUDA compute capability >= 8.0"
          )
  
      if head_size <= 64:
          return 128
      elif head_size <= 160:
          if cc_minor != 0:
              return 64
          else:
              return 128
      elif head_size == 192:
          return 128
      elif head_size == 224:
          if cc_minor != 0:
              return 64
          else:
              return 128
      else:
          if cc_major == 8 and cc_minor == 0:
              return 128
          else:
              return 64
  
file_path: DeepSpeed/deepspeed/inference/v2/kernels/ragged_ops/blocked_flash/blocked_flash.py
imports: import torch
  from deepspeed.accelerator import get_accelerator
  from ....inference_utils import DtypeEnum
  from deepspeed.ops.op_builder import RaggedOpsBuilder
  from ...None import DSKernelBase
label_desc: Use image node_id 1 for calling a global function with example usage: get_q_block_size(head_size) and returns: int, int, int, int, int, int, int, int