Skip to content

Add vLLM-metax vllm metax cmake presets validate compiler#308

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

Add vLLM-metax vllm metax cmake presets validate compiler#308
ghangz wants to merge 2 commits into
MetaX-MACA:masterfrom
ghangz:mengz/vllm-metax-cmake-presets-validate-compiler

Conversation

@ghangz

@ghangz ghangz commented Jul 1, 2026

Copy link
Copy Markdown

Summary

  • Adds a focused vllm metax cmake presets validate compiler 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_validate_compiler.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-validate-compiler
  • 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 validation for the CUDA compiler path in tools/generate_cmake_presets.py by raising a FileNotFoundError if the path is empty or does not exist, and adds a corresponding unit test. The reviewer suggested improving this check by using os.path.isfile instead of os.path.exists to prevent directories from passing the validation.

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 thread tools/generate_cmake_presets.py Outdated
Comment on lines +54 to +55
if not nvcc_path or not os.path.exists(nvcc_path):
raise FileNotFoundError(f"CUDA compiler not found: {nvcc_path}")

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

Using os.path.exists only checks if the path exists, which could be True even if the user accidentally provides a directory path (e.g., /usr/local/cuda/bin/) instead of the actual compiler executable. To prevent CMake from failing later with a cryptic error, use os.path.isfile to ensure the path points to a file.

Suggested change
if not nvcc_path or not os.path.exists(nvcc_path):
raise FileNotFoundError(f"CUDA compiler not found: {nvcc_path}")
if not nvcc_path or not os.path.isfile(nvcc_path):
raise FileNotFoundError(f"CUDA compiler not found: {nvcc_path}")

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