[Bugfix][MRV2] Support encoder timing stats in model runner V2 (#50020)
Signed-off-by: Guan-Ming (Wesley) Chiu <105915352+guan404ming@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
5426311d91
commit
457a5f34db
@@ -453,6 +453,12 @@ class GPUModelRunner(LoRAModelRunnerMixin):
|
||||
# Cache the default CUDA stream to avoid lookup overhead.
|
||||
return torch.cuda.current_stream(self.device)
|
||||
|
||||
def get_encoder_timing_stats(self) -> dict[str, dict[str, float | int]]:
|
||||
encoder_runner = getattr(self.model_state, "encoder_runner", None)
|
||||
if encoder_runner is None:
|
||||
return {}
|
||||
return encoder_runner.get_encoder_timing_stats()
|
||||
|
||||
def get_kv_cache_spec(self):
|
||||
if self.is_encoder_only:
|
||||
return {}
|
||||
|
||||
Reference in New Issue
Block a user