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

redundant compilation of kernels #850

Open
philipportner opened this issue Oct 13, 2024 · 0 comments
Open

redundant compilation of kernels #850

philipportner opened this issue Oct 13, 2024 · 0 comments
Labels
bug A mistake in the code.

Comments

@philipportner
Copy link
Collaborator

When recompiling a file or files which are not part of the libAllKernels.so, the kernels do still get compiled again.
I'm pretty sure the problem is that execute_process here is done for every call of build.sh, which replaces the kernel files in build/, causing them to have a new timestamp and for ninja to compile them again. See the related ninja issue here.

When running on a system with ccache this does not matter as ccache is able to use the cached compilation even if the timestamps do not match.

As I could not find any option for execute_process to run the command conditionally in the documentation, I think one way to solve this would be to simply check in the genKernelInst.py script if the kernels already exist. Translation units would still be recompiled when the source changes as this is handled by ninja. I don't like this solution as it could cause problems when adding new template instantiations to the kernels.json file.

@philipportner philipportner added the bug A mistake in the code. label Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A mistake in the code.
Projects
None yet
Development

No branches or pull requests

1 participant