Expand description
Experimental StableHLO lowering and runtime PJRT plugin loading for tenferro.
This crate is an optional peer executor over tenferro-runtime
GraphProgram values. It does not
implement TensorBackend and it does not change native CPU, CUDA, or
WebGPU execution.
§Examples
use tenferro_runtime::{GraphCompiler, TracedTensor};
use tenferro_xla::lower_to_stablehlo;
let x = TracedTensor::from_vec_col_major(vec![2], vec![1.0_f64, 2.0]).unwrap();
let y = (&x + &x).unwrap();
let mut compiler = GraphCompiler::new();
let program = compiler.compile(&y).unwrap();
let module = lower_to_stablehlo(&program).unwrap();
assert!(module.as_str().contains("stablehlo.add"));Structs§
- Pjrt
Plugin - Dynamically loaded PJRT plugin.
- Stable
HloModule - StableHLO MLIR module text plus a deterministic fingerprint.
- Stable
HloModule Fingerprint - SHA-256 fingerprint of StableHLO module text.
- XlaExecutor
- Experimental peer executor for XLA/PJRT.
- XlaExecutor
Options - Options for the experimental XLA executor.
Enums§
- Error
- Error type for StableHLO lowering and runtime PJRT plugin loading.
Constants§
- TENFERRO_
PJRT_ GPU_ PLUGIN_ ENV - Environment variable used for a GPU-specific PJRT plugin path.
- TENFERRO_
PJRT_ PLUGIN_ ENV - Environment variable used for the default PJRT plugin path.
Functions§
- lower_
to_ stablehlo - Lower a static-shaped graph program to StableHLO MLIR text.
Type Aliases§
- Result
- Result alias for
tenferro-xla.