From 011690ce8b453144f46e6c869b529c42a080c75a Mon Sep 17 00:00:00 2001 From: Brandon Thomas Date: Fri, 13 Dec 2019 03:35:50 -0500 Subject: [PATCH] (temporary GPU build break) --- Cargo.toml | 2 +- src/model.rs | 8 ++++++++ src/tacotron_main.rs | 4 +++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8d8d1c00a9..a21f2cc5d8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ prost = "0.5.*" # protobuf prost-types = "0.5.0" # protobuf sample = "0.10.0" # DSP toolkit sonogram = "0.3.0" # badass spectrograms -tensorflow = { version = "0.14.0", optional = true } +tensorflow = { version = "0.14.0", features = ["tensorflow_gpu"], optional = true } wavy = "0.1.2" # real time audio capture and playback world-sys = { path = "/home/bt/dev/world-sys", optional = true } # AWESOME WORLD VOCODER BINDINGS HAH HA HAH zmq = "0.9.2" # zeromq diff --git a/src/model.rs b/src/model.rs index 24fde1effe..e3e7650c41 100644 --- a/src/model.rs +++ b/src/model.rs @@ -137,5 +137,13 @@ pub fn print_tensorfow_version() { // Rust TensorFlow version: 1.13.1 (default, must be hand-upgraded) let version = version().expect("version"); println!("Tensorflow version: {}", version); + + let graph = Graph::new(); + let options = SessionOptions::new(); + let session = Session::new(&options, &graph).unwrap(); + let devices = session.device_list().unwrap(); + for device in devices { + println!("Device: {:?}", device); + } } diff --git a/src/tacotron_main.rs b/src/tacotron_main.rs index cdd5f7f37f..87e5ca2b65 100644 --- a/src/tacotron_main.rs +++ b/src/tacotron_main.rs @@ -60,7 +60,9 @@ pub fn main() { let sentence = vec![40, 52, 64, 41, 28, 40, 32, 64, 36, 46, 64, 31, 42, 41, 28, 39, 31, 64, 47, 45, 48, 40, 43, 1]; - convert_sentence(&mut graph, &session, &sentence) + for _i in 0..32 { + convert_sentence(&mut graph, &session, &sentence) + } } fn convert_sentence(graph: &mut Graph, session: &Session, sentence: &Vec) -> () {