build: use the validated NVCC compiler - #2
Open
morluto wants to merge 1 commit into
Open
Conversation
Signed-off-by: morluto <76467478+morluto@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1.
Problem
setup.pyvalidated the compiler selected byNVCC, but the Make invocation usedMOK_NVCC(falling back tonvcc). AnNVCC-only configuration could therefore validate one CUDA toolkit and compile with another compiler resolved fromPATH.Change
MOK_NVCC, thenNVCC, thennvccas the compiler command.check_nvcc().This preserves
MOK_NVCCsupport while making validation and compilation use one compiler path.Regression coverage
A focused harness loads
setup.py, exercises both environment-variable paths, stubs a CUDA 13 NVCC version response, and captures the Make command. It verifies that anNVCC-only selection passes the validated executable path to Make rather thanNVCC=nvcc.Validation
python -m py_compile setup.pygit diff --checkNote
Low Risk
Build/install wiring only; no runtime kernel or training behavior changes.
Overview
Fixes a mismatch where
setup.pycould validate one compiler (viaNVCC) but invoke Make with another (MOK_NVCCor barenvcconPATH).Compiler selection is now centralized:
MOK_NVCC→NVCC→nvcc, resolved withshutil.which, version-checked incheck_nvcc(), and that same resolved path is passed tomakeasNVCC=.... The README documents overriding the compiler withMOK_NVCCorNVCCfor both the check and the build.Reviewed by Cursor Bugbot for commit 25e607c. Bugbot is set up for automated code reviews on this repo. Configure here.