Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spearow/juice
The Hacker's Machine Learning Engine
https://github.com/spearow/juice
agnostic coaster cuda extinsible framework hacktoberfest juice machine-learning opencl rust
Last synced: 3 months ago
JSON representation
The Hacker's Machine Learning Engine
- Host: GitHub
- URL: https://github.com/spearow/juice
- Owner: fff-rs
- Created: 2017-01-14T21:27:49.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-30T07:32:55.000Z (6 months ago)
- Last Synced: 2024-05-10T11:07:39.999Z (6 months ago)
- Topics: agnostic, coaster, cuda, extinsible, framework, hacktoberfest, juice, machine-learning, opencl, rust
- Language: Rust
- Homepage:
- Size: 37.2 MB
- Stars: 1,090
- Watchers: 35
- Forks: 76
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
- awesome-rust-zh-cn - spearow/juice - 黑客适用的机器学习引擎(以前称为[autumnai/leaf](https://github.com/autumnai/leaf))。 (人工智能(Artificial Intelligence) / 机器学习(Machine Learning))
- awesome-rust-cn - spearow/juice
- awesome-rust-list - Juice
- awesome-rust-list - Juice
README
# Juice
This is the workspace project for
* [juice](https://github.com/spearow/juice/blob/master/juice/README.md) - machine learning frameworks for hackers
* [coaster](https://github.com/spearow/juice/blob/master/coaster/README.md) - underlying math abstraction
* [coaster-nn](https://github.com/spearow/juice/blob/master/coaster-nn/README.md)
* [coaster-blas](https://github.com/spearow/juice/blob/master/coaster-blas/README.md)
* [greenglas](https://github.com/spearow/juice/blob/master/greenglas/README.md) - a data preprocessing framework
* [juice-examples](https://github.com/spearow/juice/blob/master/juice-examples/README.md) - mnist demoPlease consult the individual README.md files for more information.
## [Juice](https://github.com/spearow/juice) Examples
CLI for running [juice](https://github.com/spearow/juice) examples. More examples and benchmark tests can be found at the [juice examples directory](https://github.com/spearow/juice#examples).
### Install CLI
**DISCLAIMER: Currently both CUDA and cuDNN are required for the examples to build.**
Compile and call the build.
```bash
# install rust, if you need to
curl -sSf https://static.rust-lang.org/rustup.sh | sh
# download the code
git clone [email protected]:spearow/juice.git && cd juice/juice-examples
# build the binary
cargo build --release
# and you should see the CLI help page
../target/release/juice-examples --help
# which means, you can run the examples from the juice-examples README
```### Dependencies
#### Cap'n'Proto
[capnproto is a data interchange format](https://capnproto.org/) that is used to store and load networks with weights for [Juice](https://github.com/spearow/juice/juice).
`capnproto` and `capnproto-libs` plus their development packages are the ones needed from your package manager.
#### Cuda
Getting the cuda libraries up poses to be the first road-block many users face.
To get things working one needs to set the following environment variables:
```zsh
# examplary paths, unlikely to work for your local setup!
export CUDNN_INCLUDE_DIR=/opt/cuda/include
export CUDNN_LIB_DIR=/opt/cuda/targets/x86_64-linux/lib/
export CUBLAS_INCLUDE_DIR=/opt/cuda/include
export CUBLAS_LIB_DIR=/opt/cuda/targets/x86_64-linux/lib/
```depending on __your local__ installation setup.
The currently supported cuda version is `cuda-11` (details in #114 and #115 )
Note that you need a capable nvidia device in order to _run_ the cuda backend.
#### OpenCL
You need the apropriate loader and device libraries. Since the `OpenCL` backend is still WIP, this will be detailed at a later point of time.
#### BLAS
Blas is a linear algebra used by the `native` backend.
`openblas` or `blas` is required to be present. Choose explicitly via `BLAS_VARIANT`.
By default an attempt is made to resolve the library via `pkg-config`.
Overriding via
```zsh
# examplary paths, unlikely to work for your local setup!
export BLAS_LIB_DIR=/opt/blas/lib64/
export BLAS_INCLUDE_DIR=/opt/blas/include/
```is also supported.
Linkage for the blas library variant is determined by setting `BLAS_STATIC` to `1` or unsetting `BLAS_STATIC`.
##### ArchLinux users
ArchLinux `openblas` package doesn't include LAPACK symbols (see [FS#66092](https://bugs.archlinux.org/task/66092)), so if you try to use it, you'll get multiple `cblas_*` unresolved symbols.
Replace `openblas` with AUR's `openblas-lapack` package to fix.