Skip to content

Add vLLM-metax vllm metax cmake presets cudacxx#304

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

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

Conversation

@ghangz

@ghangz ghangz commented Jul 1, 2026

Copy link
Copy Markdown

Summary

  • Adds a focused vllm metax cmake presets cudacxx 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_cudacxx.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-cudacxx
  • 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 updates the CMake presets generation script to detect the CUDA compiler using the CUDACXX environment variable, prioritizing it over CUDA_HOME. A corresponding unit test was also added to verify this behavior. The review feedback suggests resolving CUDACXX using which if it is specified as a command name rather than an absolute path, ensuring that compilers in the system PATH are correctly detected.

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 +37 to +40
cudacxx = os.environ.get("CUDACXX")
if cudacxx and os.path.exists(cudacxx):
nvcc_path = cudacxx
print(f"Found CUDA compiler via CUDACXX: {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

If the CUDACXX environment variable is set to a compiler command name (e.g., nvcc or clang++) rather than an absolute path, os.path.exists(cudacxx) will return False. This causes the script to ignore the user's specified compiler and fall back to detecting nvcc elsewhere, which is incorrect. Resolving the compiler using which(cudacxx) when it is not a direct path ensures that command names in the system PATH are correctly detected and respected.

Suggested change
cudacxx = os.environ.get("CUDACXX")
if cudacxx and os.path.exists(cudacxx):
nvcc_path = cudacxx
print(f"Found CUDA compiler via CUDACXX: {nvcc_path}")
cudacxx = os.environ.get("CUDACXX")
if cudacxx:
resolved_cudacxx = cudacxx if os.path.exists(cudacxx) else which(cudacxx)
if resolved_cudacxx:
nvcc_path = resolved_cudacxx
print(f"Found CUDA compiler via CUDACXX: {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