6 ms·
> This all may seem inefficient and crazy and it is. Program representation and execution need a major re-think along the lines of the once-investigated dataflo
by lxgr 6y ago
> This all may seem inefficient and crazy and it is. Program representation and execution need a major re-think along the lines of the once-investigated dataflow architecture. Why do and then un-do?
In a world where most code is JIT compiled on the target architecture and/or periodically re-compiled using the latest, optimized compiler once a new CPU comes out – sure.
But is that realistic? Maybe that would work for Android and iOS (with on-device and app store level compilation, respectively), but with Docker, we seem to be moving to the opposite direction again, and runtime hardware-based optimization makes a ton of sense there.
- GregarianChild 6y agoWhy do and then un-do? The reason is that we've not yet found a better way of making fast general purpose processors. The OOO (= out-of-order) approach with high-quality prediction (e.g. branch, value) to processor micro-architecture makes sense if you have to mask a lot of memory-access latency, which comes from data-dependent (= unpredictable) memory access. General purpose workloads have a lot of that. (If memory access patterns are more predictable, you'd probably run your workload on a GPU or TPU or DSP, or some other accelerator.) Compilers, whether ahead-of-time, or JIT, have not got enough information to schedule commands in a way that can mask memory latency the way an OOO scheduler inside a processor can. Stalling the pipeline because you are waiting for data to arrive from memory is disastrous for performance and to be avoided at all cost. Intel's Itanium was based on the premise that it is possible statically to schedule well enough, but that has been considered a failure for general workloads. Moreover, if you let a compiler schedule you need to have ISA extensions that allow you to communicate scheduling information to the processor which is not cost free (for example you may spend precious bits to encode scheduling order that you then cannot use for other things). I suspect that the very last word has not been spoken in this discussion, but everything obvious to make dataflow competitive (and quite a lot more) has been tried, and failed.
- Veedrac 6y agoIMO a lot of the problem is simply that powerful players (eg. Intel) had a vested interest in tying things to the platform, and the megaliths we've built on top all assume this construction, so even if there are clear ways in which things can be done better (there are), you'd have to reinvent the world to do them. Fundamental innovation is really difficult, and OoO CPUs avoid the need for it.
- gpderetta 6y agoGPUs have been extremely successful, so have DSPs, each on their niche. They just don't work well on branchy pointer chasey code. Intel itself tried to move beyond OoO and utterly failed. There is no conspiracy here.
- Veedrac 6y agoGPUs were only able to come about into the mainstream because they were brought about and developed alongside their use-case. Much the same can be said for camera ISPs or neural accelerators. GPUs only started tackling more general workloads long after they were a standard, and even today GPGPU is a bit of a mess. If GPUs didn't come around when they did, and games were all CPU-based today, you wouldn't have an easy time inventing and selling a GPU. > Intel itself tried to move beyond OoO and utterly failed. One attempt in 2001 (and a few before then when the market was more competitive but before people had the context we have today) by the company with market power doesn't invalidate my point as much as reinforce it. People have tried approximately nothing in the last 20 years, all pointing back to this one bad design Intel did 20 years ago as if that proves the taken path is the only valid path.
- MaxBarraclough 6y ago> If GPUs didn't come around when they did, and games were all CPU-based today, you wouldn't have an easy time inventing and selling a GPU. I'm not convinced. You'd just need to show that hardware acceleration can produce worthwhile gains for computer graphics, which doesn't strike me as insurmountable. Perhaps start with an FPGA. > People have tried approximately nothing in the last 20 years Do you follow the 'Mill' architecture? https://en.wikipedia.org/wiki/Mill_architecture https://en.wikipedia.org/wiki/Mill_architecture
- Veedrac 6y agoGood luck showing that when all graphics code is designed to be run on CPUs, nobody has spent more than trivial effort making GPU-compatible graphics algorithms, you can't afford new nodes, your GPU is first-generation (and so far from optimal), you can only use CPU memories (who would invent HBM if GPUs didn't exist?), you can only do fixed-function logic efficiently, you have no demos that don't look like programmer art, and you have no way of getting past the adoption hurdle. Even realtime RT, which is mostly just a compatible add-on to raster, only managed to get off the ground when NVIDIA decided to go all-in and tank the criticism for a generation by effectively forcing it on the customer. No other company could have done that, even though Imagination was pushing for RT hardware for ages before NVIDIA. > Do you follow the 'Mill' architecture? Yes. https://medium.com/@veedrac/to-reinvent-the-processor-671139a4a034 https://medium.com/@veedrac/to-reinvent-the-processor-671139...
- fulafel 6y agoWhat we call general purpouse processors are just a model that has coevolved with software. If we got better at making software for parallel processors that are different from current GP CPUs, we could call them those processors purpouse too.
- phkahler 6y ago>> a major re-think along the lines of the once-investigated dataflow architecture. Most software doesnt fully map to a data flow architecture, and when it does you can run it extremely efficiently on today's hardware anyway.
- pjmlp 6y agoDocker is the new NoSQL.
- Razengan 6y agoRegarding all the comments about CPU architectures and compilers and execution: Maybe it’s time to ML the shit out of everything. A system that AOTs and JITs and recompiles based on how the specific user actually uses the app and what it actually does on that specific device. A new high level language that drops all pretense at imperativeness. Some combination of functional and reactive and other hip jargon where you lay down guidelines of what you need done with your assets, user inputs and events. No need to think about threads and shit. You no longer have to know what will actually happen on the metal. Let it go.
- pjmlp 6y agoSo basically Star Lisp and The Connection Machine. > A system that AOTs and JITs and recompiles based on how the specific user actually uses the app and what it actually does on that specific device. Basically every Android device since version 7, and Windows Phone 8 execution model.
- Razengan 6y agoMore than that. For example if an app tries to connect to the internet to download some news on every launch, but the user is often offline, the system magic would automatically inject a check for connectivity to avoid a lengthy timeout.