Skip to content

Cmake incremental builds improvement #1586

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

Closed
wants to merge 2 commits into from

Conversation

oleksandr-pavlyk
Copy link
Contributor

Avoid installing header files which are formed during building steps.

During installation the files are not changed, but timestamps get updated prompting incremental cmake build to do full build instead.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

Copy link

github-actions bot commented Mar 8, 2024

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@coveralls
Copy link
Collaborator

coveralls commented Mar 8, 2024

Coverage Status

coverage: 87.832%. remained the same
when pulling fd1d43c on cmake-incremental-builds
into 80f4f30 on master.

Copy link

github-actions bot commented Mar 8, 2024

Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_70 ran successfully.
Passed: 906
Failed: 0
Skipped: 94

@@ -280,7 +280,7 @@ set_target_properties(DPCTLSyclInterface

if (SKBUILD)
set(_lib_destination dpctl)
set(_include_destination dpctl/include/syclinterface)
set(_include_destination ${CMAKE_INSTALL_PREFIX}/unused)
Copy link
Contributor

Choose a reason for hiding this comment

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

What is this change doing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Avoiding that syclinterface header, which are copied to dpctl/include/syclinterface as part of build step be overwritten by the install. The install just puts them in _skbuild/*/cmake-install/unused folder, and setuptools does not copy them into the Python layout, and instead copies files from dpctl/include/syclinterface like intended.

Copy link
Contributor

Choose a reason for hiding this comment

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

Then why is this step needed all together? Will it not work, if the line is completely removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This value is used in subsequent 3 install commands.

Removing this line would require moving these install commands inside if/else branch. It would make the script longer, but it can be done

@oleksandr-pavlyk oleksandr-pavlyk marked this pull request as ready for review March 9, 2024 19:00
@oleksandr-pavlyk
Copy link
Contributor Author

I suggest we merge this to improve incremental builds, and improvements from @ZzEeKkAa in gh-1587 could be added when ready.

@oleksandr-pavlyk oleksandr-pavlyk force-pushed the cmake-incremental-builds branch from f01bc83 to 787524c Compare March 14, 2024 12:24
Copy link

Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_107 ran successfully.
Passed: 905
Failed: 1
Skipped: 94

@oleksandr-pavlyk oleksandr-pavlyk marked this pull request as draft March 14, 2024 21:40
@oleksandr-pavlyk
Copy link
Contributor Author

The gh-1587 is coming along nicely, so this PR is largely obsolete. Keeping it around until gh-1587 gets merged though.

Installing them updates time-stamps on the files, and incremental
rebuild is always rebuilding, even though no files are changed.

With this change repeated invocation of `python scripts/build_locally.py`
is effectively a no-op.
@oleksandr-pavlyk oleksandr-pavlyk force-pushed the cmake-incremental-builds branch from 787524c to fd1d43c Compare March 15, 2024 03:38
Copy link

Array API standard conformance tests for dpctl=0.17.0dev0=py310h15de555_118 ran successfully.
Passed: 905
Failed: 1
Skipped: 94

@oleksandr-pavlyk oleksandr-pavlyk deleted the cmake-incremental-builds branch August 5, 2024 18:37
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