Conversation
|
I am able test this! I can run $ python ./examples/cuda.py
2026-04-08T04:17:38.103700Z WARN bevy_asset::io::source: Skip creating file watcher because path "/home/jim/INSTALL/anaconda3/bin/assets" does not exist.
2026-04-08T04:17:38.103715Z WARN bevy_asset::io::source: AssetSourceId::Default does not have an AssetWatcher configured. Consider adding an "assets" directory.
2026-04-08T04:17:38.205259Z INFO bevy_render::renderer: AdapterInfo { name: "NVIDIA GeForce RTX 4090", vendor: 4318, device: 9860, device_type: DiscreteGpu, device_pci_bus_id: "0000:01:00.0", driver: "NVIDIA", driver_info: "590.48.01", backend: Vulkan, subgroup_min_size: 32, subgroup_max_size: 32, transient_saves_memory: false }
2026-04-08T04:17:38.367188Z ERROR bevy_asset: AssetSourceId::Name(assets_directory) must be registered before `AssetPlugin` (typically added as part of `DefaultPlugins`)
2026-04-08T04:17:38.367206Z ERROR bevy_asset: AssetSourceId::Name(sketch_directory) must be registered before `AssetPlugin` (typically added as part of `DefaultPlugins`)
2026-04-08T04:17:38.375032Z INFO bevy_pbr::cluster: GPU clustering is supported on this device.
2026-04-08T04:17:38.375067Z INFO bevy_render::batching::gpu_preprocessing: GPU preprocessing is fully supported on this device.
2026-04-08T04:17:38.375867Z ERROR bevy_asset::server: Asset Source 'AssetSourceId::Name(sketch_directory)' does not exist
Segmentation fault (core dumped)The Segmentation fault appears a few seconds after I exited the Sketch by closing the window. Getting the build to run took some time. This computer is a relatively fresh install of ElementaryOS and was missing a lot of headers needed for the compilation. ElementaryOS doesn't seem to have current versions of some necessary libraries. The package manager gives me version 1.21 of |
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
ImageTexturesandGraphicsTargets. 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 renderWorldand 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 withcreate_image.