Replies: 12 comments 23 replies
-
I really like the idea that "Partitioning a program can be thought of as a type inference on the partition types." It is cool that simply by extending the type system with partition type, we would be able to do a task using existing algorithms. Another thing I'm wondering is why do the authors choose GA144, which is pretty distinct as it is stack based instead of register based. It is mentioned that it is really energy efficient but is it brought by its characteristic as being stack-based? It seems that this property has made the optimization more complex (e.g. many superoptimizer techniques are not applicable. |
Beta Was this translation helpful? Give feedback.
-
As someone who was unfamiliar with spatial architectures prior to reading this paper, I really enjoyed learning about an approach that differs greatly from the typical, register-based approach. One concept that stood out to me was how different steps of an operation such as x*y can take place in different partitions and, after QAP is solved, possibly on different cores. The partition annotation language feature was also really neat and it's interesting that Chlorophyll gives the programmer the control to assign data structures and code to specific partitions. It's intriguing to see how synthesis can be applied to solve each of the sub-problems of partitioning, layout, code separation, and code generation and if I had to write code for the GA144 architecture, I'd be interested in finding ways to apply program synthesis too. Usually seeing a compiler implementation that results in 65% worse performance would seem like a red flag but the sense I get is that showing that a synthesis-aided compiler is in the ballpark of expert-written programs should be considered a success. |
Beta Was this translation helpful? Give feedback.
-
Very interesting read. In a certain view I wonder if we can classify a "traditional compiler as a special-case of a program synthesizer in that it just so happens to have a very small search space (whereas a "traditional synthesizer" has a broad search space). The chlorophyll compiler with its super-optimizations sits somewhere between the two. I was at first skeptical of the "comparable to highly-optimized expert-written programs" claim, since the gap between the expert-written programs were still notably larger than the gap between no-superopt and superopt. But this had me wonder, just how "good" are these expert programmers? Certainly they are writing better optimized code than I could - but we can't rely on specialized software developers trained on specific hardware. This almost circles back to the first problem, where the paper quotes "it may take a decade to build a mature compiler with optimizations for the target hardware." |
Beta Was this translation helpful? Give feedback.
-
I very much enjoyed reading this paper and specifically about learning more about spatial architectures; they were also new to me, and I found it interesting to learn more about their use cases. In addition, this paper provides insights about how program synthesis can be used in compilation tools themselves (through superoptimizations). This paper does restrict the use of program synthesis to this architecture, though; I wonder if there's the potential (or if there already exist) program synthesizers in more mainstream compilers for more widely-used languages (for instance, I could imagine a compiler inferring a precondition and postcondition for a certain code snippet, and then potentially synthesizing an efficient program to meet those conditions if the code snippet is small enough). |
Beta Was this translation helpful? Give feedback.
-
It's really interesting to see how different parts of Chlorophyll fits together. The constraints faced by Chlorophyll breaks many of our assumptions about writing a program: different cores don't have a shared memory, the size of code on each core is limited, each cores communicate with each other by passing messages to its neighbours... It's especially interesting to see that the physical distance between different cores matter in programming. Under such a different computation model, we have to rethink about the optimizations we can make, and we also need to rethink what's an efficient algorithm. |
Beta Was this translation helpful? Give feedback.
-
I wonder why STOKE "did not translate well from a register-based system to the stack-based GA144" Is it because it's more difficult to keep track of memory? |
Beta Was this translation helpful? Give feedback.
-
It wasn't clear to me how they chose their benchmarks. I see they chose from multi core and single core programs, though the sampling methodology wasn't given to us. |
Beta Was this translation helpful? Give feedback.
-
This paper was eye-opening in that it uses solutions I didn't know about to solve problems that I hadn't thought about. For instance, data and other programming constructs have to be partitioned in GA. Given a partially annotated or unannotated program, chlorophyll can represent communication count and partition space with a formula in terms of symbolic variables, which becomes a constraint for Rosette's back-end solver, which iteratively finds a solution with a decreasing upper bound on communication count until it cannot find a solution. This enables chlorophyll to accept partial or no manual annotation,
I thought this ties in nicely with the discussion of programmability. I also imagine that fully manually annotated programs might be unmaintainable and unportable if the architecture (e.g. storage per core) could change, rendering partition annotations invalid. |
Beta Was this translation helpful? Give feedback.
-
I really enjoyed this paper! I was really intrigued by the problems that this architecture presented and the ways the authors chose to address them through the many phases of Chlorophyll. The amount of information the authors were able to pack in to 7 pages was also really impressive! When reading the paper, I found myself thinking a lot about the engines behind declarative languages like SQL and graphQL and program synthesis like that we discussed in class. These engines "compile" high-level specifications (e.g. a SQL query) into efficient, lower-level "instructions" (e.g. the series of operations executed by a SQL engine), and this optimized path is chosen from many possible paths. Then, at the high level, both program synthesis and these engines both search over a large space to find an optimized solution to satisfy some requirements. However, while SQL engines and the like use relatively inexpensive heuristics and algorithms to optimize a query, program synthesizers rely on expensive SAT solvers. Is it possible that some program synthesis problems can be solved without SAT solvers or is the problem space only amenable to SAT solvers? Perhaps the "Partitioning Synthesizer" could be replaced with a faster heuristics-based algorithm, maybe based off of an existing one from a processor that distributes work to resource-constrained cores. |
Beta Was this translation helpful? Give feedback.
-
I do wonder if a 65% slowdown compared to hand-written programs is acceptable for the intended applications of GA144. I'd imagine that the hardware is fundamentally pretty slow due to the high synchronization cost and that every bit of performance is valuable, especially in embedded domains where the program might be running for years. |
Beta Was this translation helpful? Give feedback.
-
This paper kind of makes me realize how broadly the term "program synthesis" applies. Steps 1 and 2 use a solver to fill in type annotations or infer allocation of resources to minimize communication. This sounds a lot like the research project I've been working on, where types include labels denoting security requirements and the compiler can infer weakest necessary labels by using a solver. The key difference I see is that in this system, the user is allowed to leave things underspecified (where the synthesis comes in), whereas with more classic type inference any ambiguity must be resolved. Step 4 feels like the most "classic" use of program synthesis to me. The point brought up above about how compilation might even be seen as program synthesis with a significantly smaller search space due to more detailed specification made me think about this - inferring these type labels to me almost feels somewhere between "compilation", where the specifications impose quite a restriction on the search space, and synthesis problems like programming by example or functional synthesis with no syntax guidance, where the search space is nearly the space of all programs. |
Beta Was this translation helpful? Give feedback.
-
The main point that came to my mind is the similarity between the partitioning task the paper is trying to solve, and the much more general task of partitioning a computation between a number of servers. Different criteria become important in this partitioning, e.g., performance and security. Interestingly, some solutions to the security concerns of such a partitioning also use type systems (via information flow) to ensure that wrong servers do not see private data. Researchers have realized that there are information-theoretic limits to the task of partitioning computation while minimizing communication, and drawing the analogy would help us to come up with a theoretical limit against which the performance of the synthesizer can be evaluated. |
Beta Was this translation helpful? Give feedback.
-
Hello everyone! Here is the discussion for the Chlorophyll paper on 11/14. Chlorophyll is a synthesis-aided compiler targeting GreenArrays GA144, a low-power processor array of 144 F18A Cores. Each core runs the colorForth ISA. You can click on the links to read more about this machine.
Beta Was this translation helpful? Give feedback.
All reactions