class_docstr: Self attention implementation for dense, blocked self attention.
class_docstr_tok: ["Self","attention","implementation","for","dense",",","blocked","self","attention","."]
docstr: Property to calculate blocking granularity for the query dimension.
  This has no impact on the KV-cache structure, but will  affect the
  number of attention atoms associated with a batch.
docstr_tok: ["Property","to","calculate","blocking","granularity","for","the","query","dimension",".","This","has","no","impact","on","the","KV-cache","structure",",","but","will","affect","the","number","of","attention","atoms","associated","with","a","batch","."]
code: def q_block_size(self) -> int:
      """
      Property to calculate blocking granularity for the query dimension.
      This has no impact on the KV-cache structure, but will  affect the
      number of attention atoms associated with a batch.
      """
      return get_q_block_size(self._config.head_size)
  
file_path: deepspeed/deepspeed/inference/v2/modules/implementations/attention/dense_blocked_attention.py
imports: from typing import Any, Dict, Optional
  import torch
  from deepspeed.accelerator import get_accelerator
  from ....allocator import empty_from
  from ....inference_utils import DtypeEnum
  from ....kernels.ragged_ops import AtomBuilder, BlockedFlashAttn, BlockedRotaryEmbeddings, BlockedTrainedRotaryEmbeddings, get_q_block_size, get_kv_block_size, LinearBlockedKVCopy
  from ....ragged import RaggedBatchWrapper, split_kv
  from deepspeed.ops.op_builder import RaggedUtilsBuilder
  from ...interfaces import DSSelfAttentionBase, DSSelfAttentionRegistry
  from ...configs import DSSelfAttentionConfig, PositionalEmbeddingType, MaskingType
label_desc: Use image node_id 5 for calling the DSDenseBlockedAttention obj's underlying member method code with example usage: obj.q_block_size() and returns: get_q_block_size