vllm-project/vllm

[torch.compile] config hashing refactor follow-ups

Open

#39479 opened on Apr 10, 2026

View on GitHub
 (15 comments) (0 reactions) (3 assignees)Python (80,034 stars) (16,816 forks)batch import
feature requestgood first issuehelp wanted

Description

🚀 The feature, motivation and pitch

MOTIVATION.

PR #26468 moved vLLM config hashing toward an opt-out model so new compilation-relevant config fields are less likely to be accidentally omitted from torch.compile cache keys.

This issue tracks the follow-ups and to-dos.

TODOs

  1. Refactor all locations of compute_hash to compile_factors. compute_hash isn’t the right name because real computation of the hash is actually done by utils.hash_factors.
  2. before calling normalize value in get_compile_factors, it needs to check if .compile_factors exists on the subobject. This allows us to avoid handling PassConfig specially as in the case for compilation.py
  3. Uniform use of normalize_value & hash_factors across configs with a compute_hash function.
  4. address this comment: comment here
  5. Create a shared helper instead of inlining both _compute_code_hash and compilation_config_hash_factors
  6. Refactor all locations of compute_hash to compile_factors
  7. Follow up on docstrings not being up-to date in the opt-out configs
  8. typing cleanups (e.g., return {} where configs don’t affect graphs; use Path for traced files; consistent DP hash validation.

always print hashed configs into cache_key_factors.json

CC List.

@ProExpertProg @zou3519 @hmellor

Alternatives

No response

Additional context

No response

Before submitting a new issue...

  • Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

Contributor guide