Skip to content

Conversation

cpcloud
Copy link
Contributor

@cpcloud cpcloud commented Oct 8, 2025

This PR adds a pixi environment for cuda-bindings

Copy link
Contributor

copy-pr-bot bot commented Oct 8, 2025

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@cpcloud cpcloud force-pushed the pixi-for-cuda-bindings branch 2 times, most recently from dc5b784 to 0583683 Compare October 8, 2025 20:05
Copy link
Collaborator

@kkraus14 kkraus14 left a comment

Choose a reason for hiding this comment

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

Requesting changes to ensure we don't merge before 0.4.0 release again 😆

cu13 = { features = ["all", "test"], solve-group = "cu13" }

[tool.pixi.build-dependencies]
cuda-toolkit = ">=13,<14"
Copy link
Collaborator

Choose a reason for hiding this comment

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

This pulls in a bunch of stuff we don't want. Can you reference the libraries in the all optional dependency group?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can't reference them in any sort automatic way, but does it matter since this is build-dependencies?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other thing is that including cuda-toolkit appears to set CUDA_HOME at build time, which I need to build cuda-bindings as part of environment activation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If there's a way to do that without including the kitchen sink, that'd be great!

Copy link
Collaborator

Choose a reason for hiding this comment

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

It matters for at least the cuda runtime library since we statically link that in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, ok. Then I'll have to figure out what's happening with CUDA_HOME and how that magically works with cuda-toolkit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I figured out the minimum set to build.

@cpcloud cpcloud force-pushed the pixi-for-cuda-bindings branch from 0583683 to 39c8ff6 Compare October 8, 2025 20:23
cuda-bindings = { path = ".", editable = true }

[tool.pixi.environments]
cu13 = { features = ["all", "test"], solve-group = "cu13" }
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does the all feature end up grabbing wheels or does it map to the proper conda packages as defined in build-dependencies below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All of the pyproject.toml integration maps to pypi-dependencies: https://pixi.sh/dev/python/pyproject_toml/#dependency-section

cu13 = { features = ["all", "test"], solve-group = "cu13" }

[tool.pixi.build-dependencies]
cuda-cudart-dev = ">=13,<14"
Copy link
Collaborator

Choose a reason for hiding this comment

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

In hindsight I think we need cuda-driver-dev since we look for cuda.h at build time as well

@cpcloud cpcloud force-pushed the pixi-for-cuda-bindings branch from abeb7cb to 4d8f41e Compare October 8, 2025 22:29
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