def METHOD_NAME(self, mask, b, np, sq, sk):
    attn_batches = b * np
    if (
        self.scaled_masked_softmax_fusion  # user want to fuse
        and self.input_in_float16  # input must be fp16
        and 16 < sk <= 16384  # sk must be 16 ~ 16384
        and sq % 4 == 0  # sq must be divisor of 4
        and sk % 4 == 0  # sk must be divisor of 4
        and attn_batches % 4 == 0  # np * b must be divisor of 4
    ):
        if 0 <= sk <= 16384:
            batch_per_block = self.get_batch_per_block(sq, sk, b, np)
            if self.attn_mask_type == AttnMaskType.causal:
                if attn_batches % batch_per_block == 0:
                    return True
            else:
                if sq % batch_per_block == 0:
                    return True
    return False