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

Use CMake as primary build system via scikit-build #215

Merged
merged 28 commits into from
Mar 3, 2022

Conversation

clonker
Copy link
Member

@clonker clonker commented Mar 2, 2022

No description provided.

@codecov
Copy link

codecov bot commented Mar 2, 2022

Codecov Report

Merging #215 (d390d7c) into main (0898081) will decrease coverage by 0.02%.
The diff coverage is 25.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #215      +/-   ##
==========================================
- Coverage   93.75%   93.72%   -0.03%     
==========================================
  Files         136      136              
  Lines       10790    10794       +4     
==========================================
+ Hits        10116    10117       +1     
- Misses        674      677       +3     
Impacted Files Coverage Δ
deeptime/__init__.py 100.00% <ø> (ø)
deeptime/util/platform.py 88.46% <25.00%> (-11.54%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0898081...d390d7c. Read the comment docs.

deeptime/util/platform.py Outdated Show resolved Hide resolved
from numpy.distutils.core import setup

metadata['configuration'] = configuration
for i in (Path(__file__).resolve().parent / "_skbuild").rglob("CMakeCache.txt"):
Copy link
Collaborator

Choose a reason for hiding this comment

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

This stuff is worth a comment for future generations :)
What is being replaced here and why.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll put a comment there. For reference it is from scikit-build/scikit-build#521; if you build the library locally there is an _skbuild subdirectory in which the cmake cache sits and if you subsequently try to build the library via conda you might get a cache mismatch. But I guess it should be removed as soon as the issue is fixed and a new skbuild release is out.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So it is already an optimization workaround?

Copy link
Member Author

Choose a reason for hiding this comment

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

it's a workaround you only need if you first build the pip package and subsequently a conda package without removing the local build cache first 🙂

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean in principle I think a local cache directory should have absolutely no influence on a subsequent conda build but unfortunately it does 😕

Copy link
Collaborator

@marscher marscher left a comment

Choose a reason for hiding this comment

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

It makes total sense to replace the rudimentary OpenMP and releated detections with the advanced and sophisticated mechanism of CMake/Ninja.

As the project already depend on CMake this transition makes the whole build process more bullet proof and elegant.

I just wonder what the final invocation in setup.py main function really does. It is very obscure to me.

@marscher
Copy link
Collaborator

marscher commented Mar 3, 2022

I suggest to use pytest-xdist with two jobs on Azure to speed up the testing process.

@clonker
Copy link
Member Author

clonker commented Mar 3, 2022

Thanks for the thorough review!

@clonker clonker merged commit b3efe88 into deeptime-ml:main Mar 3, 2022
@clonker clonker deleted the cuda_installation_problem branch March 3, 2022 12:17
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.

2 participants