Skip to content

rrradd/rrad-sys

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rrad-sys

Rust bindings for:

  • XLA PJRT C API
  • MLIR HLO C API
  • StableHLO C API

Quick Start

./src/tool/setup.sh
source .env.build
cargo check

Generate only 1 or 2 binding sets:

# PJRT only
./src/tool/setup.sh --bindings pjrt

# PJRT + MLIR (skip StableHLO)
./src/tool/setup.sh --bindings pjrt,mlir

The build script (build.rs) generates:

  • pjrt_c_api.rs
  • mlir_hlo_c_api.rs
  • stablehlo_c_api.rs

in Cargo OUT_DIR.

Note

  • LLVM => LLVM 21
  • PJRT version is tied to the XLA checkout you point to with XLA_SRC_DIR.
  • StableHLO source is read from STABLEHLO_SRC_DIR (or auto-detected from XLA_SRC_DIR/bazel-xla/external/stablehlo).
  • Binding selection is controlled by RRAD_BINDINGS (all, pjrt, mlir, stablehlo, or comma-separated mix).
  • In this checkout, xla/pjrt/c/pjrt_c_api.h reports:
    • PJRT_API_MAJOR = 0
    • PJRT_API_MINOR = 96

About

rrad's xla raw rust bindings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors