vllm - ✅(Solved) Fix [torch.compile] config hashing refactor follow-ups [2 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vllm-project/vllm#39479Fetched 2026-04-11 06:13:23
View on GitHub
Comments
0
Participants
1
Timeline
7
Reactions
0
Author
Participants
Timeline (top)
mentioned ×3subscribed ×3labeled ×1

Root Cause

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.

PR fix notes

PR #29117: [torch.compile] refactor config hashing to compile_factors and unify factor collection

Description (problem / solution / changelog)

Motivation

After this PR: https://github.com/vllm-project/vllm/pull/26468 there were a couple follow-ups to add.

In this PR, the following are added/changed:

  • Uniform use of normalize_value & hash_factors across configs with a compute_hash function
  • Followed up on docstrings not being up-to date in the opt-out configs
  • Refactor all locations of compute_hash to compile_factors this is the reason for so many files changed
  • compute_hash isn’t the right name because real computation of the hash is actually done by utils.hash_factors.

Additions:

  • I also made it so before calling normalize value in get_compile_factors, it checks if .compile_factors exists on the subobject - based on Luka's suggestion
  • This allows us to avoid handling PassConfig specially as in the case for compilation.py
  • This is in response to comment here
  • Also created a shared helper instead of inlining both _compute_code_hash and compilation_config_hash_factors
<details><summary>cache_key_factors.json</summary> <p>
{
  "env": {
    "VLLM_USE_PRECOMPILED": "1",
    "VLLM_LOGGING_LEVEL": "DEBUG"
  },
  "config": {
    "model": "meta-llama/Llama-3.3-70B-Instruct",
    "dtype": "bfloat16",
    "max_model_len": 4096
  },
  "config_hash": "931b379b52f8c28316d4c25e74046d51d7147ddfc09abf8c1346e053467a70e6",
  "compiler": {},
  "compiler_hash": "44136fa355b3678a1146ad16f7e8649e94fb4fc21fe77e8310c060f61caaff8a",
  "code": {
    "files": [
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_0/xs/cxs442zdr3simkg7obtwq7bgw6kifbypb5iksbjzqjt5px3j5sfu.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_1/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_10/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_11/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_12/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_13/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_14/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_15/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_16/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_17/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_18/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_19/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_2/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_20/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_21/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_22/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_23/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_24/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_25/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_26/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_27/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_28/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_29/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_3/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_30/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_31/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_32/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_33/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_34/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_35/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_36/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_37/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_38/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_39/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_4/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_40/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_41/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_42/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_43/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_44/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_45/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_46/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_47/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_48/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_49/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_5/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_50/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_51/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_52/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_53/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_54/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_55/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_56/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_57/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_58/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_59/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_6/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_60/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_61/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_62/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_63/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_64/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_65/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_66/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_67/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_68/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_69/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_7/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_70/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_71/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_72/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_73/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_74/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_75/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_76/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_77/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_78/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_79/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_8/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_80/6q/c6q3fggehlhrvala3bnm2bfzwslcjpwwqidiag4jkmnwdxkmhxmt.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/artifact_shape_None_subgraph_9/kg/ckgjrp5zvupvlt7gcy5jv3i3fq7j43n7svcjizgs4wzjdaivbjy6.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/computation_graph.py"
      },
      {
        "path": "/home/ubuntu/vllm_cache_llama33/torch_compile_cache/64625fd5e0/rank_0_0/backbone/vllm_compile_cache.py"
      }
    ]
  },
  "code_hash": "f37b1c49ecca58acde543bd84c7de6dfbb439fa66f112b511f239a6bf5a1c39b"
}
</p> </details>

cc @ProExpertProg @hmellor @zou3519


[!NOTE] Unifies torch.compile cache key generation and factor collection.

  • Introduces CompileFactors and get_compile_factors, replacing compute_hash with compile_factors across config classes and compiler adaptors; VllmConfig.compile_factors aggregates nested config factors
  • Standardizes hashing via normalize_value and hash_factors, including nested compile_factors for subobjects
  • Adds helpers compute_env_and_config_hashes and get_code_factors; cache keys now combine env/config/compiler/code factors and persist to cache_key_factors.json
  • Aligns AOT and JIT cache key computation; updates backends to derive cache dirs from hashed factor sets
  • Updates tests to use get_compile_factors and validates multimodal backend factor changes; minor enum import path fix

<sup>Written by Cursor Bugbot for commit 7fbc6a60fc8895f1f1d2afc8893d459924c7c955. This will update automatically on new commits. Configure here.</sup>


[!NOTE] Unifies torch.compile cache key derivation and factor collection across the codebase.

  • Introduces CompileFactors and get_compile_factors; migrates config classes and compiler adaptors from compute_hash to compile_factors (opt-out factor collection, nested configs supported)
  • Standardizes hashing via normalize_value and hash_factors; VllmConfig.compile_factors aggregates nested config factors
  • Adds shared helpers compute_env_and_config_hashes and get_code_factors; backends now derive cache dirs from hashed {env, config, compiler, code} factors and persist them in cache_key_factors.json
  • Aligns AOT and JIT cache key computation; updates logging and factor persistence
  • Updates tests to use get_compile_factors and validate factor changes; fixes enum import for AttentionBackendEnum
  • Minor API/typing cleanups (e.g., return {} where configs don’t affect graphs; use Path for traced files; consistent DP hash validation)

<sup>Written by Cursor Bugbot for commit 929d2f76cc286cadb81e327a7d6ca98274f404dd. This will update automatically on new commits. Configure here.</sup>


[!NOTE] <sup>Cursor Bugbot is generating a summary for commit a0b60a4a902af7d59c43b1bda361fdade083fd2b. Configure here.</sup>


[!NOTE] Unifies torch.compile cache key derivation and factor collection across the codebase.

  • Introduces CompileFactors and get_compile_factors; migrates configs and compiler adaptors from compute_hash to compile_factors (opt‑out, nested configs supported)
  • Standardizes hashing via normalize_value and hash_factors; VllmConfig.compile_factors aggregates nested factors
  • Adds helpers compute_env_and_config_hashes and get_code_factors; backends now hash {env, config, compiler, code} to derive cache dirs and persist cache_key_factors.json
  • Aligns AOT and JIT cache keys; updates logging and DP/parallel config validation to use factor hashes
  • Test updates and minor cleanups (enum import path, Path usage, typing tweaks, pass manager UUID includes post‑cleanup)

<sup>Written by Cursor Bugbot for commit a0b60a4a902af7d59c43b1bda361fdade083fd2b. This will update automatically on new commits. Configure here.</sup>


[!NOTE] Standardizes torch.compile cache keys and factor collection across the codebase.

  • Introduces CompileFactors and get_compile_factors; replaces compute_hash with compile_factors in configs and compiler adaptors, and aggregates in VllmConfig.compile_factors
  • Adds compute_env_and_config_hashes and get_code_factors; backends now build cache dirs from hashed {env, config, compiler, code} and persist cache_key_factors.json
  • Aligns AOT and JIT cache key computation; updates logging and DP parallel validation to use factor hashes
  • Updates pass manager UUID composition and minor typing/import cleanups (e.g., Path/Sequence); adjusts tests to new APIs and enum import path

<sup>Written by Cursor Bugbot for commit 8f3d1afbe9b296ddc6a12c9ff28f185623ebdc3c. This will update automatically on new commits. Configure here.</sup>

Changed files

  • tests/compile/fullgraph/test_toy_llama.py (modified, +4/-10)
  • tests/config/test_config_utils.py (modified, +4/-4)
  • tests/config/test_multimodal_config.py (modified, +4/-4)
  • vllm/compilation/backends.py (modified, +47/-39)
  • vllm/compilation/caching.py (modified, +38/-0)
  • vllm/compilation/compiler_interface.py (modified, +15/-25)
  • vllm/compilation/passes/pass_manager.py (modified, +3/-9)
  • vllm/config/attention.py (modified, +6/-12)
  • vllm/config/cache.py (modified, +9/-9)
  • vllm/config/compilation.py (modified, +15/-25)
  • vllm/config/device.py (modified, +4/-7)
  • vllm/config/ec_transfer.py (modified, +4/-8)
  • vllm/config/kv_transfer.py (modified, +4/-8)
  • vllm/config/load.py (modified, +4/-8)
  • vllm/config/lora.py (modified, +8/-16)
  • vllm/config/model.py (modified, +13/-12)
  • vllm/config/multimodal.py (modified, +4/-5)
  • vllm/config/observability.py (modified, +4/-7)
  • vllm/config/offload.py (modified, +2/-2)
  • vllm/config/parallel.py (modified, +7/-6)
  • vllm/config/pooler.py (modified, +30/-7)
  • vllm/config/profiler.py (modified, +40/-1)
  • vllm/config/scheduler.py (modified, +3/-8)
  • vllm/config/speculative.py (modified, +9/-15)
  • vllm/config/structured_outputs.py (modified, +4/-9)
  • vllm/config/utils.py (modified, +20/-4)
  • vllm/config/vllm.py (modified, +45/-95)
  • vllm/distributed/eplb/eplb_state.py (modified, +7/-2)
  • vllm/distributed/parallel_state.py (modified, +3/-3)
  • vllm/envs.py (modified, +2/-6)
  • vllm/sampling_params.py (modified, +9/-1)
  • vllm/v1/engine/core.py (modified, +3/-3)
  • vllm/v1/engine/utils.py (modified, +4/-1)
RAW_BUFFERClick to expand / collapse

🚀 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.

extent analysis

TL;DR

Refactor the compute_hash function to compile_factors and ensure consistent use of normalize_value and hash_factors across configs to address the follow-up tasks.

Guidance

  • Review the TODOs list and prioritize refactoring compute_hash to compile_factors to align with the opt-out model introduced in PR #26468.
  • Verify that normalize_value is called after checking if .compile_factors exists on the subobject to avoid special handling for PassConfig.
  • Create a shared helper for _compute_code_hash and compilation_config_hash_factors to avoid inlining and improve code consistency.
  • Update docstrings to reflect the changes and ensure typing cleanups are performed to maintain code quality.

Example

No specific code example is provided due to the lack of explicit code snippets in the issue.

Notes

The provided guidance is based on the TODOs list and may require additional context or information to fully address all the follow-up tasks.

Recommendation

Apply the workaround by refactoring the compute_hash function and ensuring consistent use of normalize_value and hash_factors to address the immediate needs, as a full solution may require more information or context.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING