Skip to content

[Feature][torch.compile]: Add VLLM_DEBUG_DUMP_PATH environment variable #25612

@ProExpertProg

Description

@ProExpertProg

🚀 The feature, motivation and pitch

Currently, to debug compilation and pattern matching, we often use CompilationConfig.debug_dump_path to dump fx graphs at every stage of compilation. Since #24542, we also dump pattern matching patterns there. If debugging unit tests, the developer has to manually edit the compilation config to add debug_dump_path.

Instead, we should add an environment variable that overrides the config-specified path. Debugging/logging/dumping switches should generally be environment variables, so that users can debug their deployment even if they don't have access to the runtime command or are running a script.

This override should happen in VllmConfig.__post_init__. debug_dump_path will stick around and its users will be unaffected. Additionally, rank should be appended to the debug_dump_path at the same spot so that users should use it directly, and its type should be pathlib.Path.

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions