Skip to content

stdfox/xnn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

xnn

Crates.io Documentation License

A lightweight ML framework built from scratch in Rust with GPU-first architecture.

Features

  • GPU acceleration via wgpu (Vulkan, Metal, DX12)
  • Element types: f32, i32, u32
  • Cross-platform: Linux, macOS, Windows
  • Automatic compute pipeline caching
  • No unsafe code

Feature flags

Flag Description
unstable-kernels Exposes the low-level kernel module

unstable-kernels

The kernel module provides raw GPU compute kernels (GEMM, transpose, element-wise ops, etc.). These are internal building blocks not intended for direct use:

  • Kernels panic on invalid input (no Result return)
  • API may change without notice
  • A stable, user-friendly tensor API will be provided in the future

Enable only if you need low-level GPU access and understand the risks:

[dependencies]
xnn = { version = "0.1", features = ["unstable-kernels"] }

Examples

Examples require the unstable-kernels feature flag.

Linear regression

Trains a simple linear model to fit y = 2x + 1.

cargo run --release --features=unstable-kernels --example linreg

XOR

Trains a 2-layer neural network to solve the XOR problem.

cargo run --release --features=unstable-kernels --example xor

License

MIT — see LICENSE for details.

About

gpu goes brrr......

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages