10 ms·
Introduction to the Mill CPU Programming Model
- DiabloD3 13y agoI can't wait until designs like this become common.
- deleted 13y ago[deleted]
- TrainedMonkey 13y agoInteresting, the architecture looks greatly simplified compared to even standard RISC (As opposed to lets say x86). Due to that simplification it will be power efficient while being inherently highly parallel. Would be interesting to find out: 1. How high that degree of parallelism can be pushed, are we talking about tens or hundreds of pipelines? 2. What frequency this will operate at? 3. What is up with RAM? I saw nothing about memory, with lots of pipelines it is bound to be memory bound.
- panic 13y ago3. What is up with RAM? I saw nothing about memory, with lots of pipelines it is bound to be memory bound. There's more information about memory in the talk at http://ootbcomp.com/topic/memory/ http://ootbcomp.com/topic/memory/
- willvarfar 13y agoHi, I'm the author of that intro. The talks which Ivan has been giving - there are links in that intro - go into everything in much more detail. But here's a quick overview of your specific questions: 1: we manage to issue 33 operations / sec. This is easily a world record :) The way we do this is covered in the Instruction Encoding talk. We could conceivably push it further, but its diminishing returns. We can have lots of cores too. 2: its process agnostic; the dial goes all the way up to 11 3: the on-chip cache is much quicker than conventional architectures as the TLB is not on the critical path and we typically have ~25% fewer reads on general purpose code due to backless memory and implicit zero. The main memory is conventional memory, though; if your algorithm is zig zagging unpredictably through main memory we can't magic that away
- sp332 13y ago33 ops/sec? :)
- TrainedMonkey 13y agoI am pretty sure this means 33 ops/cycle, as the question asked how far multi-pipeline model can be pushed.
- to3m 13y agoWell, that probably is actually a new world record.
- ww520 13y agoProbably 33 operations in parallel since the original question was talking about parallelism.
- willvarfar 13y agoOooh, too late for me to correct that particular typo :) 33 ops / cycle, sustained. Last night we also published an example list of the FU mix on those pipelines here: http://ootbcomp.com/topic/introduction-to-the-mill-cpu-programming-model-2/#post-610 http://ootbcomp.com/topic/introduction-to-the-mill-cpu-progr...
- cpleppert 13y ago>>: the on-chip cache is much quicker than conventional architectures as the TLB is not on the critical path I would really like to know your reasoning that the TLB is a major bottleneck in conventional CPUs. CPUs execute a TLB lookup in parallel with the cache, so there is usually no latency except on a TLB miss. Basic research on in-memory databases suggest eliminating the TLB would improve performance only by about 10%, this certainly isn't a realistic use case and most of the benefits can be obtained simply by using larger pages. So I don't really know where your claims about 25% fewer reads is coming from in relation to simply getting rid of virtual memory.
- jacobolus 13y ago
- jmz92 13y ago> "Interesting, the architecture looks greatly simplified compared to even standard RISC" Depends on how you define simplicity, really. Writing a good back-end for this architecture is likely to be very challenging.
- nanofortnight 13y agoNot really. The temporal addressing is quite simple for a compiler to generate. Plus, Mill was designed by a compiler writer in the first place. What challenges would you think a back-end developer would face?
- fleitz 13y agoGreat idea, since it's all theoretical currently I'm wondering with the compiler offloading how well it will actually perform. Itanium was capable of doing some amazing things, but the compiler tech never quite worked out.
- chongli 13y agoThe beauty of the Mill is that it's been designed from the start to make the compiler extremely simple and straightforward. There is no "magic" in the software here, it's all in the hardware.
- msandford 13y agoActually there's a fair bit of magic in the software as a result of exposing the hardware rather than trying to hide it. Once the software can know how long things will take, suddenly it can do things that in x86 land would be magical. This seems to me philosophically what Sony was trying to do with the Cell processor. Expose the hardware to programmers so that they can manage things better. The big difference being that the Mill was designed by a compiler writer rather than a bunch of guys who design GPU pipelines.
- chongli 13y agoActually there's a fair bit of magic in the software as a result of exposing the hardware rather than trying to hide it. Once the software can know how long things will take, suddenly it can do things that in x86 land would be magical. Ahhh. When I think of magic I think of stuff like optimizer heuristics that give incredible performance with very carefully written micro-benchmarks and abysmal performance in the worst case.
- msandford 13y agoYeah that makes perfect sense. I would probably refer to that as "cheating" rather than "magic" but I totally get the nomenclature mix-up.
- 13y ago
- cpr 13y agoDoes anyone know how this compares with VLIW designs like the original Yale/Multiflow machines? Seems very familiar. (I ask as a survivor of Multiflow in the late 80's. ;-)
- outside1234 13y agoOr more recently, how does this compare to the Itanic from Intel?
- jmz92 13y agoSome of the memory ideas are similar--Itanium had some good ideas about "hoisting" loads [1] which I think are more flexible than the Mill's solution. In general, this is a larger departure from existing architectures than Itanium was. Comparing it with Itanium, I doubt it will be successful in the marketplace for these reasons: -Nobody could write a competitive compiler for Itanium, in large part because it was just different (VLIW-style scheduling is hard). The Mill is stranger still. -Itanium failed to get a foothold despite a huge marketing effort from the biggest player in the field. -Right now, everybody's needs are being met by the combination of x86 and ARM (with some POWER, MIPS, and SPARC on the fringes). These are doing well enough right now that very few people are going to want to go through the work to port to a wildly new architecture. [1] http://en.wikipedia.org/wiki/Advanced_load_address_table http://en.wikipedia.org/wiki/Advanced_load_address_table
- rcxdude 13y agoThe compiler part seems to be a core part of the mill's strategy: the representation and design seems to be oriented towards making it easy to compile for (the guy who gives the talks is a compiler writer). If the performance gains are half as good as advertised, and porting is not a complete pain (and it seems it won't be too bad), then they will have little difficulty attracting market share, even if only in niche applications at first.
- leoc 13y ago> Right now, everybody's needs are being met by the combination of x86 and ARM (with some POWER, MIPS, and SPARC on the fringes). I'm not sure. I think that a hard port to a new architecture must look a lot more like a worthwhile effort now that the wait-six-months Plan A no longer works, especially for single-threaded workloads. Provided the new architecture can actually deliver the goods, of course.
- Mjolnir 13y agoVery very interesting, thanks for sharing! What would the path be to using existing code/where would Mill appear logically first? Also, could something like Mill work well within the HSA/Fusion/hybrid GPGPU paradigm? E.g. from my very amateur reading of your documents, it looks like a much needed and very substantial improvement to single threaded code; how would a mixed case where we have heavy matrix multiplication in some parts of our code as part of a pipeline with sequential dependencies work? Would an ideal case be a cluster (or some fast interconnect fabric in a multi socket system) of multi core Mill chips be the future? Realistically, is this something that LLVM could relatively easily target? A simple add in card that could give something like Julia an order of magnitude improvement would be a very interesting proposition, especially in the HPC market. I come at this mainly from an interest how this will benefit compute intense machine learning/AI applications. Sorry for all the questions.
- rcxdude 13y agoThe latest talk on their website mentions the LLVM status in passing at the end. Essentially they're moving their internal compiler over to use LLVM, but it requires fixing/removing some assumptions in LLVM because the architecture is so different, and the porting effort was interrupted by their emergence from stealth mode to file patents.
- Mjolnir 13y agoThanks, I'll have a look at the talks.
- solarexplorer 13y ago> The Mill has a 10x single-thread power/performance gain over conventional out-of-order (OoO) superscalar architectures It would be nice to know how they got that number. Because it seems to be too good to be true.
- Guvante 13y agoI am pretty sure they are talking about per-cycle performance. Since they can do 33 operations per cycle. IIRC the peak performance of an Intel chip at the moment is 6 FLOP per 2 cycles (or there abouts). Of course this is beyond ridiculous since a 780 TI can pull off 5 TFLOP/sec on a little under a GHz clock, 5,000 FLOP per cycle is a little more than 33. It seems like an interesting design, but comparing performance against what an x64 chip can do is a bit silly, you can't just pick numbers at random and call that the overall improvement.
- jtuente 13y ago5,000 FLOP per cycle using 2,880 CUDA cores, so less than 2 FLOP/cycle/core.
- Guvante 13y agoBut I bet if we compared core sizes that distinction would disappear, a CUDA core is incredibly compact after all.
- pbsd 13y agoA Haswell core can do 2 vector multiply-adds per cycle, which results in a peak of 32 single-precision FLOP per cycle per core or 16 double-precision FLOP per cycle per core.
- infogulch 13y agoThe mill's 33 ops/cycle are all independent operations, i.e. not counting individual vector elements.
- 13y ago
- sehugg 13y agoFor those that are mainly software-oriented, the Lighterra overview posted earlier is helpful background for understanding where VLIW fits into the zoo of CPU architectures: http://www.lighterra.com/papers/modernmicroprocessors/ http://www.lighterra.com/papers/modernmicroprocessors/
- adamnemecek 13y agoThis might be one of the most interesting things posted on HN.
- JoeAltmaier 13y agoSome kinds of code will benefit from this - long calculations and deep nested procedures. But lots of hangups on consumer applications are in synchronization, kernel calls, copying and event handling. I'd like to see an architecture address those somehow. E.g. virtualize hardware devices instead of writing kernel-mode drivers. Create instructions to synchronize hyperthreads instead of kernel calls (e.g. a large (128bit?) event register, a stall-on-event opcode). If interrupts were events then a thread could wait on an interrupt without entering the kernel.
- willvarfar 13y agoActually, the Mill is designed to address this; it has TLS segment for cheap green threading, SAS for cheap syscall and microkernel arch, cheap calls and several details for IPC which are not public yet.
- JoeAltmaier 13y agoWhat about synchronization? Folks are terrified of threads because synchronizing is so hard. But a thread model can be the simplest especially in message models.
- the_mitsuhiko 13y agoI still want to know how to implement fork for it.
- kristianp 13y agoThere is some discussion of fork here: https://groups.google.com/forum/#!topic/comp.arch/sICkAag4gao https://groups.google.com/forum/#!topic/comp.arch/sICkAag4ga...
- chmike 13y agoI'm skeptic of the belt efficiency. Memory storage will be wasted. What do we gain with it ?
- Rusky 13y agoFrom what I understand it would have very similar characteristics to current register renaming. You just get direct access to the whole register file rather than just a few ISA registers. I think it would require some instruction scheduling to make optimal use of it, but that means the silicon doesn't need that logic so cores can be smaller and more efficient.
- cordite 13y agoHow well could LLVM be converted to the mill intermediate language?
- willvarfar 13y agoWe are starting work on an LLVM back end now. The tool chain will be described in an upcoming talk, so subscribe to the mailing list if you want to be in the audience or watch any available live streams. I am also going to make a doc or presentation called "A Sufficiently Smart Compiler" to explain how easily the Mill can vectorise your normal code and so on :)
- karavelov 13y agoIn my regards it seems that one of their sources of inspiration were Transmeta processors - VLIW core, software translator from some intermediate bytecode (x86 in case of transmeta). I hope they will get it better this time.
- jlouis 13y agoThey don't translate. Rather, they compile code to their instruction set.
- karavelov 13y agoyes, wrong wording on my part
- Symmetry 13y agoWell, the plan is to distribute an intermediate representation and then specialize it to the particular mill pipeline the first time you load the binary. Probably a lot easier than translating something that wasn't designed for it.
- mjn 13y agoI believe IBM mainframes have traditionally used something like that: binary code is shipped for a general mainframe architecture, and on first execution is specialized to the hardware / performance characteristics of the particular model within that architecture that you're running. Also allows for transparent upgrades, since if you migrate to a new model, the binary will re-specialize itself on the next execution, (ideally) taking advantage of whatever fancy new hardware you bought.
- snorkel 13y agoVery interesting reading. Are such procs already being sold or is this still on the workbench?
- szatkus 13y agoNo, it will available in few years :(
- Symmetry 13y agoThis whole thing is just horribly exciting for a computer architecture geek like me. I am somewhat worried about the software side given the number of OS changes that would have to be made to support this. But then again, there are lots of places in the world where people are running simple RTOSes on high end chips and the Mill probably has a good chance there. The initial plan to use an older process and automated design means that the Mill can probably be profitable in relatively modest volumes.
- petermonsson 13y agoThere is something that I can't get to add up here. The phasing claims that there are only 3 pipeline stages compared to 5 in the textbook RISC architecture or 14-16 in a conventional Intel processor, but this can't possibly add up with the 4 cycle division or the 5 cycle mis-predict penalty. What am I getting wrong?
- willvarfar 13y agoThe phase says when the op issues. It takes some number of cycles before it retires. So an divide issues in the "op phase" in the second cycle, and if on the particular Mill model it takes 4 cycles then it retires on the fifth. If there is a mispredict, there is a stall while the correct instruction is fetched from the instruction L1 cache. If you are unlucky, it's not there and you need to wait longer.
- petermonsson 13y agoOK, so the phases aren't an apples to apples comparison to the traditional pipeline stage, but more in line with the TI C6x fetch, decode, execute pipeline which for TI covers something like 4 fetch stages, 2 decode stages and between 1and 5 execute stages. Thank you for the clarification
- willvarfar 13y agoWe'll post the video of the Execution talk covering phasing to Mill forums today or tomorrow or so. ootbcomp.com/forum/the-mill/architecture/