Skip to content

Safe and Performant Scientific Computing Library

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

saivishwak/flowtorch

Repository files navigation

FlowTorch

Latest version Documentation License codecov

Safe and Performant Scientific Computing Library.

Right now the library is still in research phase where I am taking time to understand the internal implementations of Candle and Pytorch by reimplementing them. For production usage please try out Candle because its really awesome.

====

Todo

  • Add Tensor::new method to create a Tensdor from data
  • Fix shape similar to PyTorch
  • Provide default contiguous layout - C type (Row Major)
  • Implement view and reshape in Layout
  • Add Proper Error Handling (https://github.com/dtolnay/thiserror)
  • Add Arc and Rw::Lock for Storage in Tensor
  • Implement Display for Tensor to print the matrix
  • Implement Indexing which return a tensor
  • Refactor indexing
  • Add tuple with range indexing
  • Fix Pretty Printing of Tensor
  • Fix Display with PrintOptions
  • Add I32 data type
  • Add Baisc Docs for Tensor
  • Add Tests for Narrow and Squeeze,
  • Add macros and optimze code for ops
  • Add Basic Binray Ops to Tensor
  • Add basic unary ops
  • Add Basic CUDA Device support
  • Add Basic CUDA Ops
  • Add to_device method support for converting the device of Tensor
  • Refactor Error::Unknown and fix todo
  • The Array trait implementation right now is doing many recurssive operations, can we minimize it?
  • Combine common tests for different devices
  • Add to_dtype method to convert the data type
  • Add strided index in CPU and CUDA
  • Ops to use strided index for CPU and CUDA
  • Fix Comp Op and Broadcasting
  • Add Basic Back Prop
  • Add other Ops like Pow, Matmul, Add types for Unary CUDA Ops in kernel
  • Add in place Binary and Unary ops (ex, tensor.add_, tensor.abs_)
  • Impl flatten https://pytorch.org/docs/stable/generated/torch.flatten.html (this should when used to_vec1 give 1D array of strided indexed elements)
  • Add Tensor.to_vec methods, to get different dim vectors
  • Improve Code Coverage
  • Fix select_index method
  • Add Benchmarking (https://github.com/bheisler/criterion.rs)
  • Support Fotran Memory layout (colum Major)
  • Study Torch7 Library and how Storage, Tensor is implemented

===

Future Todo

  • flowtorch-nn crate for Neural Net Utilities and Layers
  • Inference MNIST
  • Inference ImageNet Model
  • Inference BERT/LLM's
  • Add basic autograd functionality
  • Train and Test a simple MNIST example
Setup

Running Tests for CUDA

cargo test --features "cuda" -- --nocapture 

Running Coverage

# Without CUDA
cargo tarpaulin --verbose --workspace --timeout 120 --out Html
# With CUDA
cargo tarpaulin --features="cuda" --verbose --workspace --timeout 120 --out Html

To excule cuda_backend from coverage for non cuda environment (GithubActions)

cargo tarpaulin --verbose --workspace --timeout 120 --out Html --exclude-files "crates/flowtorch-core/src/cuda_backend/**/*"

About

Safe and Performant Scientific Computing Library

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published