Skip to content

Commit 1e0db77

Browse files
committed
feat/everything: introduce most of the changes for 0.2.0
1 parent 14cc654 commit 1e0db77

36 files changed

+3883
-865
lines changed

.travis.yml

+9-11
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,23 @@ rust:
66
- stable
77
matrix:
88
allow_failures:
9-
- rust: beta
10-
- rust: stable
119
- rust: nightly
12-
env: TRAVIS_CARGO_NIGHTLY_FEATURE=lint
10+
env: FEATURES=lint
1311
exclude:
1412
- rust: beta
15-
env: TRAVIS_CARGO_NIGHTLY_FEATURE=lint
13+
env: FEATURES=lint
1614
- rust: stable
17-
env: TRAVIS_CARGO_NIGHTLY_FEATURE=lint
15+
env: FEATURES=lint
1816
before_script:
1917
- |
2018
pip install 'travis-cargo<0.2' --user &&
2119
export PATH=$HOME/.local/bin:$PATH
2220
script:
2321
- |
24-
travis-cargo build &&
25-
travis-cargo test &&
26-
travis-cargo bench &&
27-
travis-cargo --only stable doc
22+
travis-cargo build -- --no-default-features --features $FEATURES &&
23+
travis-cargo test -- --no-default-features --features $FEATURES &&
24+
travis-cargo bench -- --no-default-features --features $FEATURES &&
25+
travis-cargo --only stable doc -- --no-default-features --features $FEATURES
2826
addons:
2927
apt:
3028
packages:
@@ -47,5 +45,5 @@ env:
4745
global:
4846
- secure: QcJ9u0BrVpvjYnerd/3dukvM+GLFQNikIoDHhtKjVenuM2ozZtW6+/RyyXVC1YMh/SghwTnu4Kcnv1sdmwuiC5KWdPoppfalXdxafPkl5PGEfTOexe6L5UAJNW6BdA4lbRKM3xnaUg0Guq6x6tD/zdABIkh8nym/gRLGKT40e9Xitkf6wUQqPBHTGZimip59qg5Fty8lAD48pCBEXynJm+ihA2tz6EDhp0/7wvieHyEl/FqNwvUL5+Z9EeTzEJfKNF8PA5DTHkgeXgeCnWKLm8cCdPEziRZlgdQtvIW27oZBkNTQGHyqI9/tVYhaW4AeKstzE5BoJuyRzmerWYRQCNiz8bgyAjc5HnpWLJPmPSFaGBWTRzwYwUk/iOUP4YEZiN3p0Xj1sKgSB0TA2AjKWND7cufwjrW8NdPdZ3hURVOnM8DHYSQMm2HOfbUNnkw+P5M8n+flT2HKWFdnPhJ3n12rDlLYdHeg9PQ3emJ6kE8Y/jrNT+6yZRrSwLQnsV0uU8Ii44MFQHpdUOGuOIxZFGh9rjKsUwhruUpGtbwI4FWPOqiQJvIaBFY1IUjIVlVCZevvIG3fPXvPksIEKwK93hM/ThDi2PLq2qwBpA87RNfKxDG4S0aR2j19IG+ludbpPcP95mYFVnGCb4rpj44iZoCifC8c9tVqC4L85hEGzik=
4947
matrix:
50-
- TRAVIS_CARGO_NIGHTLY_FEATURE=dev
51-
- TRAVIS_CARGO_NIGHTLY_FEATURE=lint
48+
- FEATURES=travis
49+
- FEATURES=lint

Cargo.toml

+27-4
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,35 @@ keywords = ["deep-learning", "neural-networks", "machine-learning", "framework"]
1414
license = "MIT"
1515

1616
[dependencies]
17-
phloem = "~0.3.0"
18-
collenchyma = "= 0.0.3"
19-
log = "~0.3.2"
17+
collenchyma = { version = "0.0.8", default-features = false }
18+
collenchyma-blas = { version = "0.2.0", default-features = false }
19+
collenchyma-nn = { version = "0.3.0", default-features = false }
20+
21+
log = "0.3.2"
22+
rand = "0.3.0"
23+
2024
clippy = { version = "0.0.41", optional = true }
2125

26+
timeit = "0.1.2"
27+
28+
[dev-dependencies]
29+
env_logger = "0.3"
30+
2231
[features]
23-
default = []
32+
default = ["native", "cuda", "opencl"]
33+
native = ["collenchyma/native", "collenchyma-blas/native", "collenchyma-nn/native"]
34+
cuda = ["collenchyma/cuda", "collenchyma-blas/cuda", "collenchyma-nn/cuda"]
35+
opencl = ["collenchyma/opencl", "collenchyma-blas/opencl", "collenchyma-nn/opencl"]
36+
37+
travis = ["native"]
2438
dev = []
39+
unstable = [] # for travis-cargo
2540
lint = ["clippy"]
41+
42+
[profile.bench]
43+
opt-level = 3
44+
debug = false
45+
rpath = false
46+
lto = false
47+
debug-assertions = false
48+
codegen-units = 1

README.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ such as feeding in data, logging, or returning results. You can use the layers
2222
that ship with Leaf (e.g. Convolutional, ReLU, RNN, SVM,
2323
etc.) or thanks to Rust, easily extend Leaf with your own layers.
2424

25-
Leaf strives for leading-edge performance
26-
([benchmarks are next][benchmarks-issue]), while providing a clear and
25+
Leaf strives for [leading-edge performance][benchmarks], while providing a clear and
2726
expressive architecture that creates - as we hope - an innovative and active
2827
community around machine intelligence and fuels future research.
2928

@@ -42,7 +41,7 @@ For more information,
4241
[rust]: https://www.rust-lang.org/
4342
[autumn]: http://autumnai.com
4443
[tensorflow]: https://github.com/tensorflow/tensorflow
45-
[benchmarks-issue]: https://github.com/autumnai/leaf/issues/26
44+
[benchmarks]: #benchmarks
4645
[documentation]: http://autumnai.github.io/leaf
4746

4847
> Disclaimer: Leaf is currently in a very early and heavy stage of development.
@@ -69,6 +68,21 @@ Leaf right from the command line.
6968
[cargo-edit]: https://github.com/killercup/cargo-edit
7069
[leaf-examples]: https://github.com/autumnai/leaf-examples
7170

71+
## Benchmarks
72+
73+
| (in ms) | Leaf | Torch | Neon | Caffe | Tensorflow |
74+
| ---------------- |---------|----------|---------|----------|------------|
75+
| **Alexnet**
76+
| *FORWARD* | 30.8 | 33.0 | 30.9 | 42.0 | 46.1 |
77+
| *BACKWARD* | 70.6 | 66.1 | 67.2 | 85.3 | 156.0 |
78+
| *TOTAL* | 101.4 | 99.1 | 98.1 | 127.3 | 202.1 |
79+
| **Overfeat**
80+
| *FORWARD* | 104.6 | 113.5 | | 142.3 | |
81+
| *BACKWARD* | 216.7 | 213.7 | | 287.9 | |
82+
| *TOTAL* | 321.3 | 327.2 | | 430.2 | |
83+
| | | | | | | |
84+
85+
7286
## Leaf Ecosystem and Extensions
7387

7488
We design Leaf and all other crates for machine learning completely modular and

0 commit comments

Comments
 (0)