[Misc] SpecDecodeWorker supports profiling (#9719)

Signed-off-by: Abatom <abatom@163.com>
This commit is contained in:
科英 2024-10-27 12:18:03 +08:00 committed by GitHub
parent 6650e6a930
commit 67a6882da4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1038,6 +1038,14 @@ class SpecDecodeWorker(LoraNotSupportedWorkerBase):
"""
raise NotImplementedError
def start_profile(self):
if isinstance(self.scorer_worker, Worker):
self.scorer_worker.start_profile()
def stop_profile(self):
if isinstance(self.scorer_worker, Worker):
self.scorer_worker.stop_profile()
def split_num_cache_blocks_evenly(scorer_cache_block_size_bytes: int,
proposer_cache_block_size_bytes: int,