{"action":"created","issue":{"url":"https://api.github.com/repos/halide/Halide/issues/2901","repository_url":"https://api.github.com/repos/halide/Halide","labels_url":"https://api.github.com/repos/halide/Halide/issues/2901/labels{/name}","comments_url":"https://api.github.com/repos/halide/Halide/issues/2901/comments","events_url":"https://api.github.com/repos/halide/Halide/issues/2901/events","html_url":"https://github.com/halide/Halide/pull/2901","id":315568278,"number":2901,"title":"Add an auto-layout mode to HalideTraceViz","user":{"login":"steven-johnson","id":328955,"avatar_url":"https://avatars3.githubusercontent.com/u/328955?v=4","gravatar_id":"","url":"https://api.github.com/users/steven-johnson","html_url":"https://github.com/steven-johnson","followers_url":"https://api.github.com/users/steven-johnson/followers","following_url":"https://api.github.com/users/steven-johnson/following{/other_user}","gists_url":"https://api.github.com/users/steven-johnson/gists{/gist_id}","starred_url":"https://api.github.com/users/steven-johnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steven-johnson/subscriptions","organizations_url":"https://api.github.com/users/steven-johnson/orgs","repos_url":"https://api.github.com/users/steven-johnson/repos","events_url":"https://api.github.com/users/steven-johnson/events{/privacy}","received_events_url":"https://api.github.com/users/steven-johnson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-04-18T17:14:31Z","updated_at":"2018-05-11T17:40:29Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/halide/Halide/pulls/2901","html_url":"https://github.com/halide/Halide/pull/2901","diff_url":"https://github.com/halide/Halide/pull/2901.diff","patch_url":"https://github.com/halide/Halide/pull/2901.patch"},"body":"This PR probably needs more work and cleanup, but is good enough to start getting comments and feedback on. The general idea is that\r\n(1) Tracing.cpp now adds trace-tags that contain the type info and dimensions/extent of all Funcs touched (dimensions are a conservative guess based on calling boxes_touched())\r\n(2) HTV now has an `--auto_layout` flag that, when set, attempts to lay out all touched funcs in a way that isn't crazy: in the order touched, in a set of left-to-right/top-to-bottom squares, roughly maximizing space used, zooming as it sees fit, adding labels, etc.\r\n(3) By default, any trace-tags that are specified in Halide code (or on the command line) override the auto-layout flag; this is useful in that you can use it to start with auto-layout, then gradually tweak it to a pleasing layout by adding tags (e.g. if you want to use it for a presentation). OTOH, if you use `--auto_layout` on a pipeline that already is tweaked, you can get bizarre results (cf camera_pipe for an example); you can pass the flag `--ignore_tags` to have auto layout ignore any custom tags and just use pure auto layout.\r\n(4) Added a `viz_auto` shell and makefile usage to a handful of apps; that said, I think the better longterm usage for autolayout is more likely to be by breaking HTV up into library form and integrating it into the RunGen utility.\r\n(5) Doesn't deal with Tuple-valued Funcs well (known existing limitation of HTV); hasn't been tested with define_extern() yet so might be broken there.\r\n\r\nAside from commenting on the code, feel free to pull and try it on various pipelines; feedback on improving the layout is welcome. (Just keep in mind that this autolayout algo isn't intended to be aesthetically pleasing; it's intended soley to quickly lay out things in a way that makes visualization of code patterns comprehensible to a typical Halide coder. If we can also make it pretty, that's nice too, of course.)"},"comment":{"url":"https://api.github.com/repos/halide/Halide/issues/comments/388434286","html_url":"https://github.com/halide/Halide/pull/2901#issuecomment-388434286","issue_url":"https://api.github.com/repos/halide/Halide/issues/2901","id":388434286,"user":{"login":"steven-johnson","id":328955,"avatar_url":"https://avatars3.githubusercontent.com/u/328955?v=4","gravatar_id":"","url":"https://api.github.com/users/steven-johnson","html_url":"https://github.com/steven-johnson","followers_url":"https://api.github.com/users/steven-johnson/followers","following_url":"https://api.github.com/users/steven-johnson/following{/other_user}","gists_url":"https://api.github.com/users/steven-johnson/gists{/gist_id}","starred_url":"https://api.github.com/users/steven-johnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/steven-johnson/subscriptions","organizations_url":"https://api.github.com/users/steven-johnson/orgs","repos_url":"https://api.github.com/users/steven-johnson/repos","events_url":"https://api.github.com/users/steven-johnson/events{/privacy}","received_events_url":"https://api.github.com/users/steven-johnson/received_events","type":"User","site_admin":false},"created_at":"2018-05-11T17:40:29Z","updated_at":"2018-05-11T17:40:29Z","author_association":"CONTRIBUTOR","body":"Sweet, just gonna wait for it to go green :-)"}}
{"actor":{"display_login":"steven-johnson"}}