Skip to content

Commit

Permalink
Auto merge of #76 - autumnai:docs/cuda_examples, r=hobofan
Browse files Browse the repository at this point in the history
docs/readme: clarify CUDA requirement for examples
  • Loading branch information
homu committed Mar 9, 2016
2 parents 01db30b + 0bf239d commit 3e78189
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -99,6 +99,7 @@ networks (e.g. Alexnet, Overfeat, VGG). To run them on your machine, just follow
the install guide, clone this repoistory and then run

```bash
# The examples currently require CUDA support.
cargo run --release --example benchmarks
```

Expand Down Expand Up @@ -132,8 +133,7 @@ Want to contribute? Awesome! We have [instructions to help you get started][cont
Leaf has a near real-time collaboration culture and happens here on Github and
on the [Leaf Gitter Channel][gitter-leaf].

Unless you explicitly state otherwise, any contribution intentionally
submitted for inclusion in the work by you, as defined in the Apache-2.0
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0
license, shall be dual licensed as below, without any additional terms or
conditions.

Expand Down
7 changes: 6 additions & 1 deletion examples/benchmarks.rs
Expand Up @@ -113,7 +113,10 @@ fn get_time_scale<'a>(sec: f64) -> (f64, &'a str) {
}

#[cfg(not(feature = "cuda"))]
fn bench_alexnet() {}
fn bench_alexnet() {
println!("Examples run only with CUDA support at the moment, because of missing native convolution implementation for the Collenchyma NN Plugin.");
println!("Try compiling with the \"cuda\" feature flag.");
}
#[cfg(feature = "cuda")]
fn bench_alexnet() {
let mut cfg = SequentialConfig::default();
Expand Down Expand Up @@ -194,6 +197,7 @@ fn bench_alexnet() {
#[cfg(not(feature = "cuda"))]
fn bench_overfeat() {
println!("Examples run only with CUDA support at the moment, because of missing native convolution implementation for the Collenchyma NN Plugin.");
println!("Try compiling with the \"cuda\" feature flag.");
}
#[cfg(feature = "cuda")]
fn bench_overfeat() {
Expand Down Expand Up @@ -275,6 +279,7 @@ fn bench_overfeat() {
#[cfg(not(feature = "cuda"))]
fn bench_vgg_a() {
println!("Examples run only with CUDA support at the moment, because of missing native convolution implementation for the Collenchyma NN Plugin.");
println!("Try compiling with the \"cuda\" feature flag.");
}
#[cfg(feature = "cuda")]
fn bench_vgg_a() {
Expand Down

0 comments on commit 3e78189

Please sign in to comment.