Live data from Hacker News

Cray-1 vs Raspberry Pi

roylongbottom.org.uk

161–170 of 193 posts

Re: Cray-1 vs Raspberry Pi

#161
post #108

Earlier quoted context omitted.

I wish we could come up with a plastic that would biodegrade after a fixed amount of time say 200 years.

You want the stored carbon in plastics to escape?? The best outcome for plastics, would be to bury them very deep (like nuclear waste), where they could eventually become some new oil like substance. No carbon escape.

Yeah but no one is burying the plastic, it’s too expensive. So realistically I’d much rather have the plastic breakdown so it’s not everywhere for 10k years.

Re: Cray-1 vs Raspberry Pi

#162

When I see comparisons like this, the first thought I have is not the benchmarks, but rather what the most “heroic” real-world calculation of the day would have been on something like the Cray-1, and how to replicate those calculations today on something like a RPi. Weather/climate models? Rad-hydro? The fidelity would almost certainly be super low compared to modern FEA software, but it would be a fun exercise to tr…

A Cray-1 could execute an infinite loop in 7.5 seconds!

Quite impressive, but can't avoid noticing you did not, go near a higher challenge, like compiling a C++ program in under 4 weeks... \s

Re: Cray-1 vs Raspberry Pi

#163

Earlier quoted context omitted.

The RISC-V Vector extension allows the vector length to vary at runtime whereas with SIMD the vector length is fixed at compile time (128 bit, 256 bit etc.). It means the code is more portable basically. With x86 SIMD the standard solution is to compile the same code multiple times for different SIMD widths (using different instructions) and then detect the CPU at runtime. Though that is such a pain that it's only re…

That design seems like a reasonable thing for a high level language that could then be converted to different architectures’ simd widths. But I’m kinda surprised it’s good at the ISA level. Eg for something like a vectorized strlen, mightn’t one worry that the cpu would choose vlen[1] too large causing you to load from cache lines (or pages!) that turn out to be unnecessary for finding the length of the string. With…

I'm not sure it is difficult to see why variable length SIMD makes sense. If you want to process 15 elements with a width of 8, you will need the function twice, once with SIMD processing whole batches of 8 elements and a scalar version of the same function to process the last 7 elements. This makes it inherently difficult to write SIMD code even in the simple and happy case of data parallelism. With RISC-V all you do is set vlen to 7 in the last iteration.

>what do you even pass to vsetvl in this case as you don’t know your string length.

I'm not sure what you are trying to say here. You must know the length of the buffer, if you don't know the length of the buffer, then processing the string is inherently sequential, just like reading from a linked list, since accessing even a single byte beyond the null terminator risks a buffer overflow. Why pick an example that can't be vectorized by definition?

Re: Cray-1 vs Raspberry Pi

#164

Earlier quoted context omitted.

That design seems like a reasonable thing for a high level language that could then be converted to different architectures’ simd widths. But I’m kinda surprised it’s good at the ISA level. Eg for something like a vectorized strlen, mightn’t one worry that the cpu would choose vlen[1] too large causing you to load from cache lines (or pages!) that turn out to be unnecessary for finding the length of the string. With…

I'm not sure it is difficult to see why variable length SIMD makes sense. If you want to process 15 elements with a width of 8, you will need the function twice, once with SIMD processing whole batches of 8 elements and a scalar version of the same function to process the last 7 elements. This makes it inherently difficult to write SIMD code even in the simple and happy case of data parallelism. With RISC-V all you d…

Another point is that the CPU can sequence the multiple calls to its internal SIMD unit internally without that having to be done by user code. This in extreme case degrades to the Cray-1-like vector unit, which still has measurable preformance impact and can be implementated even in very resource constrained environments.

Re: Cray-1 vs Raspberry Pi

#165

When I see comparisons like this, the first thought I have is not the benchmarks, but rather what the most “heroic” real-world calculation of the day would have been on something like the Cray-1, and how to replicate those calculations today on something like a RPi. Weather/climate models? Rad-hydro? The fidelity would almost certainly be super low compared to modern FEA software, but it would be a fun exercise to tr…

Not the Cray-1, but the Navy used a Cray 90 a few years later for CFD calculations modeling flow around ship hulls (code written in Fortran).

I wish I had access to the code I wrote back then - what took minutes or hours on the Cray could probably run in seconds on a RPi now…

Re: Cray-1 vs Raspberry Pi

#167

i wonder how moore's law figured into the pricing - for a nuclear simulation, makes sense you'd want to pay a lot, or basic science or political things like apollo moon missions, but for weather or commercial applications, if you wait a few years might not be worth to pay for cray right away, though there's marketing aspect of how advanced your product is.. maybe this was before moores law though

> if you wait a few years might not be worth to pay for cray right away

And then you don’t get anything done because there is always a better computer just around the corner. Most of the time, proposals are written for hardware that already exist and don’t need the absolute best. If you have some CFD or MHD calculations to do for a rocket engine or a nuclear reactor, you don’t care about the computer on which it ran, just that it ran on time and did not hold the whole project back. Even cutting edge science does not require cutting edge hardware most of the time.

Just like buying a desktop next year won’t help you play games today, at some point you have to settle and accept that your hardware will be outdated by the time it comes online (it’s a bit better now, but leading HPC clusters still get obsolesced quite quickly).

> maybe this was before moores law though

The exponential character of available CPU time on larger computers was apparent before Moore’s law.

Re: Cray-1 vs Raspberry Pi

#168
post #64

Is there any software apart from benchmarks that will make it feel that fast. All softwares that I use feel more advanced version of things that I ran on my 386. GUI, IDE, compiler, office... I understand that the exercise may still be theoretical as any sw used by Met now will be designed for million time fast computers. But there should exist some software that would have required Cray to run then.

No. The Cray-1 ran batch processing jobs, mostly scientific simulations which took hours or days to compute. It had a terminal interface and wasn't used for real time interactive applications.

[deleted]

Re: Cray-1 vs Raspberry Pi

#169

Earlier quoted context omitted.

The RISC-V Vector extension allows the vector length to vary at runtime whereas with SIMD the vector length is fixed at compile time (128 bit, 256 bit etc.). It means the code is more portable basically. With x86 SIMD the standard solution is to compile the same code multiple times for different SIMD widths (using different instructions) and then detect the CPU at runtime. Though that is such a pain that it's only re…

That design seems like a reasonable thing for a high level language that could then be converted to different architectures’ simd widths. But I’m kinda surprised it’s good at the ISA level. Eg for something like a vectorized strlen, mightn’t one worry that the cpu would choose vlen[1] too large causing you to load from cache lines (or pages!) that turn out to be unnecessary for finding the length of the string. With…

> what do you even pass to vsetvl in this case as you don’t know your string length.

To the maximum, of course, `vsetvl x, x0, ...` will do that for you.

You might read over a page boundery, but there is an instruction for that `vle8ff.v`, it's a fault-only-first uni-stride load. That is, it doesn't fault when one of the later elements goes outside our page, and adjusts the vector length accordingly. [0]

> With the various simd extensions on x86 or arm, such a routine could be carefully written to align with cache lines and so avoid depending on reading the next line when the string ends before it.

In practice, on current very early hardware, doing just that is faster, and definitely possible. [1]

> I also worry about various simd tricks that seem to rely on the width. Eg I think there’s some instruction to interpret each half-byte of one vector as an index into some vector of 16 things

I'm not aware of such an instruction, but rvv has vrgather.vv and vrgatherei16.vv to do something similar. Note that you can always return to "fixed-size" implementations if you really need to, buy just setting the vl accordingly. But for the most part I don't think this will be necessary. Do you have any specific problem in mind that may seem hard to do without fixed size SIMD?

> I guess part of my thinking here is that the ISA designers at intel, arm, aren’t stupid, but they ended up with fixed widths for sse, neon, knights landing, avx, avx-512.

I mean, ARM now has something similar with SVE, and x86 has a metric ton of legacy to work with and the market size to get adoption of whatever new instruction prefix they add. Edit: Also, didn't AVX10/AVX512vl go into a similar direction as SVE?

> Is there something reasonable written about why risc-v went with this design.

I'm not quite sure, but I remember that it was one thing from very early in the design. I think it's to have a mostly unified ecosystem for the binary app market. It also makes working with mixed precision easier, because it allows for the LMUL model.

But RISC-V is extendable, the P (Packed SIMD) extension is currently in the works and aimed at the embedded market, for in GPR SIMD operations for DSP type applications. [2]

[0] https://github.com/riscv/riscv-v-spec/blob/master/example/st...

[1] https://camel-cdr.github.io/rvv-bench-results/canmv_k230/str...

[2] https://lists.riscv.org/g/tech-p-ext/topics

Re: Cray-1 vs Raspberry Pi

#170
post #64

Earlier quoted context omitted.

No. The Cray-1 ran batch processing jobs, mostly scientific simulations which took hours or days to compute. It had a terminal interface and wasn't used for real time interactive applications.

It was a later machine than the Cray-1, but I remember seeing a post on the jsoftware forums from someone that ran interactive APL on a Cray. Having a REPL to access a machine like that in that era must have been quite something.

Crays were not good interactive machines for a few reasons, but lacking virtual memory was the most notable.
Post reply on HN