Skip to content

Conversation

@GermanAizek
Copy link
Contributor

@ggerganov
Copy link
Member

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
Member

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 ggml-org:master Jan 20, 2024
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 <[email protected]>
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