Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting enough cache_size_limit for torch.compile warmup #238

Merged
merged 10 commits into from
Sep 25, 2024
5 changes: 5 additions & 0 deletions vllm/worker/habana_model_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,11 @@ def _setup_buckets(self) -> None:
bucket for bucket in self.decode_buckets
if self._is_valid_bucket(bucket)
]
if not htorch.utils.internal.is_lazy() and not self.enforce_eager:
cache_size_limit = len(self.prompt_buckets)+len(self.decode_buckets)
zehao-intel marked this conversation as resolved.
Show resolved Hide resolved
torch._dynamo.config.cache_size_limit = cache_size_limit
torch._dynamo.config.accumulated_cache_size_limit = cache_size_limit*8
zehao-intel marked this conversation as resolved.
Show resolved Hide resolved

msg = (f"Generated {len(self.decode_buckets)} decode buckets: "
f"{list(sorted(self.decode_buckets))}")
logger.info(msg)
Expand Down