Deep learning in Rust, with shape checked tensors and neural networks.

github.com/coreylowman/dfdx
dfdx homepage screenshot

About dfdx

dfdx is a deep learning library written in Rust. It focuses on tensor shapes and types that are checked at compile time, so that some shape mismatches are caught before the code runs. The library provides tensors with GPU acceleration, a set of tensor operations, neural network building blocks, and optimizers. The project is in a pre-alpha state, and the maintainers have said the next few releases are planned to be breaking releases. The source lists version 0.13.0 as available on crates.io.

Key features

  • GPU-accelerated tensor library with shapes up to six dimensions
  • Tensor shapes with both compile-time and runtime-sized dimensions
  • Tensor operations checked for shape and type at compile time
  • Neural network building blocks such as Linear, Conv2D, and Transformer
  • Optimizers including Sgd, Adam, AdamW, and RMSprop
  • Optional CUDA device support enabled through a cargo feature flag
Best for: Rust developers who want to build neural networks with tensor shapes checked at compile time and who can accept API changes while the project is pre-alpha.
Good for
  • States compile-time checking of shapes and types as a design goal
  • Lists ergonomics and performance among its stated design goals
  • Reports that the only current unsafe calls are for matrix multiplication
Watch out for
  • The project is in a pre-alpha state, and the next few releases are planned to be breaking
  • CUDA support requires installing NVIDIA's CUDA toolkit
  • Contains unsafe code for matrix multiplication

dfdx at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Not stated
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

dfdx alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in AI Infrastructure & MLOps

Well-known listings from the same topic.

All 341

dfdx FAQ

How do I add dfdx to a Rust project?
Add dfdx = "0.13.0" to your Cargo.toml file. The source says the documentation is at docs.rs/dfdx.
What is required to use GPU acceleration with CUDA?
Enable the cuda feature. The source says this requires the installation of NVIDIA's CUDA toolkit.
Is the API stable?
No. The source says the project is still in a pre-alpha state and the next few releases are planned to be breaking releases.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing