Skip to content
borodarkPublic

About

The only Nx GPU backend that runs on FreeBSD. Vulkan compute for Linux NVIDIA, FreeBSD mesa-radv.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

614 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nx.Vulkan

A GPU tensor backend for Nx, built on Vulkan. It runs wherever a Vulkan driver runs — Linux, FreeBSD, Windows, macOS via MoltenVK, ARM boards — which includes hardware CUDA has dropped and platforms Metal never reached.

# mix.exs
{:nx, "~> 0.13"},
{:nx_vulkan, "~> 0.4"}
Nx.default_backend(Nx.Vulkan.VulkanoBackend)

Nx.sigmoid(Nx.tensor([1.0, 2.0, 3.0, 4.0]))
#=> #Nx.Tensor<f32[4] [0.7310586, 0.8807971, 0.95257413, 0.98201376]>

Native f32 and f64 compute, whole-graph fusion, and working Nx.Defn.grad — for which no backward pass was ever written. Autograd is a graph transformation that runs above the backend, so forward op coverage is gradient coverage.

A LeNet training step took 20 929 ms on 0.2.0 and takes 84 ms now — same box, same graph, bit-identical loss. The difference was eight GPU fast paths gated on shapes only a forward pass produces.

The fleet

Every correctness claim here is green on all four of these. Every performance heuristic is raced on all four before it ships.

host GPU year OS arch
super-io RTX 3060 Ti (Ampere) 2021 Linux x86_64
mac-248 GT 750M (Kepler) 2013 FreeBSD x86_64
mac-247 GT 650M (Kepler) 2012 FreeBSD x86_64
jake-desktop Tegra X1, Jetson Nano 2015 Ubuntu aarch64

833 doctests, 931 tests, 0 failures on every one of them. Two CPU architectures, three operating systems, four GPU generations spanning 2012–2021, one set of SPIR-V binaries — and, where it is asserted, the same posterior bit for bit.

Two of those four boxes were abandoned by their vendor: CUDA 13 retired Kepler long ago, and the Jetson's CUDA support stopped at 10.2. Their Vulkan drivers did not stop. The Jetson is also the fleet's only unified-memory board, which makes it a natural control arm — a code path that exists because there is a PCIe bus is a no-op there, and more than one optimisation has been disproved by winning least on it. See docs/FLEET.md.

Where to go next

Start here

  • WHY.md — why this exists: the f64 conviction, reach over peak FLOPS, one GPU to a fleet
  • docs/CAPABILITIES.md — the op surface, the fusion compiler, how autograd came free
  • docs/BUILDING.md — install, prerequisites, the two examples worth running first

Before you trust a number

  • docs/STANDING.md — an honest position vs EXLA and EMLX, including where fusion loses
  • docs/BENCHMARKS.md — every measured figure with its method and its caveats
  • docs/FLEET.md — the hardware, and the optimisations a single box would have got wrong

Method

Ahead

Writing

Sibling: zed

zed is the declarative ZFS + Elixir deploy tool that orchestrates BEAM nodes. nx_vulkan is consumed inside deployed nodes, not as a zed dependency.

License

Apache 2.0. Same as Nx.

About

The only Nx GPU backend that runs on FreeBSD. Vulkan compute for Linux NVIDIA, FreeBSD mesa-radv.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages