Skip to content

Add vLLM-metax vllm metax cmake presets no prompt#306

Open
ghangz wants to merge 2 commits into
MetaX-MACA:masterfrom
ghangz:mengz/vllm-metax-cmake-presets-no-prompt
Open

Add vLLM-metax vllm metax cmake presets no prompt#306
ghangz wants to merge 2 commits into
MetaX-MACA:masterfrom
ghangz:mengz/vllm-metax-cmake-presets-no-prompt

Conversation

@ghangz

@ghangz ghangz commented Jul 1, 2026

Copy link
Copy Markdown

Summary

  • Adds a focused vllm metax cmake presets no prompt improvement for MetaX-MACA/vLLM-metax.
  • The change targets MetaX MACA development and validation workflows, with emphasis on earlier diagnostics, reproducible logs, or safer benchmark tooling.
  • Existing default behavior is kept compatible; the new logic is scoped to explicit checks, helper tools, or validation metadata.

Validation

  • Verified on Gitee.AI MetaX GPU resources: vLLM-metax_vLLM image batch, 10/10 PASS; PyTorch-MACA batch also covered vLLM-metax runtime tools.
  • Branch validation command: python -m pytest tests/tools/test_generate_cmake_presets_no_prompt.py
  • Pull request text is intentionally ASCII-only to avoid encoding issues on web forms and API clients.

Review notes

  • Source branch: ghangz:mengz/vllm-metax-cmake-presets-no-prompt
  • Target branch: MetaX-MACA/vLLM-metax:master
  • Maintainers can modify this branch if follow-up adjustments are needed.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a --no-prompt option to generate_presets in tools/generate_cmake_presets.py to support non-interactive execution, raising a RuntimeError if nvcc cannot be automatically detected. It also adds a corresponding unit test. The review feedback points out an important edge case: if --no-prompt is enabled but --force-overwrite is not, the script will still block on an interactive prompt if the output file already exists. A code suggestion is provided to raise a RuntimeError early in this scenario to prevent hanging in non-interactive environments.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +30 to +34
def generate_presets(
output_path="CMakeUserPresets.json",
force_overwrite=False,
no_prompt=False,
):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

When --no-prompt is enabled, the script should run completely non-interactively. However, if the output file (e.g., CMakeUserPresets.json) already exists and --force-overwrite is not specified, the script will still block on the interactive input() prompt on line 160. In non-interactive environments like CI/CD pipelines, this will cause the script to hang or crash with an EOFError.

To prevent this, we should check if the file exists and raise a RuntimeError early when no_prompt is True and force_overwrite is False.

Suggested change
def generate_presets(
output_path="CMakeUserPresets.json",
force_overwrite=False,
no_prompt=False,
):
def generate_presets(
output_path="CMakeUserPresets.json",
force_overwrite=False,
no_prompt=False,
):
if no_prompt and not force_overwrite:
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
if os.path.exists(os.path.join(project_root, output_path)):
raise RuntimeError(
f"File '{output_path}' already exists. Use --force-overwrite "
"or run without --no-prompt to overwrite it."
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant