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

Skip compute-runtime fetch #2494

Open
arunoruto opened this issue Dec 20, 2024 · 3 comments
Open

Skip compute-runtime fetch #2494

arunoruto opened this issue Dec 20, 2024 · 3 comments

Comments

@arunoruto
Copy link

arunoruto commented Dec 20, 2024

I am currently trying to build llvm on NixOS, so I can package dpc++ for nixpkgs. To do so, I need to prefetch everything, and it is not allowed to fetch it otherwise by other means (due to it not being 100% reproducible). I usually fix things setup by setup, but I am stuck now at this line:

FetchContent_Populate(exp-headers)

Usually, it is possible to specify the source directory of a dependency, like UR_LEVEL_ZERO_LOADER_LIBRARY, which is an option in the same file. This isn't the case for the compute-runtime, which seems to be fetched from GitHub. Is there a possibility of skipping this using a CMake option?

My only other option is to make a patch and delete those lines, which is usually a last resort.

If someone is interested, here is my nix file for creating the derivation for building dpcpp so far.

@pbalcer
Copy link
Contributor

pbalcer commented Dec 20, 2024

We could just add an option to specify compute-runtime include dir. But I'm wondering, @againull, your patch added this. It looks like we use only two small structs from that entire repo. I'm wondering whether it wouldn't be better to just copy/paste it, given that it's an experimental API that will should make its way into the level-zero API if it gets stabilized.

@arunoruto
Copy link
Author

We could just add an option to specify compute-runtime include dir. But I'm wondering, @againull, your patch added this.

I don't see a way to bypass fetching in that patch. Maybe I am missing something...?

It looks like we use only two small structs from that entire repo. I'm wondering whether it wouldn't be better to just copy/paste it, given that it's an experimental API that will should make its way into the level-zero API if it gets stabilized.

Is there a reason why the project isn't using submodules? Instead of fetching the items via git, they could be provided in the repository. The only thing that needs to be taken care of is to make sure to also fetch the submodules when cloning. Custom folders could still be provided and fetching all needed provided directories could be done with one command instead of letting it being handled by cmake files.

@againull
Copy link
Contributor

We could just add an option to specify compute-runtime include dir. But I'm wondering, @againull, your patch added this. It looks like we use only two small structs from that entire repo. I'm wondering whether it wouldn't be better to just copy/paste it, given that it's an experimental API that will should make its way into the level-zero API if it gets stabilized.

We are doing sparse fetching (we don't fetch entire rpo), i.e. we currently fetch only header files with those structs and don't fetch anything else.

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

No branches or pull requests

3 participants