GPU Visibility

92 views
Skip to first unread message

Chip Collier

unread,
May 11, 2020, 3:34:58 AM5/11/20
to Rust for TensorFlow
Ahoy!

I'm deploying to a machine with two very large accelerators and running two threads dedicated to inference. I'd like each thread to be "assigned" to a single GPU if possible. The set_config method requires a "serialized" protobuf and I wanted to make sure I understand correctly, that I'd need to generate this data via some other means and pass a byte array? Or does serialized in this case also mean that we can pass the textual representation to this method?

Adam Crume

unread,
May 13, 2020, 12:52:06 PM5/13/20
to Chip Collier, Rust for TensorFlow
This requires a binary proto, which can be generated with multiple libraries (e.g. https://crates.io/crates/protobuf, https://crates.io/crates/prost).  The Rust API currently requires a serialized protobuf because it's not yet clear which proto library would be best for the tensorflow crate and its users, so we don't force users to use a specific library.

On that topic, do people have a preference for which proto library to use?  One feature which the tensorflow create could make use of but (as far as I'm aware) none of the main libraries support well is parsing text protos.

On Mon, May 11, 2020 at 12:35 AM Chip Collier <pho...@gmail.com> wrote:
Ahoy!

I'm deploying to a machine with two very large accelerators and running two threads dedicated to inference. I'd like each thread to be "assigned" to a single GPU if possible. The set_config method requires a "serialized" protobuf and I wanted to make sure I understand correctly, that I'd need to generate this data via some other means and pass a byte array? Or does serialized in this case also mean that we can pass the textual representation to this method?

--
You received this message because you are subscribed to the Google Groups "Rust for TensorFlow" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rust+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/rust/781c1bf4-ec24-4bcf-b1a0-8b71a9af6ce3%40tensorflow.org.

Kahlil Abreu

unread,
Jun 22, 2020, 8:18:39 AM6/22/20
to Rust for TensorFlow, acr...@google.com, Rust for TensorFlow, pho...@gmail.com
Hey Chip, Adam
Do either of you have some code that you could share for this purpose (creating the serialized proto to be passed to `set_config`). The `config.proto` in the Tensorflow repository is quite large and I'm giving it a go with the `protobuf` but I'm running into issues generating the Rust types (because the `config.proto` has a lot of imports and scoping them in is proving to be quite tough). Been struggling quite a bit with what I imagined to be a fairly simple task on the outset.
If anyone else has done this before also, do let me know.
Any help would be greatly appreciated!
Thanks :)
Reply all
Reply to author
Forward
0 new messages