Skip to content

Add Cuda support#108

Open
tychedelia wants to merge 2 commits intoprocessing:mainfrom
tychedelia:cuda
Open

Add Cuda support#108
tychedelia wants to merge 2 commits intoprocessing:mainfrom
tychedelia:cuda

Conversation

@tychedelia
Copy link
Copy Markdown
Member

@tychedelia tychedelia commented Apr 7, 2026

Adds support for Cuda.

For the most part, this means doing some copies into external memory that can be used by Cuda and vice-versa.

We expect the user to have installed Cuda (min version 11040) and are using dynamic linking.

Our Python iterop is via __cuda__array__inter.

Some substantive changes to the rest of the code base are the elimination of ImageTextures and GraphicsTargets. These were attempts to pipe gpu resources from the render world to the main world to make accessing gpu resources in the main world easier. We take a new approach here and instead just eagerly look up those resources in the render World and pass them as arguments to stuff as needed.

To test

You can run just py-run cuda.py --features="cuda" in order to test the cuda example, or open the repl with mewnala installed and call .cuda() on an image created with create_image.

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.

1 participant