Skip to content

torch_tvarant documentation

torch_tvarant is an out-of-tree PyTorch device backend for the Tvarant RISC-V SIMT GPGPU — targeting the Xilinx Alveo U55C FPGA accelerator.

It lets you write standard PyTorch code and run it on torch.device("tvarant"):

import torch
import torch_tvarant

x = torch.randn(4, 768, device="tvarant")
w = torch.randn(768, 768, device="tvarant")
y = torch.nn.functional.relu(x @ w)

Key features

  • CPU simulator — develop and test without hardware
  • OpenCL runtime — same Python API on POCL / FPGA path
  • LLM opssilu, softmax, bmm, layer_norm, embedding, and more
  • JIT compiler — fuse GEMM epilogues and pointwise chains for inference
  • Extensible — add kernels in C++/OpenCL and register ATen ops
Resource Link
Installation install.md
Getting started getting-started.md
API reference api/index.md
Architecture architecture.md
JIT compiler jit-compiler.md
Contributing contributing.md
GitHub samthakur587/Tvarant
Changelog CHANGELOG.md

License

Apache License 2.0 — see LICENSE.