Practical overview
When it fits
Use Candle when you want an ML framework for a Rust project and are prepared to follow its installation guidance and work with the relevant examples.
Who it is for
- Rust developers adding machine-learning functionality to applications.
- Developers exploring documented ML examples, including text, speech and vision tasks.
Documented uses
- Build Rust applications that use machine-learning components.
- Perform tensor operations such as matrix multiplication.
- Explore example implementations for model tasks including text generation, speech recognition, object detection and image segmentation.
Requirements & limits
The project is publicly available on GitHub under the Apache-2.0 license.
- Candle is written for the Rust ecosystem.
- The README documents a CPU tensor example and a CUDA device option that depends on installing Candle with CUDA support.
- The repository links browser demos and command-line examples for a range of model tasks.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Change the matrix multiplication example to use a CUDA GPU
Set the documented matrix multiplication example to use CUDA device 0.
Before you start
- Candle installed with CUDA support.
- The Rust matrix multiplication example with its device defined.
Steps
Replace
let device = Device::Cpu;withlet device = Device::new_cuda(0)?;.Use that device for the example’s tensor creation and multiplication.
Expected outcome
The example is configured to use CUDA device 0 for its tensors and multiplication.
Guide limitations
- The README specifies the CUDA-support prerequisite but does not document installation steps or GPU execution results.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 12 October 2026
- Original website title
- huggingface/candle · Official homepage title · retained in its source language

