MCPcopy
hub / github.com/ModelTC/LightLLM / worker

Function worker

test/kernel/deepseekv3_fp8_block_gemm_tuning.py:74–106  ·  view source on GitHub ↗
(
    M: int,
    N: int,
    K: int,
    block_size: int,
    dtype: torch.dtype,
    test_count: int,
    test_configs,
    queue,
)

Source from the content-addressed store, hash-verified

72
73
74def worker(
75 M: int,
76 N: int,
77 K: int,
78 block_size: int,
79 dtype: torch.dtype,
80 test_count: int,
81 test_configs,
82 queue,
83):
84 dog = Watchdog(timeout=10)
85 dog.start()
86
87 try:
88 for index in range(len(test_configs)):
89 tuning_config = test_configs[index]
90 cost_time = test_fp8_block_gemm(
91 M=M,
92 N=N,
93 K=K,
94 block_size=block_size,
95 dtype=dtype,
96 test_count=test_count,
97 **tuning_config,
98 )
99 dog.heartbeat()
100 queue.put(cost_time) # Put result in queue
101 except Exception as ex:
102 logger.exception(str(ex) + f"config {tuning_config}")
103 import sys
104
105 sys.exit(-1)
106 pass
107
108
109def get_test_configs(split_id, split_count):

Callers

nothing calls this directly

Calls 5

startMethod · 0.95
heartbeatMethod · 0.95
WatchdogClass · 0.90
test_fp8_block_gemmFunction · 0.85
putMethod · 0.45

Tested by

no test coverage detected