[Common] Fix Build: Remove nproc from parallel make for NCCL EP build#3138
Open
phu0ngng wants to merge 1 commit into
Open
[Common] Fix Build: Remove nproc from parallel make for NCCL EP build#3138phu0ngng wants to merge 1 commit into
nproc from parallel make for NCCL EP build#3138phu0ngng wants to merge 1 commit into
Conversation
Signed-off-by: Phuong Nguyen <phuonguyen@nvidia.com>
nproc from parallel make for NCCL EP buildnproc from parallel make for NCCL EP build
Collaborator
Author
|
/te-ci L0 |
Contributor
Comment on lines
278
to
282
| subprocess.check_call( | ||
| ["make", "-j", str(nproc), "-C", "contrib/nccl_ep", "lib"], | ||
| ["make", "-j", "-C", "contrib/nccl_ep", "lib"], | ||
| cwd=str(nccl_root), | ||
| env=env, | ||
| ) |
Contributor
There was a problem hiding this comment.
Using
make -j with no job limit means GNU make will spawn as many concurrent compiler processes as the dependency graph allows. NVCC compilations are memory-intensive (each process can consume several GB), so on high-core-count machines or in memory-constrained containers this can trigger OOM kills or cause the build to hang. A common middle-ground is to honour any MAKEFLAGS/MAKE_JOBS already set in the environment and fall back to a capped default only when neither is present.
Suggested change
| subprocess.check_call( | |
| ["make", "-j", str(nproc), "-C", "contrib/nccl_ep", "lib"], | |
| ["make", "-j", "-C", "contrib/nccl_ep", "lib"], | |
| cwd=str(nccl_root), | |
| env=env, | |
| ) | |
| nproc = int(os.environ.get("MAKE_JOBS", os.cpu_count() or 8)) | |
| subprocess.check_call( | |
| ["make", "-j", str(nproc), "-C", "contrib/nccl_ep", "lib"], | |
| cwd=str(nccl_root), | |
| env=env, | |
| ) |
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.
Description
Remove
nprocfrom parallel make for NCCL EP buildType of change
Checklist: