-
Notifications
You must be signed in to change notification settings - Fork 157
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
Refactor build system #287
Conversation
Hey @COM8 - thank you for this PR, this all sounds great. Here's a couple of comments on the proposed actions:
I also cleaned up all CMake options related to dependencies and fixed a few bugs here and there to solve 2.
My main suggestion would be to do this in iterative chunks, as opposed to a massive PR, mainyl to avoid potentially a situation where there's too much at once. Only mentioning this as I've started to see some changes in the git jobs, which I actually do like, but mainly to break down into different PRs so it's simpler/smoother to merge. |
Agree with all of your points, Then I will keep this PR open as "current" stat and as soon as I'm happy with the result, I will create smaller PRs. |
When I tried splitting up my changes into multiple smaller PRs I noticed a lot of other stuff needing to be fixed. So basically I'm planing to do a rewrite of the complete build system over at my fork: https://github.com/COM8/kompute This will roughly take me one month and since especially the Makefile stuff is not really portable I plan to integrate what ever possible directly into CMake e.g. compiling shaders: https://github.com/COM8/movement-sim/blob/main/cmake/vulkan_shader_compiler.cmake I will the try to outline every breaking change I did and why it was necessary in a clear manner and try to get in touch with you in case I need to change anything large. |
Ok interesting @COM8 - I would still be keen to look towards merging the initial improvements in an iterative way where possible, as I like already some of the ideas on moving away from git modules as that would already make it much better. Certianly if you do need a hand let me know - happy to help here, or you can also join the discord and I am active there for any questions |
fetch_content
and CMake cleanup
This PR is now ready for its first review.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @COM8 - thank you so much for investing the time to having an initial look, the work so far is great! Apologies I didn't get through this before, I actually completely missed your comment saying ti was ready for review - I have done a first pass of comments, overall the core additions are great in principle, the main things that we'll have to consider are:
- Ensuring spdlog is still an optional dependency
- Validate the need for helper components in the logger files
- Discuss further the separation of various components into different libraries
- Explore simplify the shader compilation (ie compile all shaders in a single folder instead of one by one)
- Making shader compilation optional
Once again awesome effort - I will do a deeper dive later today, if you provide thoughts on the comments I can also provide deeper detial as required.
I'm currently testing locally and I'm getting
Have you seen this before? Would it be due to the version of my vulkan setup? |
Hmmm, I have never seen such an error before. But I see a potential error in |
Just tried from the latest to build but it seems it gets frozen iwth infinite loop on:
Wondering if the trailing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one - I added a couple more comments. Overall the new amendments are great. I have given it more thought on specifically the logger module, and added a few suggestions that may need rethinking on that part specifically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one with updates, it seems it's getting closer, I was now able to run the build and start compiling some of the tests. I added a couple of extra comments and questions on build errors as well as how tests can be run. There's still the outstanding question on the logger, but as suggested we can discuss during the next community call - i also replied on the community discord with suggestion for other times that could work as an alternate. Let me know if you have any thoughts ahead of then.
@axsaucedo Is there anything else I can do on this PR? |
@COM8 thank you for following up - just pinged on Discord, I will be keen to merge soon, planning to do a pass asap in the next / following week |
@COM8 I am thinking of merging this quite soon to make sure we can get the ball rolling on the rest of the PRs, however I can't seem to get the Android examples working unfortunately - are you able to run these example successfully on your end? |
Nope, never have tried compiling them for android since I have no toolchain set up for this. But I can try to set up one if this helps. |
That would be great if you get a chance @COM8 - I will be diving into it during the weekend as well to get this and the rest of the examples working correctly, I want then to move towards merging so any further changes can be done from master as there's already also some other interesting PRs to explore (Such as upgrading to vulkan 1.3) |
ACK, will try to work on it during the next week. |
Quick update: I got it almost up and running. Just some minor things like fixing the Vulkan function templates still left to do. |
@COM8 that's fantastic news! It would be really helpful if you do manage to get it through as for some reason I'm still having issues in my set up - no worries at all tho, great to hear you're looking to finish/wrap your theses, hopefully I am able to finalise it before then but otherwise we can have a look once you get a chance again |
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
cf65cb6
to
6b6984a
Compare
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
@axsaucedo it is done! I'm looking into this one right now. Could you please confirm quickly it's also building on your system? |
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
Signed-off-by: Fabian Sauter <sauter.fabian@mailbox.org>
Done. Now everything works. Ready for a final review. |
That's fantastic @COM8 ! I am just back from a conference this week so I will be able to review and rerun all the examples. PS Hope everything went smooth with the thesis |
Great to hear. Yes, from my side everything worked perfectly! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@COM8 I have finally been able to test every single example and I have to say that this contribution is beyond fantastic - the additions and improvements to the project are really taking the project to the next level. I am very keen on expanding from this great work, I will highlight this contribution with the linux foundation group, and it gets us a significant step closer to full graduation as a project.
Thank you very much for persevering on this great contribution Fabian, it's a truly appreciated contribution!
# Consume Kompute via CMake fetch_content | ||
include(FetchContent) | ||
FetchContent_Declare(kompute GIT_REPOSITORY https://github.com/KomputeProject/kompute.git | ||
GIT_TAG f4d72e2aa7b23ffe05d5ea3191bf72ad00def0ec) # The commit hash for a dev version before v0.9.0. Replace with the latest from: https://github.com/KomputeProject/kompute/releases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO replace once this is in master
set(VK_ANDROID_INCLUDE_DIR ${ANDROID_NDK}/sources/third_party/vulkan/src/include) | ||
include(FetchContent) | ||
FetchContent_Declare(kompute GIT_REPOSITORY https://github.com/COM8/kompute.git | ||
GIT_TAG 675f6dc771cea044ead99a5467a9b817c2d8feb6) # The commit hash for a dev version before v0.9.0. Replace with the latest from: https://github.com/KomputeProject/kompute/releases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: as comment suggests we'll replace with tag
Why this PR?
I have a couple of problems with the current way Kompute handles dependencies:
VULKAN_HPP_ASSERT( d.getVkHeaderVersion() == VK_HEADER_VERSION );
Proposed Solutions
fetch_content
KOMPUTE_OPT_REPO_SUBMODULE_BUILD
withKOMPUTE_OPT_USE_BUILD_IN_{SPDLOG, VULKAN_HEADER, ...}
and added a deprecation warning for the old way.KOMPUTE_OPT_BUILD_IN_VULKAN_HEADER_TAG
which allows consumers to set their specific Vulkan-Header version.check_vulkan_version
to CMake that checks if your hardware supports for example Vulkan 1.3 if you link against Vulkan-Headers 1.3 and prints a warning if only the patch version of your hardware is < that the Vulkan-Header version. There is also an option to disable this:KOMPUTE_OPT_DISABLE_VULKAN_VERSION_CHECK
What is left to do?
Things that need to be done once the PR has been merged
Let me know what you think about this.