This is an archive of the discontinued LLVM Phabricator instance.

[Attributor][WIP] Attribute scheduling visualization.
Changes PlannedPublic

Authored by kuter on Jul 7 2020, 5:00 AM.

Details

Summary

This patch is meant to be used for creating videos of the attributor scheduling.

Usage:

  1. Create dot files (--attribute-seed-allow-list recommended)
  2. Render the dot files.
for f in *.dot
do
  dot -Tpng "$f" -o "$f.png"
done
  1. concatenate the images with ffmpeg.
ffmpeg -r 1 -pattern_type glob -i '*.png' -codec:v libx264 out.mp4

(TODO: Find options that don't break the aspect ratio)

Diff Detail

Event Timeline

kuter created this revision.Jul 7 2020, 5:00 AM
Herald added a reviewer: sstefan1. · View Herald Transcript
Herald added a reviewer: uenoku. · View Herald Transcript
Herald added a reviewer: homerdin. · View Herald Transcript
Herald added a reviewer: baziotis. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
kuter edited the summary of this revision. (Show Details)Jul 7 2020, 5:00 AM
bbn added a comment.Jul 8 2020, 5:24 AM

Can we just merge the dependency graph and the "SchedulingGraph" because I think they are quite similar.

You think it makes sense to merge the two graphes, as @bbn mentioned?

Can you create a script that, given a source file and maybe some options creates the video? Maybe place it in llvm/utils/Attributor.

bbn added inline comments.Jul 8 2020, 10:03 AM
llvm/include/llvm/Transforms/IPO/Attributor.h
906

Is this patch based on D83185 ? But I think those are 2 irrelevant patches, right? Maybe you should create a branch from master and apply changes to that.

sstefan1 added inline comments.Jul 8 2020, 10:34 AM
llvm/include/llvm/Transforms/IPO/Attributor.h
906

That is fine, as long as allow list goes in first.

kuter added a comment.Jul 8 2020, 2:14 PM
In D83297#2138744, @bbn wrote:

Can we just merge the dependency graph and the "SchedulingGraph" because I think they are quite similar.

Thank you for the idea. There are some problems with how the end result looks like and to fix that I
will change this significantly. My answer is late because it took some time for me to decide what I am going to do with this.

This is how it looks like right now: https://streamable.com/qguha8

The layout is not consistent across the frames. To fix this I will
record the state of scheduling (or the changes that are happening to the state) at each step
and output the scheduling graphs after the fix point iteration is complete hiding the nodes and edges that are not
visible at each step.

kuter marked an inline comment as done.Jul 8 2020, 2:18 PM
kuter added inline comments.
llvm/include/llvm/Transforms/IPO/Attributor.h
906

@bbn
Seeding allow list was originally meant for this patch 😄 .