Live data from Hacker News

David Patterson Says It’s Time for New Computer Architectures and Languages

spectrum.ieee.org

191–200 of 204 posts

Re: David Patterson Says It’s Time for New Computer Architectures and Languages

#191

Earlier quoted context omitted.

Developer tools come with time, and time is the one thing non-standard architectures completely lacked until recently. I still don't think the Cell had much future, but we will never be sure. (Also, the Cell had complete memory coherence.)

Yes, I mispoke by saying the SPEs lacked memory coherence, since you used the same physical addresses to load memory into the SPEs local storage. What I meant is that the SPEs are divorced from the normal memory hierarchy. You needed to explicitly retrieve and send all memory from each SPEs, which was a significant burden on programmers.

Does this mean it was a mistake or just ahead of its time? I think software-managed memory tiers have been a dream for advanced architectures for a very long time. The problem, perhaps is assuming software-managed means programmer-managed.

In a single system there is precedent in virtual memory systems using software-managed page mappings rather than static page table data structures. In HPC there is of course the precedent of distributed parallel systems with message-passing rather than shared memory abstractions. And the separation of GPU memory from system memory is certainly common today. Similar things are happening in software-defined storage (i.e. RAM/SSD/disk/tape tiering).

Computation libraries and frameworks help straddle the gap between application programmer needs and current language/runtime/architecture semantics. I think one problem of current markets is that people tend to want to evaluate hardware independently of software, or in terms of yesterday's software.

There is also a strange history of wanting to discard the software/firmware offered by the hardware vendor (for being insecure/inept/whatever), but blindly accepting the complex hardware design that enables our naive/platform-independent software to run well. The whole Spectre debacle shows how that may have been wishful thinking that we can divorce the software and hardware designs...

Re: David Patterson Says It’s Time for New Computer Architectures and Languages

#192
post #120

I have had this fun idea for an odd architecture floating in my head for ages. Lots of small processors with local work ram, cached ram, shared ram. Each processor has a numerical id, communicates with each processor with one bit different in the id by optical link plus an additional link with to the processor complimenting all bits. They send messages and fill their caches from the pool of shared ram. Place even par…

Hop time is not constant. There will be longer and shorter optical links, and if you want the system to be synchronous, everyone would have to wait on the longer links.

True, angles would add a little extra depending on how large the proccessor panels were and their separation distance.

I had envisioned every link comminicating independantly. what would be the advantage of communicating syncronously?

Re: David Patterson Says It’s Time for New Computer Architectures and Languages

#193

Earlier quoted context omitted.

Start with books on dynamic programming, discrete time, discrete space space, no uncertainty. There's a nice one by Dreyfus and Law, The Art and Theory of Dynamic Programming that also gets into the stochastic case. It's called dynamic programming because the program , that is, the planning, changes dynamically over time as learn more and more as time passes. D&L show a nice result that could be used for some first c…

Curious if you have evaluated any of the APL family of languages as being useful for your work.

Looked at APL long ago. My guess is that since it is interpretive it would be too slow. I wrote my dissertation code in just quite portable Fortran.

As I suggested, I do believe that some progress in execution time could be had from some new machine instructions, new language features to use those instructions, and some compiling help. For the compiling part, the language would have some well defined semantics the compiler could exploit. E.g., for something simple, the semantics could let the compiler exploit the idea of non-inferior sets.

E.g., say have 100,000 points in 2-space. Say, just for intuitive visualization, plot them on a standard X-Y coordinate system. Say that the X coordinate is time and the Y direction is fuel. Part of the work is to minimize the cost of time and fuel. At this point in the computation, we don't know how the costs of time and fuel trade off, but we do know that with time held constant, less fuel saves cost, and with fuel held constant, less time saves cost.

So, in the plot of the 100,000 options, we look at the lower left, that is, the south-west parts of the 100,000 points.

Point (X2,Y2) is inferior to point (X1,Y1) if X1 non-inferior.

So, there in the work, can just discard and ignore all the inferior points and work only with the non-inferior points. May have only 100 non-inferior points. Then, presto, bingo, just saved a factor of 1000 in the work. Okay, have sufficiently restricted programming language semantics that the compiler could figure out all that and take advantage of it. When I wrote my code in Fortran, I had to write and call a subroutine to find the non-inferior points -- bummer, that work should be automated in the compiler, but to do that the compiler will need some help from some semantic guarantees.

The above is for just two dimensions, but in practice might have a dozen or more. So, what's the fast way with algorithms, programming language semantics, and hardware to find the non-inferior points for a dozen dimensions?

Non-inferior points are simple -- lots more is possible.

Re: David Patterson Says It’s Time for New Computer Architectures and Languages

#194
post #169
post #136

Earlier quoted context omitted.

Data frames in R give you the relational model with a Turing complete language. I think of it as a better SQL, at least for analytics (as opposed to transaction processing). Besides its data structures, R is surprisingly similar to JavaScript -- it's has Scheme-like semantics but C-like syntax. For certain problems, it's a pleasure to program in. You don't have to go through "objects" to get to your tables; you just…

Yes, but I'm thinking of a general purpose language like Go that would be used to implement normal things. R is specialized for data analysis. Most "normal things" have designs that are deeply inefficient and compromised by bad under-powered data models.

I'm not suggesting that people actually write business applications in R -- I'm just saying it's probably the closest thing to what you're asking for.

And I agree that what you want should exist -- R is proof that it's perfectly possible and natural!

Although, people are using (abusing) R to write web apps:

https://shiny.rstudio.com/

They mostly display data, but they have non-trivial interaction done in the style of JS.

Re: David Patterson Says It’s Time for New Computer Architectures and Languages

#195

Are there languages that have first-class support for representing/optimizing memory hierarchy characteristics? Optimizing C compilers, for example, may have extensions to force specific alignments: https://software.intel.com/en-us/articles/coding-for-perform... But I'm not aware of languages where e.g. declaring alignments is part of the base language. Awareness of L1, L2, L3 cache characteristics, plus NUMA nodes,…

Wouldn't it be better if the slow RAM we have was replaced more and more by the fast RAM used in caches, before we do anything else?

Caches are significantly less dense than normal ram. You wouldn't be able to fit gigabytes in the same area. They would probably be more expensive as well.

Re: David Patterson Says It’s Time for New Computer Architectures and Languages

#196
post #131

Earlier quoted context omitted.

Part of the reason most languages obscure this is because it's a moving target. If a language let you say, "this chunk of code here should run in 7 cycles", what happens when a new optimization finds a way to reduce that, or a new architecture comes up where that operation gets slower but lots of others get faster? I'm not arguing against your desire, just explaining that it's not unreasonable that we're where we are…

This could only ever be doable with extremely simple architectures anyway. Off the top of my head, add in just one of branch prediction, micro-op fusion, out-of-order execution, pipelines and pipeline stalls, or cache misses, and this becomes impossible. Of course, this assumes you even know which CPU you are targeting its specific instruction latencies. That's already an extremely niche set of processors. Further, t…

In these times of dynamic frequency scaling even the temperature of the room the computer is sitting in ia going to affect the performance.

In practice I think hard real-time systems use extremely conservative estimates of cpu performance.

Re: David Patterson Says It’s Time for New Computer Architectures and Languages

#197

Earlier quoted context omitted.

Part of the reason most languages obscure this is because it's a moving target. If a language let you say, "this chunk of code here should run in 7 cycles", what happens when a new optimization finds a way to reduce that, or a new architecture comes up where that operation gets slower but lots of others get faster? I'm not arguing against your desire, just explaining that it's not unreasonable that we're where we are…

This is actually why you want the compiler to track it. You write an algorithm that seems reasonable. And you encode timing constraints into the thing. Now you re-target to a different machine, and the compiler re-checks those constraints. A much cheaper way of dealing with weird timing bugs than doing a post-mortem of why the fuel valves didn't quite close on the day of the rocket test. But this only works if the CP…

The compiler can only help so much as many of the timing parameters are variables and runtime dependent.

Re: David Patterson Says It’s Time for New Computer Architectures and Languages

#198

Earlier quoted context omitted.

(Disclaimer: I work on Legion) Sequoia has been largely superseded by its spiritual successor Legion [1], another programming system by Alex Aiken. Legion doesn't focus so much on low-level memory hierarchies, but it does a very, very good job of scaling to very large machines, and taking advantage of heterogeneous processors such as GPUs. It is also incomparably better at working with dynamic programs, whereas Sequo…

How does Legion differ from languages like Halide which separate scheduling from the algorithm? How much of this could get handled by PGO (profile guided optimization) to observe locality and access patterns? Do you think AI has a place in directing scheduling given enough semantic information so that "bad hypothesis" can get pruned? Does it rely on a static description of machine (latencies and bandwidth) or does it…

Wow, this is a tough set of questions! Some initial thoughts:

> How does Legion differ from languages like Halide which separate scheduling from the algorithm?

Yes, that's one of the similarities. Legion, Sequoia, and Halide all share a separation between the specification of the algorithm from the mapping to any particular architecture.

The biggest difference between Legion and Halide, aside from the fact that Halide is much more domain-specific to image processing, is that Legion (being a dynamic runtime system) focuses more on higher-level orchestration of tasks executing in a distributed system.

> How much of this could get handled by PGO (profile guided optimization) to observe locality and access patterns?

Yes, this is called the Inspector/Executor technique. While it's an old technique, the most recent general-purpose implementation that I know of is this paper: [Code Generation for Parallel Execution of a Class of Irregular Loops on Distributed Memory Systems](http://web.cse.ohio-state.edu/~rountev.1/presto/pubs/sc12.pd...).

The main place where it struggles is memory capacity. It turns out that the profiles, when you're running on large distributed systems, can become very, very large. Keep in mind that modestly sized simulations these days run on hundreds to thousands of machines, and the largest run on tens of thousands of machines. So it's not hard to see why this can be problematic.

> Do you think AI has a place in directing scheduling given enough semantic information so that "bad hypothesis" can get pruned?

Yes. One nice property of Legion's approach to mapping is that no matter what mapping is chosen, the system will guarantee that the computation is still executed correctly. So the worst you can do is make yourself slower.

I think mapping, especially in the distributed setting, is one of the big unsolved problems. For domain-specific settings we have some preliminary answers. E.g. see this paper for how it applies MCMC search to find optimal mapping strategies for DNN execution: [Beyond Data and Model Parallelism for Deep Neural Networks](https://arxiv.org/pdf/1807.05358.pdf)

> Does it rely on a static description of machine (latencies and bandwidth) or does it evolve over time? Can it handle things that are dynamic but are thought of as static like memory bandwidth in a cloud environment?

Legion's model of the machine happens to be static at the moment, because that's the most expedient to implement, but explicitly designed with dynamic behavior in mind. One of the biggest cases is where you lose a machine completely (e.g. because it dies, or your spot reservation gets revoked). I'm not sure if more fine-grained behavior can be exploited in a useful way, e.g. temperature fluctuations in a CPU might very well influence performance, but unless you can predict them I don't see what you can necessarily do about that. For many of these problems, being more asynchronous helps, because at least you can turn latency-limited problems into throughput-limited ones.

> How does Legion compare to cache oblivious techniques?

I'd say that cache oblivious techniques are particular algorithms (or perhaps mapping strategies) that you could implement in Legion, but which Legion is agnostic to. Legion provides mechanism but tries to avoid hard-coding any particular policy.

> Are there changes at the processor level that could fuse operations given the existence of data in the cache, much like hyperthreading can do a context switch on a cache miss.

We don't do this on quite such a low level, but we can do it at higher levels. Mappers can select the ordering of tasks on a processor, as well as the placement and layout of data, which is in theory sufficient to play with this. In the past Legion's overheads were too high to really think about this, but we've made some significant improvements in overhead recently which could allow us to start to think about things at this granularity.

> Do we need to modify what constitutes a Basic Block? Is modern hardware too low level?

I'm not one of them, but I know there are people thinking about this. Can't recall any references at the moment.

In general, I think systems like Legion make us much less dependent on caches. If the system manages data movement in and out of explicitly managed memories, that gives us a lot more freedom to play with the architectures. And increasingly I think we'll need this flexibility if we're going to keep driving performance improvements. As one of my friends once said, "x86 is a platform for making shitty code run fast", but perhaps we don't have that luxury any more.

> Have you read the "Collapsing Towers of Interpreters" paper and do you think it applies to your work?

Haven't read it yet, but it sounds like it shares some ideas with [Terra](http://terralang.org/), which we do use heavily. In fact, the Regent language is built entirely in Terra. In general, these sorts of techniques make it much faster to build new languages, while it's not really in my direct line of research I am very grateful people are working on these things.

Re: David Patterson Says It’s Time for New Computer Architectures and Languages

#199

Earlier quoted context omitted.

P.S. Shameless plug: If you're interested in working on this sort of stuff, we're hiring for full-time staff scientists as well as interns. Drop me a line! (Contact in profile.)

3rd party vouch for shameless plug: I was a RA in a minor role at this team and these are some of the friendliest and most approachable people I've had the pleasure to work with in academia. (Hi Elliot! \o/)

Thanks, Ludwig!

Re: David Patterson Says It’s Time for New Computer Architectures and Languages

#200
post #47

In gamedev, Nvidia's Turing enabled real time rendering at 4k 60fps could be "future-proof" well into the next decade. I'm just not sure end users are clamoring for more photo-realism. Instead, future of computing turns toward optimizing for the experience. With 3D printed form factors and smart haptics. European startup Canatu provides a glimpse of what carbon nano tube (CNT) sheets make possible: https://canatu.com…

That music with their video[1] is like a drug for positive energy.

[1] https://www.youtube.com/watch?v=Tq3w0XvzMKw

Post reply on HN