Skip to content

tensor4all/strided-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

290 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strided-rs

strided-rs is a Rust workspace for strided tensor views, kernels, and einsum. It is inspired by Julia's Strided.jl, StridedViews.jl, and OMEinsum.jl.

The recommended user-facing crate is strided-rs. Use individual crates such as strided-perm, strided-view, or strided-kernel directly when you need a smaller dependency surface or a lower-level API.

Workspace Layout

  • strided-rs: facade crate that re-exports the main workspace APIs
  • strided-traits: shared scalar and element-operation traits
  • strided-view: core dynamic-rank strided view/array types and metadata ops
  • strided-perm: cache-efficient tensor permutation / transpose
  • strided-kernel: cache-optimized elementwise/reduction kernels over strided views
  • strided-einsum2: binary einsum (einsum2_into) on strided tensors
  • strided-opteinsum: N-ary einsum frontend with nested notation and contraction-order optimization
  • mdarray-opteinsum: einsum wrapper for mdarray arrays (row-major ↔ column-major transparent conversion)
  • ndarray-opteinsum: einsum wrapper for ndarray arrays (direct strides passthrough)

Features

  • Dynamic-rank strided views (StridedView / StridedViewMut) over contiguous memory
  • Owned strided arrays (StridedArray) with row-major and column-major constructors
  • Lazy element operations (conjugate, transpose, adjoint) with type-level composition
  • Zero-copy transformations: permuting, transposing, broadcasting
  • Cache-optimized iteration with automatic blocking and loop reordering
  • Optional multi-threading via Rayon (parallel feature) with recursive dimension splitting

Installation

These crates are being prepared for crates.io publication, but this repository does not publish them automatically. Until a release is published, use workspace path dependencies:

[dependencies]
strided-rs = { path = "../strided-rs/strided-rs" }

After publication, use:

[dependencies]
strided-rs = "0.1"

Documentation

Generate API docs locally:

cargo doc --workspace --no-deps

Open docs locally:

open target/doc/index.html

CI also builds rustdoc on PRs and deploys workspace docs to GitHub Pages on main.

Quick Start

See the strided-rs Quick Start. The Rust example there is included in crate docs and verified by doctests in CI.

See each sub-crate README for detailed API examples and benchmarks:

Acknowledgments

This crate is inspired by and ports functionality from:

License

Licensed under either of:

  • Apache License, Version 2.0 (LICENSE-APACHE)
  • MIT license (LICENSE-MIT)

See NOTICE for upstream attribution (Strided.jl / StridedViews.jl are MIT-licensed).

About

Strided tensor views, kernels, and einsum

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages