Skip to content

[Bug]: aot_compile does not preserve dynamic shapes state on cache hit. #28975

@laithsakka

Description

@laithsakka

Your current environment

latest pytorch commit and latest vLLM commit.

🐛 Describe the bug

ok on a cache hit more things are marked dynamic than needed, this seems very similar to what happen in
#27899 (read my last comment)
this is risky because marking more things dynamic with duck shapes can cause silent specialization that are not wanted.

to repo run any model +dynamic logs
For example for "Qwen/Qwen2-7B-Instruct" on a cold run we will see only three things dynamic.

on a warm run we will see so many things marked dynamic.

Image This is. BAD!

We need to

  1. disable automatic dynamic.
  2. on a warm run know what things to be marked dynamic and mark them explicitly.
    OR
    serialize fake tensor for the warm run!

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    To triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions