{"action":"created","issue":{"url":"https://api.github.com/repos/stanford-ppl/spatial/issues/31","repository_url":"https://api.github.com/repos/stanford-ppl/spatial","labels_url":"https://api.github.com/repos/stanford-ppl/spatial/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/stanford-ppl/spatial/issues/31/comments","events_url":"https://api.github.com/repos/stanford-ppl/spatial/issues/31/events","html_url":"https://github.com/stanford-ppl/spatial/issues/31","id":327445986,"number":31,"title":"Buffer Depth Wrong in NamedTest","user":{"login":"mattfel1","id":8563453,"avatar_url":"https://avatars3.githubusercontent.com/u/8563453?v=4","gravatar_id":"","url":"https://api.github.com/users/mattfel1","html_url":"https://github.com/mattfel1","followers_url":"https://api.github.com/users/mattfel1/followers","following_url":"https://api.github.com/users/mattfel1/following{/other_user}","gists_url":"https://api.github.com/users/mattfel1/gists{/gist_id}","starred_url":"https://api.github.com/users/mattfel1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattfel1/subscriptions","organizations_url":"https://api.github.com/users/mattfel1/orgs","repos_url":"https://api.github.com/users/mattfel1/repos","events_url":"https://api.github.com/users/mattfel1/events{/privacy}","received_events_url":"https://api.github.com/users/mattfel1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dkoeplin","id":5581940,"avatar_url":"https://avatars2.githubusercontent.com/u/5581940?v=4","gravatar_id":"","url":"https://api.github.com/users/dkoeplin","html_url":"https://github.com/dkoeplin","followers_url":"https://api.github.com/users/dkoeplin/followers","following_url":"https://api.github.com/users/dkoeplin/following{/other_user}","gists_url":"https://api.github.com/users/dkoeplin/gists{/gist_id}","starred_url":"https://api.github.com/users/dkoeplin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkoeplin/subscriptions","organizations_url":"https://api.github.com/users/dkoeplin/orgs","repos_url":"https://api.github.com/users/dkoeplin/repos","events_url":"https://api.github.com/users/dkoeplin/events{/privacy}","received_events_url":"https://api.github.com/users/dkoeplin/received_events","type":"User","site_admin":false},"assignees":[{"login":"dkoeplin","id":5581940,"avatar_url":"https://avatars2.githubusercontent.com/u/5581940?v=4","gravatar_id":"","url":"https://api.github.com/users/dkoeplin","html_url":"https://github.com/dkoeplin","followers_url":"https://api.github.com/users/dkoeplin/followers","following_url":"https://api.github.com/users/dkoeplin/following{/other_user}","gists_url":"https://api.github.com/users/dkoeplin/gists{/gist_id}","starred_url":"https://api.github.com/users/dkoeplin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkoeplin/subscriptions","organizations_url":"https://api.github.com/users/dkoeplin/orgs","repos_url":"https://api.github.com/users/dkoeplin/repos","events_url":"https://api.github.com/users/dkoeplin/events{/privacy}","received_events_url":"https://api.github.com/users/dkoeplin/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-05-29T18:57:27Z","updated_at":"2018-05-30T02:53:18Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This may be happening in a few places, but specifically I am looking at `a_0` which has at least 2 things wrong.\r\n\r\n1) The LCA is the accelscope so I think it should not be buffered\r\n2) Its getting tagged as buffered with depth = 2, which even if it did have a metapipe lca, its buffer depth should be 4"},"comment":{"url":"https://api.github.com/repos/stanford-ppl/spatial/issues/comments/393013993","html_url":"https://github.com/stanford-ppl/spatial/issues/31#issuecomment-393013993","issue_url":"https://api.github.com/repos/stanford-ppl/spatial/issues/31","id":393013993,"user":{"login":"dkoeplin","id":5581940,"avatar_url":"https://avatars2.githubusercontent.com/u/5581940?v=4","gravatar_id":"","url":"https://api.github.com/users/dkoeplin","html_url":"https://github.com/dkoeplin","followers_url":"https://api.github.com/users/dkoeplin/followers","following_url":"https://api.github.com/users/dkoeplin/following{/other_user}","gists_url":"https://api.github.com/users/dkoeplin/gists{/gist_id}","starred_url":"https://api.github.com/users/dkoeplin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkoeplin/subscriptions","organizations_url":"https://api.github.com/users/dkoeplin/orgs","repos_url":"https://api.github.com/users/dkoeplin/repos","events_url":"https://api.github.com/users/dkoeplin/events{/privacy}","received_events_url":"https://api.github.com/users/dkoeplin/received_events","type":"User","site_admin":false},"created_at":"2018-05-30T02:53:18Z","updated_at":"2018-05-30T02:53:18Z","author_association":"CONTRIBUTOR","body":"Ok, this is actually a pretty interesting example. At the moment we have two relevant rules: \r\n- No more than one metapipe per instance\r\n- No merging instances when at least one has \"accumulating\" writes (write + read in one controller) in a buffer\r\n\r\n```\r\nInstance #0\r\n  <Banked>\r\n  Depth:    2\r\n  Accum:    Buffer\r\n  Banking:  List(Dims {0}: Cyclic: N=1, B=1, alpha=<1>) <Flat>\r\n  Pipeline: Controller(x101,-1)\r\n  Ports:\r\n  0 [Type:WR, Width:0]:\r\n  0 [Type:RD, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'E.MemFold(a)(0 until 32){i => a }{_+_} {0,0} (NamedTest.scala:40:41)\r\n  1 [Type:WR, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'E.MemFold(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:40:41)\r\n  1 [Type:RD, Width:0]:\r\n  M [Type:WR, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:37:43)\r\n   - Mux Port #1: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:38:43)\r\n   - Mux Port #2: \r\n    [Ofs: 0]       'E.MemFold(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:39:41)\r\n  M [Type:RD, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:37:43)\r\n   - Mux Port #1: \r\n    [Ofs: 0]       'B.Reduce(b)(0 until 32){i => a(i) }{_+_} {} (NamedTest.scala:33:38)\r\n\r\n\r\n\r\nInstance #1\r\n  <Banked>\r\n  Depth:    2\r\n  Accum:    Buffer\r\n  Banking:  List(Dims {0}: Cyclic: N=1, B=1, alpha=<1>) <Flat>\r\n  Pipeline: Controller(x62,-1)\r\n  Ports:\r\n  0 [Type:WR, Width:0]:\r\n  0 [Type:RD, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0,0} (NamedTest.scala:37:43)\r\n  1 [Type:WR, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:37:43)\r\n  1 [Type:RD, Width:0]:\r\n  M [Type:WR, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:38:43)\r\n   - Mux Port #1: \r\n    [Ofs: 0]       'E.MemFold(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:39:41)\r\n   - Mux Port #2: \r\n    [Ofs: 0]       'E.MemFold(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:40:41)\r\n  M [Type:RD, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'E.MemFold(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:40:41)\r\n\r\n\r\n\r\nInstance #2\r\n  <Banked>\r\n  Depth:    2\r\n  Accum:    Buffer\r\n  Banking:  List(Dims {0}: Cyclic: N=1, B=1, alpha=<1>) <Flat>\r\n  Pipeline: Controller(x88,-1)\r\n  Ports:\r\n  0 [Type:WR, Width:0]:\r\n  0 [Type:RD, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'E.MemFold(a)(0 until 32){i => a }{_+_} {0,0} (NamedTest.scala:39:41)\r\n  1 [Type:WR, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'E.MemFold(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:39:41)\r\n  1 [Type:RD, Width:0]:\r\n  M [Type:WR, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:37:43)\r\n   - Mux Port #1: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:38:43)\r\n  M [Type:RD, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:38:43)\r\n\r\n\r\n\r\nInstance #3\r\n  <Banked>\r\n  Depth:    2\r\n  Accum:    Buffer\r\n  Banking:  List(Dims {0}: Cyclic: N=1, B=1, alpha=<1>) <Flat>\r\n  Pipeline: Controller(x75,-1)\r\n  Ports:\r\n  0 [Type:WR, Width:0]:\r\n  0 [Type:RD, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0,0} (NamedTest.scala:38:43)\r\n  1 [Type:WR, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:38:43)\r\n  1 [Type:RD, Width:0]:\r\n  M [Type:WR, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'D.MemReduce(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:37:43)\r\n   - Mux Port #1: \r\n    [Ofs: 0]       'E.MemFold(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:39:41)\r\n  M [Type:RD, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'E.MemFold(a)(0 until 32){i => a }{_+_} {0} (NamedTest.scala:39:41)\r\n   - Mux Port #1: \r\n    [Ofs: 0]       'A.Foreach(0 until 32){i => println(a(i)) } {} (NamedTest.scala:31:44)\r\n   - Mux Port #2: \r\n    [Ofs: 0]       'B.Reduce(b)(0 until 32){i => a(i) }{_+_} {} (NamedTest.scala:34:38)\r\n\r\n\r\n\r\nInstance #4\r\n  <Banked>\r\n  Depth:    1\r\n  Accum:    None\r\n  Banking:  List(Dims {0}: Cyclic: N=1, B=1, alpha=<1>) <Flat>\r\n  Pipeline: ---\r\n  Ports:\r\n  0 [Type:WR, Width:0]:\r\n  0 [Type:RD, Width:1]:\r\n   - Mux Port #0: \r\n    [Ofs: 0]       'A.Foreach(0 until 32){i => println(a(i)) } {} (NamedTest.scala:30:44)\r\n   - Mux Port #1: \r\n    [Ofs: 0]       val sum = 'C.Fold(0)(0 until 32){i => a(i) }{_+_} {} (NamedTest.scala:35:46)\r\n```"}}
{"actor":{"display_login":"dkoeplin"}}