(
expert_num: int,
m: int,
n: int,
k: int,
topk: int,
dtype: torch.dtype,
test_count: int,
use_fp8_w8a8: bool,
is_up: bool,
block_shape,
num_fused_shared_experts: int,
test_configs,
queue,
)
| 227 | |
| 228 | |
| 229 | def worker( |
| 230 | expert_num: int, |
| 231 | m: int, |
| 232 | n: int, |
| 233 | k: int, |
| 234 | topk: int, |
| 235 | dtype: torch.dtype, |
| 236 | test_count: int, |
| 237 | use_fp8_w8a8: bool, |
| 238 | is_up: bool, |
| 239 | block_shape, |
| 240 | num_fused_shared_experts: int, |
| 241 | test_configs, |
| 242 | queue, |
| 243 | ): |
| 244 | try: |
| 245 | for index in range(len(test_configs)): |
| 246 | cost_time = test_kernel( |
| 247 | expert_num=expert_num, |
| 248 | m=m, |
| 249 | n=n, |
| 250 | k=k, |
| 251 | topk=topk, |
| 252 | dtype=dtype, |
| 253 | test_count=test_count, |
| 254 | use_fp8_w8a8=use_fp8_w8a8, |
| 255 | is_up=is_up, |
| 256 | block_shape=block_shape, |
| 257 | num_fused_shared_experts=num_fused_shared_experts, |
| 258 | **test_configs[index], |
| 259 | ) |
| 260 | queue.put(cost_time) # Put result in queue |
| 261 | |
| 262 | except Exception as ex: |
| 263 | logger.error(str(ex)) |
| 264 | logger.exception(str(ex)) |
| 265 | import sys |
| 266 | |
| 267 | sys.exit(-1) |
| 268 | pass |
| 269 | |
| 270 | |
| 271 | def get_test_configs(split_id, split_count): |
nothing calls this directly
no test coverage detected