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

Added support ccache for speedup recompilation #5002

Merged
merged 2 commits into from
Jan 20, 2024

Conversation

GermanAizek
Copy link
Contributor

@ggerganov
Copy link
Owner

Are there cases where we want ccache disabled even if it is present?
If so, we should probably put it behind LLAMA_CCACHE CMake option

@GermanAizek
Copy link
Contributor Author

Are there cases where we want ccache disabled even if it is present? If so, we should probably put it behind LLAMA_CCACHE CMake option

Disabling ccache is required if you only need to benchmark build time without ccache, enabling cache is necessary when checkout git branches and recompiling. It really helps to reduce compile time.

CMakeLists.txt Outdated
find_program(LLAMA_CCACHE_FOUND ccache)
if (LLAMA_CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be best to leave out pch_defines since we don't use precompiled headers, and sloppy preprocessing in the future might lead to surprising issues.

@ggerganov
Copy link
Owner

Disabling ccache is required if you only need to benchmark build time without ccache

So it sounds we need to add LLAMA_NO_CCACHE option in order to be able to disable ccache in such situations

@ggerganov ggerganov merged commit 77bc1bb into ggerganov:master Jan 20, 2024
30 of 43 checks passed
crasm pushed a commit that referenced this pull request Jan 23, 2024
* Added support ccache for speedup recompilation

* cmake : option to disable ccache

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
jordankanter pushed a commit to jordankanter/llama.cpp that referenced this pull request Feb 3, 2024
* Added support ccache for speedup recompilation

* cmake : option to disable ccache

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
hodlen pushed a commit to hodlen/llama.cpp that referenced this pull request Apr 1, 2024
* Added support ccache for speedup recompilation

* cmake : option to disable ccache

---------

Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
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.

3 participants