Question regards to DFSMemoryScheduler

16 views
Skip to first unread message

t kevin

unread,
Jan 5, 2022, 2:24:41 AM1/5/22
to XLA development
Hi folks

I'm trying to understand some implementation details of xla.




// NOTE(dimvar): this is quite ugly and should be changed. It's unclear

// why we care about transitive sizes; when scheduling a node, its input
// and output buffers should be all that matters, not its "history".

My confusion is the same as dimvar noted in the code:
Why is extra_users and total_sizes accumulated? "why we care about transitive sizes"?
For each node(hlo_instruction), when look at extra_users of that node, it indicates there were this many branches before we visit current node.
why is "extra_users" used as the major parameter for DFS memory scheduler?

Thanks a lot for your time

Kevin

Sanjoy Das

unread,
Jan 5, 2022, 11:59:54 AM1/5/22
to t kevin, Dimitris Vardoulakis, XLA development

--
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/2217f75b-75ae-4709-b566-83ac50e482dcn%40googlegroups.com.

dim...@google.com

unread,
Jan 5, 2022, 1:52:07 PM1/5/22
to XLA development
Hi Kevin,

The DFS scheduler needs a heuristic to select among the children of a node to continue the search. I don't know why "transitive sizes" is used. I'm guessing someone tried it back in the day, and found that it worked well enough for the programs that they tried. I doubt there is a deep reason. I don't have any new knowledge since I added this comment, because I haven't worked on this pass since then.

t kevin

unread,
Jan 7, 2022, 5:28:15 AM1/7/22
to dim...@google.com, XLA development
hi Dimitris ,Sanjoy,

Thanks for the reply.
Indeed this "mysterious" implementation works very well.

Kevin

'dim...@google.com' via XLA development <xla...@googlegroups.com>
于2022年1月6日周四 02:52写道:
> You received this message because you are subscribed to a topic in the Google Groups "XLA development" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/xla-dev/1fl8Ric3Cxo/unsubscribe.
> To unsubscribe from this group and all its topics, 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/c2b574c7-fbb3-4563-bef7-b5e4ebfbfb58n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages