Building and using XLA without the rest of TensorFlow

411 views
Skip to first unread message

Sanghyeon Seo

unread,
Feb 23, 2018, 4:20:30 AM2/23/18
to XLA development
I heard from https://github.com/tensorflow/tensorflow/issues/8100#issuecomment-287368606 that "You can build and use XLA without the rest of Tensorflow right now if you like".

Is there a documentation explaining how to do so? Or can you give some pointers? I want to play with XLA and not building the rest of TensorFlow would be a great help.

Thanks!

Peter Hawkins

unread,
Feb 23, 2018, 8:31:12 AM2/23/18
to Sanghyeon Seo, XLA development
There's no documentation for this, but essentially:
* check out the TensorFlow repository
* run ./configure, enabling XLA, and possibly GPU if that's of interest to you

* You can now build and run targets that use XLA, for example this runs one of the unit tests that invokes XLA directly from C++.
$ bazel test -c opt //tensorflow/compiler/xla/tests:array_elementwise_ops_test_cpu

You can write your own C++ binaries that target the XLA API similarly.

There's also a Python API that you could try, e.g.,
$ bazel test -c opt //tensorflow/compiler/xla/client/python:local_client_test

Peter

--
You received this message because you are subscribed to the Google Groups "XLA development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xla-dev+unsubscribe@googlegroups.com.
To post to this group, send email to xla...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xla-dev/2e66fac3-0baf-4b08-a82e-8d47215f5c91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages