Skip to content

Add vLLM-metax vllm metax cmake presets compiler arg#303

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

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

Conversation

@ghangz

@ghangz ghangz commented Jul 1, 2026

Copy link
Copy Markdown

Summary

  • Adds a focused vllm metax cmake presets compiler arg 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.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-compiler-arg
  • 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 the ability to specify an explicit CUDA-compatible compiler (such as cucc or mxcc in MACA containers) via a new --cuda-compiler CLI argument and a corresponding parameter in generate_presets. It also adds a new --output argument to specify the output path of the generated presets file, along with unit tests verifying this functionality. The review feedback highlights that if a relative path or command name is provided for the CUDA compiler, it should be resolved to an absolute path to prevent configuration failures when CMake is executed from a different working directory.

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 +40 to +42
nvcc_path = cuda_compiler
if nvcc_path:
print(f"Using CUDA-compatible compiler from argument: {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 cuda_compiler argument is provided as a relative path or as a command name, it is written directly to CMakeUserPresets.json without resolution. Since CMake configure presets are executed with the working directory set to the build directory (e.g., ${sourceDir}/cmake-build-release), any relative path will be resolved relative to the build directory rather than the project root, leading to configuration failures. Resolving the compiler path to an absolute path (similar to how python_executable is handled) ensures robust behavior.

    nvcc_path = cuda_compiler
    if nvcc_path:
        if not os.path.isabs(nvcc_path) and which(nvcc_path):
            nvcc_path = os.path.abspath(which(nvcc_path))
        elif not os.path.isabs(nvcc_path):
            nvcc_path = os.path.abspath(nvcc_path)
        print(f"Using CUDA-compatible compiler from argument: {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