Add vLLM-metax vllm metax cmake presets compiler arg#303
Conversation
There was a problem hiding this comment.
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.
| nvcc_path = cuda_compiler | ||
| if nvcc_path: | ||
| print(f"Using CUDA-compatible compiler from argument: {nvcc_path}") |
There was a problem hiding this comment.
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}")
Summary
Validation
Review notes