← all repositories
hughperkins/tf-coriander

TensorFlow on GPUs NVIDIA forgot to support

A compatibility layer that compiles CUDA code to OpenCL 1.2, so TensorFlow runs on Radeon, Intel, and older hardware.

tf-coriander
Velocity · 7d
+0.2
★ / day
Trend
steady
star history

What it does

tf-coriander lets TensorFlow execute on any OpenCL 1.2 GPU—not just NVIDIA’s. It keeps TensorFlow’s source code untouched in CUDA, then transpiles it behind the scenes. CLBlast handles the matrix math. The result: a Mac with a Radeon Pro or an Ubuntu box with a K520 can run the same models.

The interesting bit

The heavy lifting isn’t in TensorFlow at all. Coriander, a separate project, compiles NVIDIA CUDA code into OpenCL. tf-coriander is essentially the integration glue that wires this into TensorFlow’s build. It’s a pragmatic hack around a hardware monoculture.

Key highlights

  • Runs on OpenCL 1.2 devices: AMD Radeon, Intel, and NVIDIA via alternate path
  • TensorFlow source stays 100% CUDA—no fork of core code
  • Uses CLBlast for BLAS operations
  • Tested on Mac Sierra (Radeon Pro 450) and Ubuntu 16.04 (NVIDIA K520)
  • Jenkins builds with downloadable wheels for certain commits

Caveats

  • “Should work theoretically on any OpenCL 1.2 GPU”—the README’s own words, so your mileage will vary
  • Feature coverage is partial; see doc/whats_working.md for specifics
  • Last significant release was 2017; maintenance status is unclear

Verdict

Worth a look if you’re stuck with non-CUDA hardware and need TensorFlow specifically. If you have a modern NVIDIA card, this adds complexity for no gain. For new projects on AMD GPUs, ROCm or DirectML are probably more current bets.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.