Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed painfully slow single process builds. #7326

Merged
merged 2 commits into from
May 30, 2024

Conversation

jboero
Copy link
Contributor

@jboero jboero commented May 16, 2024

I've noticed the container builds are painfully slow as they don't enable parallel compilation. I always add the -j for defaulting to the number of available threads in the box which dramatically speeds up building. This would also be beneficial for the GitHub Actions and testing. Suggest this gets merged for automation sanity.

@slaren
Copy link
Collaborator

slaren commented May 16, 2024

Worth keeping in mind that make -j does not default to the number of threads, but rather it removes any limits. Likely not an issue in most cases, but it can be very bad for systems/VMs with a very low number of processors.

@jboero
Copy link
Contributor Author

jboero commented May 16, 2024

Worth keeping in mind that make -j does not default to the number of threads

It's interesting because I've always heard that but in most Linux environments I've used lately it defaults to number of threads. Maybe it would be more helpful to

make -j$(nprocs) if the nprocs command is available?

@slaren
Copy link
Collaborator

slaren commented May 16, 2024

I think that should work, but I don't know much about docker.

@mofosyne mofosyne added performance Speed related topics build Compilation issues labels May 16, 2024
@giuseppe
Copy link
Contributor

I think that should work, but I don't know much about docker.

nproc is cpuset aware so it works well from a container (i.e. if you limit the number of cpu cores a container can use, nproc will report the correct number of cores)

@mofosyne mofosyne added the need feedback Testing and feedback with results are needed label May 17, 2024
@mofosyne mofosyne added the Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix label May 21, 2024
@github-actions github-actions bot added the devops improvements to build systems and github actions label May 21, 2024
@slaren slaren merged commit 9022c33 into ggerganov:master May 30, 2024
11 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Compilation issues devops improvements to build systems and github actions need feedback Testing and feedback with results are needed performance Speed related topics Review Complexity : Low Trivial changes to code that most beginner devs (or those who want a break) can tackle. e.g. UI fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants