Breaking of XLA Computation

45 views
Skip to first unread message

Naveen Swamy

unread,
Aug 4, 2021, 8:16:02 PM8/4/21
to XLA development
I am trying to understand how TF/XLA groups the operations into multiple XLA Computations,  basically our backend expects a single HLO of all operations. I am wondering if there is a way to do this through a flag. I trying backtracking through the code, tf python code is a tough maze, I couldn't figure out when it decides to group the operations. 

Appreciate your input.

Thanks, Naveen

George Karpenkov

unread,
Aug 6, 2021, 1:44:55 PM8/6/21
to Naveen Swamy, XLA development
hi Naveen, 

How do you use XLA from Python?

George

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xla-dev/e7b0b700-dcb5-4b27-b16a-66c5b788d199n%40googlegroups.com.

George Karpenkov

unread,
Aug 6, 2021, 1:46:13 PM8/6/21
to Naveen Swamy, XLA development
Using jit_compile=True will create a single HloModule for the compiled block. A single HloModule does have multiple HloComputations though.

Naveen Swamy

unread,
Aug 6, 2021, 5:18:12 PM8/6/21
to George Karpenkov, XLA development
Hi George,

Thanks for your response. We are using session to use XLA device. We are on Tensorflow 2.2

Thanks, Naveen

Naveen Swamy

unread,
Aug 6, 2021, 5:22:03 PM8/6/21
to George Karpenkov, XLA development
and tf.device 

George Karpenkov

unread,
Aug 6, 2021, 5:32:10 PM8/6/21
to Naveen Swamy, XLA development
Could you provide a code snippet of how do you use it?
Reply all
Reply to author
Forward
0 new messages