Skip to content

[SYCL] Avoid rebuilding sycl library every time #4710

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

Merged
merged 1 commit into from
Oct 6, 2021
Merged

Conversation

vladimirlaz
Copy link
Contributor

SYCL/XPTI headers were copyied every time the build has triggered. That
invalidates all compilation that depend on them. As result, SYCL library
and some other targets were rebuilt on every build. This change makes
CMake copy header only they have changed.
Also version.hpp file is generated directly in build directory to avoid
copy step.
Remove redundant include of header as source file.

SYCL/XPTI headers were copyied every time the build has triggered. That
invalidates all compilation that depend on them. As result, SYCL library
and some other targets were rebuilt on every build. This change makes
CMake copy header only they have changed.
Also version.hpp file is generated directly in build directory to avoid
copy step.
Remove redundant include of header as source file.
Copy link
Contributor

@alexbatashev alexbatashev left a comment

Choose a reason for hiding this comment

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

Fantastic improvement! Thanks!

@vladimirlaz
Copy link
Contributor Author

Fantastic improvement! Thanks!

All kudos to @tcreech-intel who suggested the patch

@bader bader merged commit 88f8e38 into intel:sycl Oct 6, 2021
vladimirlaz added a commit that referenced this pull request Oct 7, 2021
This is follow up for #4710

When a sub-directory of the DEPENDS directories is modified the change is not
detected by CMake. The change adds a full list of files in the sub-directory to
DEPENDS to detect the change. file(GLOBE_RECURSE) is used with
CONFIGURE_DEPENDS option to rerun configure step if a new entry is added to
the directory structure.
Restore version.hpp in source directory as it is used to build SYCL
library.

Removing a header file is the only case when change is not propagated to
the build and install directory. This problem existed before the change and
TODO was left to fix it in the future.
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