Simple experimental async GPGPU framework for Rust
EUPL-1.2 License
Published by UpsettingBoy almost 3 years ago
New gpgpu
release! This revision includes, among other things, improvements of the API and the new integration with the ndarray
crate.
integrate-ndarray
feature for integration with ndarray
crateIntegration with ndarray
its been added with #3. I'm no expert using this crate so any comments are welcome!
ndarray
arrays to the GPU using GpuArray
objects. They save the dimensions of the array previous upload to the GPU.ndarray
example. It has some comments about its usage and problems.This changes are focused on improve the usability of gpgpu
, making more clear the asynchronous intent. The most important changes are:
gpgpu
(can be used from wgpu
). They are invoked every 10ms by default.GpuBuffer
and friends have both async and blocking methods:
read()
and read_blocking()
: Now it needs into an user provided buffer (#8).read_vec() and read_vec_blocking()
: Reads into a non-user allocated vector (ol' way).wgpu
: gpgpu
GPU objects can now be created from wgpu
ones using from_gpu_parts()
and converted back using into_gpu_parts
(#5).Program
which contains information about the shader, entry point and bindings (#4).Framework::default()
.wgpu
to 0.12.Full Changelog: https://github.com/UpsettingBoy/gpgpu-rs/compare/v0.1.0...v0.2.0
Published by UpsettingBoy almost 3 years ago
gpgpu
is a GPGPU compute framework built on top of wgpu
compute pipeline. It tries to be simple to use whilst being easy to integrate with wgpu
.
gpgpu
exposes some GPU objects with clearly defined methods for read and write data from / to the GPU. Some of these objects are:
GpuBuffer
: Homogeneous read-write (in shaders) buffer on the GPU.GpuUniformBuffer
: Homogeneous read-only (in shaders) buffer on the GPU. Perfect for small, readonly data.GpuConstImage
and GpuImage
: 2D homogeneous image on the GPU. The former is read-only, while the latter is write-only (in shaders).gpgpu
also exposes DescriptorSet
and Kernel
objects to make easier the management and reuse of binding groups and executions of shaders.
integrate-image
feature for integration with image
crateimage::ImageBuffer
to/from gpgpu::GpuImage
and gpgpu::GpuConsyImage
objects
image::ImageBuffer
and gpgpu::GpuImage
or gpgpu::GpuConsyImage
Using the env variable WGPU_BACKEND
, the gpgpu-rs
backend can be selected. Available options are:
WGPU_BACKEND='vk,gl'
image
and gpgpu
types, some unsafe
code was required. A review of this fragment is very much appreciated π (in src/features/integrate_image.rs
π).gpgpu
is enough for that (but still very lacking), I'll continue with that project, adding whatever I need for GPGPU computing back at gpgpu
. Any other idea is appreciated.Full Changelog: https://github.com/UpsettingBoy/gpgpu-rs/compare/v0.0.0-alpha.2...v0.1.0
Published by UpsettingBoy about 3 years ago
This new release includes the capability to convert image::ImageBuffer
from the image crate to gpgpu::GpuImage
objects and vice versa.
integration-image
feature flagimage::ImageBuffer
to/from gpgpu::GpuImage
objects
image::ImageBuffer
and gpgpu::GpuImage
Using the env variable WGPU_BACKEND
, the gpgpu-rs
backend can be selected. Available options are:
WGPU_BACKEND='vk,gl'
For the development of gpgpu-rs
a headless Vagrant box was created. It runs under Ubuntu 21.04. Only the OpenGL ES backend can be used.
For a complete list of the changes since the last release: https://github.com/UpsettingBoy/gpgpu-rs/compare/v0.0.0-alpha.1...v0.0.0-alpha.2
Since this version still not published in Crates.io, add it to your Cargo.toml
as follows:
[dependencies]
gpgpu = { git = "https://github.com/UpsettingBoy/gpgpu-rs", tag = "v0.0.0-alpha.2" }
image
and gpgpu-rs
types, some unsafe
code was required. A review of this fragment is very much appreciated π (in src/features/integrate_image.rs
π).gpgpu-rs
is enough for that (but still very lacking), I'll continue with that project, adding whatever I need for GPGPU computing back at gpgpu-rs
. Any other idea is appreciated.Published by UpsettingBoy about 3 years ago
This is the first "real" release of gpgpu-rs
, not an MVP yet but still usable.
gpgpu-rs
primitives + compute shaders
gpgpu-rs
primitives with wgpu pipelines (mainly graphic pipelines)All in all, I'm pretty happy with this release. I'm looking for comments on the API, if it is simple, easy to use, etc.