(
q_nope_shape: List[int],
q_rope_shape: List[int],
kv_nope_shape: List[int],
kv_rope_shape: List[int],
test_seq_len: int,
dtype: torch.dtype,
test_count: int,
test_configs,
queue,
)
| 128 | |
| 129 | |
| 130 | def worker( |
| 131 | q_nope_shape: List[int], |
| 132 | q_rope_shape: List[int], |
| 133 | kv_nope_shape: List[int], |
| 134 | kv_rope_shape: List[int], |
| 135 | test_seq_len: int, |
| 136 | dtype: torch.dtype, |
| 137 | test_count: int, |
| 138 | test_configs, |
| 139 | queue, |
| 140 | ): |
| 141 | dog = Watchdog(timeout=10) |
| 142 | dog.start() |
| 143 | |
| 144 | try: |
| 145 | for index in range(len(test_configs)): |
| 146 | tuning_config = test_configs[index] |
| 147 | cost_time = test_decode_attentions( |
| 148 | q_nope_shape=q_nope_shape, |
| 149 | q_rope_shape=q_rope_shape, |
| 150 | kv_nope_shape=kv_nope_shape, |
| 151 | kv_rope_shape=kv_rope_shape, |
| 152 | test_seq_len=test_seq_len, |
| 153 | dtype=dtype, |
| 154 | test_count=test_count, |
| 155 | **tuning_config, |
| 156 | ) |
| 157 | dog.heartbeat() |
| 158 | queue.put(cost_time) # Put result in queue |
| 159 | except Exception as ex: |
| 160 | logger.error(str(ex) + f"config {tuning_config}") |
| 161 | import sys |
| 162 | |
| 163 | sys.exit(-1) |
| 164 | pass |
| 165 | |
| 166 | |
| 167 | def get_test_configs(split_id, split_count): |
nothing calls this directly
no test coverage detected