Rust-CUDA VS rust-ndarray

Compare Rust-CUDA vs rust-ndarray and see what are their differences.

Rust-CUDA

Ecosystem of libraries and tools for writing and executing fast GPU code fully in Rust. (by Rust-GPU)

rust-ndarray

ndarray: an N-dimensional array with array views, multidimensional slicing, and efficient operations (by rust-ndarray)
Our great sponsors
  • talent.io - Download talent.io’s Tech Salary Report
  • Scout APM - Truly a developer’s best friend
  • SonarQube - Static code analysis for 29 languages.
  • InfluxDB - Build time-series-based applications quickly and at scale.
Rust-CUDA rust-ndarray
24 12
1,930 2,380
4.7% 2.0%
8.6 8.0
7 days ago 12 days ago
Rust Rust
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

Rust-CUDA

Posts with mentions or reviews of Rust-CUDA. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-04.
  • Brute forcing protected ZIP archives in Rust
    5 projects | reddit.com/r/rust | 4 Oct 2022
    With Rust-CUDA you can write Rust code to run on the GPU quite easily, long as the code is no_std (and you have a NVIDIA GPU).
  • Can Rust do Computer Graphics and ML?
    5 projects | reddit.com/r/rust | 15 Sep 2022
    There’s also https://github.com/Rust-GPU/Rust-CUDA
  • There is framework for everything.
    107 projects | reddit.com/r/ProgrammerHumor | 4 Aug 2022
  • C++ is making me depressed / CUDA question
    7 projects | reddit.com/r/rust | 20 Jul 2022
    And here's an example on how to add two floats using Rust-CUDA: https://github.com/Rust-GPU/Rust-CUDA/blob/master/examples/cuda/gpu/add_gpu/src/lib.rs
    7 projects | reddit.com/r/rust | 20 Jul 2022
    I can't say whether or not it works well, and seems maybe fiddly to install, but Rust-CUDA might work for you.
  • Does Rust still depend on LLVM?
    3 projects | reddit.com/r/rust | 18 May 2022
    Kinda - SPIR-V is an intermediate representation that can be consumed by graphics drivers and compiled down by them to the GPU's native code. In that sense it's more similar to emitting LLVM IR than e.g. x86 machine code. Similarly, Rust-CUDA emits NVVM IR, which is a subset of LLVM IR.
  • State of GPGPU in 2022
    4 projects | reddit.com/r/u_KestM | 27 Apr 2022
    Rust-GPU look promising, also Rust-CUDA, also I see OpenCL 3.0 wrapper
  • Silverblue loads nouveau instead of installed nvidia
    3 projects | reddit.com/r/silverblue | 12 Apr 2022
    rpm-ostree install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm sudo rpm-ostree uninstall akmod-nvidia sudo rpm-ostree install akmod-nvidia-470xx rpm-ostree kargs --append=rd.driver.blacklist=nouveau --append=modprobe.blacklist=nouveau --append=nvidia-drm.modeset=1 sudo systemctl reboot sudo rpm-ostree install nvidia-settings-470xx xorg-x11-drv-nvidia-470xx-power sudo rpm-ostree uninstall xorg-x11-drv-nvidia-cuda sudo rpm-ostree install xorg-x11-drv-nvidia-470xx-cuda sudo rpm-ostree install xorg-x11-drv-nvidia-470xx-devel sudo rpm-ostree install xorg-x11-drv-nvidia-470xx-cuda-devel sudo rpm-ostree install cuda-samples sudo rpm-ostree install vulkan-tools vkmark mesa-vulkan-devel sudo rpm-ostree install libshaderc-devel sudo rpm-ostree install clang clang-tools-extra libstdc++-devel sudo rpm-ostree install glib2-devel glib-devel avahi-gobject-devel sudo rpm-ostree install cairo-devel pango-devel gdk-pixbuf2-devel sudo rpm-ostree install graphene-devel gtk4-devel cairo-gobject-devel sudo systemctl reboot modinfo /usr/lib/modules/$(uname -r)/kernel/drivers/video/nvidia.ko | grep ^version find /usr/lib/modules -name nvidia.ko -exec modinfo {} \; sudo lspci -v | grep -A 20 VGA git clone https://github.com/Rust-GPU/Rust-CUDA.git git clone https://github.com/vulkano-rs/vulkano.git git clone https://github.com/Relm4/relm4.git glxgears glxinfo glxgears glxinfo vkcube vkcubepp ./teapot ./triangle ./occlusion-query ./interactive_fractal
  • [P] C++ Machine Learning Library Built From Scratch by a 16-Year-Old High Schooler
    3 projects | reddit.com/r/MachineLearning | 12 Feb 2022
  • Writing Vulkan SPIR-V shaders in C++?
    4 projects | reddit.com/r/vulkan | 12 Feb 2022
    Is Rust CUDA, "writing [...] GPU code fully in Rust" (from its "about" description), but still early in development, relevant?

rust-ndarray

Posts with mentions or reviews of rust-ndarray. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-04.
  • The Illustrated Stable Diffusion
    3 projects | news.ycombinator.com | 4 Oct 2022
    https://github.com/rust-ndarray/ndarray/issues/281

    Answer: you can’t with this crate. I implemented a dynamic n-dim solution myself but it uses views of integer indices that get copied to a new array, which have indexes to another flattened array in order to avoid duplication of possibly massive amounts of n-dimensional data; using the crate alone, copying all the array data would be unavoidable.

    Ultimately I’ve had to make my own axis shifting and windowing mechanisms. But the crate is still a useful lib and continuing effort.

    While I don’t mind getting into the weeds, these kinds of side efforts can really impact context focus so it’s just something to be aware of.

  • Any efficient way of splitting vector?
    2 projects | reddit.com/r/rust | 12 Sep 2022
    In principle you're trying to convert between columnar and row-based data layouts, something that happens fairly often in data science. I bet there's some hyper-efficient SIMD magic that could be invoked for these slicing operations (and maybe the iterator solution does exactly that). Might be worth taking a look at how the relevant Rust libraries like ndarray do it.
  • Rust or C/C++ to learn as a secondary language?
    6 projects | reddit.com/r/Python | 9 Feb 2022
    ndarray and numpy crates provide good way to operate on numpy ndarrays from python
  • Enzyme: Towards state-of-the-art AutoDiff in Rust
    3 projects | reddit.com/r/rust | 12 Dec 2021
    I don't think any of the major ML projects have GPU acceleration because ndarray doesn't support it.
  • Announcing Rust CUDA 0.2
    3 projects | reddit.com/r/rust | 5 Dec 2021
    Not sure about ndarray: https://github.com/rust-ndarray/ndarray/issues/840
  • Signal processing library
    7 projects | reddit.com/r/rust | 6 Nov 2021
    I used basic_dsp a while back and found it lacking. I was hoping to find something that uses the ndarray datatype but i'm not seeing this yet. If you're primarily trying to learn though it might not really matter which library you contribute to. As for myself, I just picked the one that was most used and actively worked on at the time. However I keep an eye out on other libraries; if I see something take off, I might switch over. Either way you'll learn and can point to it as work accomplished.
  • Searching help for Rust Image Manipulation
    2 projects | reddit.com/r/rust | 31 Jul 2021
    Most libraries use either an older C/C++ dynamically or statically. I was looking into maybe rewriting some image manipulation functions in Rust using ndarray (which would then allow for both hardware, gpu and multithreading acceleration), but it would take a very long to get fully into the subject.
  • Dumb question: I want to overload operators like add on structs, what is the name for what I'm trying to do?
    3 projects | reddit.com/r/learnrust | 30 Apr 2021
    The best way would to use a crate for this, such as ndarray, which provides some good ways to do this.
  • Making Maintaining Easier
    5 projects | reddit.com/r/rust | 25 Apr 2021
    First, let me explain a crate, where old dependencies do matter. There is one very handy crate called nshare. It's used for converting images into ndarrays. The libraries between nshare converts are regularly updated, for example to support new formats or to make the usage more convenient. If one writes a new software there could be conflicts in versions of ndarray (for example), so we make sure, that nshare is always up-to-date and works with the newest versions in order to build the best code on it. Another example could be everything cryptographic. If there would be a security issue with ring we really want every dependent to be updated.
  • Linfa has a website now!
    4 projects | reddit.com/r/rust | 8 Mar 2021
    well you can represent categorical values in `ndarray` for sure (even structured arrays [here](https://github.com/rust-ndarray/ndarray/issues/32)), but the memory has to be contiguous for BLAS/LAPACK and therefore it is impossible to mix continuous and categorical values. I was thinking that we could emulate categorical values with a descriptor field for the type of each feature and then just use floats to represent them.

What are some alternatives?

When comparing Rust-CUDA and rust-ndarray you can also consider the following projects:

nalgebra - Linear algebra library for Rust.

wgpu - Safe and portable GPU abstraction in Rust, implementing WebGPU API.

image - Encoding and decoding images in Rust

rust-gpu - 🐉 Making Rust a first-class language and ecosystem for GPU shaders 🚧

neuronika - Tensors and dynamic neural networks in pure Rust.

utah - Dataframe structure and operations in Rust

dasp - The fundamentals for Digital Audio Signal Processing. Formerly `sample`.

linfa - A Rust machine learning framework.

CUDA.jl - CUDA programming in Julia.

PySCIPOpt - Python interface for the SCIP Optimization Suite

fundsp - Audio DSP library for audio processing and synthesis

nshare - Provides an interface layer to convert between n-dimensional types in different Rust crates