News for hackers. Stuff that matters.
Re:A 1000-processor chip powered by an AA battery (2016) by oblio on Monday February 15, 2021 @10:14AM (#26143439)
I know about "embarrassingly parallel" problems, and the thing is, they're only "embarrassingly parallel" to solve in math.

When programming the level of friction is from annoying to high unbearable, depending on the programming language. It should be trivial to implement these solutions, as trivial as the sequential solutions.

It's not. Until this is the case in mainstream programming languages, I doubt we'll have CPUs with 1000 cores in our smartphones or laptops. I mean, we'll have them but they'll be useless because 99% of software today is practically single-threaded. The reason multiple cores are good for laptops, for example, is because we're multi-tasking between multiple applications, not because those cores are frequently used by day-to-day apps. I'm talking about random small apps, not compute intensive ones that have to use multi-threading intensively (rendering, compiling, what have you, professional level software).

Re:A 1000-processor chip powered by an AA battery (2016) by rbanffy on Monday February 15, 2021 @10:28AM (#26143586)
> but they'll be useless because 99% of software today is practically single-threaded.

I used to joke developers should get workstations with SPARC Niagaras or Xeon Phis for that reason: core count is going up and a CPU with a dozen small cores is much cheaper to build than one with 4 beefy ones. Now some of the low-end chips Intel is pushing have 4 SMT2 cores. HEDT is on the 16 SMT2 core range and, if our software continues to be single threaded, there will be a lot of silicon being used for nothing more than spreading heat.

Re:A 1000-processor chip powered by an AA battery (2016) by astrange on Monday February 15, 2021 @01:49PM (#26145781)
That wouldn't be good if they're targeting battery-powered devices, because you usually don't want to turn on extra cores there. Mobile programs can actually go faster if you make them single-threaded - either the device doesn't have more cores available to run your extra threads, or your process isn't high-priority enough to spend more power on.
Re:A 1000-processor chip powered by an AA battery (2016) by colejohnson66 on Monday February 15, 2021 @12:59PM (#26145196)
Isn’t the point of high core counts for workloads that can actually be parallelized? Like compilation or graphics rendering?
Re:A 1000-processor chip powered by an AA battery (2016) by rbanffy on Monday February 15, 2021 @04:41PM (#26147832)
A lot of tasks can be parallelized if you think hard enough. Your CPU is busy reordering instructions so they keep as many execution ports busy as it can so that it can retire as many instructions per core cycle as possible. SMT was invented to keep those execution units busy by running more than one instruction stream at a time.

The incentive to do it when most computers have two SMT2 cores is small, but as the average device starts getting 4 or 8 SMT2 cores, or 8 asymmetric cores, the incentives to make things run faster in parallel get better and better.

Re:A 1000-processor chip powered by an AA battery (2016) by vidarh on Tuesday February 16, 2021 @06:02AM (#26152824)
A lot more things can be parallelised than we do today.

Consider this: We mostly parallelize compilation today at the unit of a single compilation unit.

We do this for two reasons: It's simple, for languages where separate compilation is possible, and it's good enough when you have a small-ish (smaller than the number of compilation units) number of fast cores.

But a lot of compilation can be reduced into far more fine-grained parallel steps.

E.g. parsing can be turned into a chain of array operations along the line of finding possible start/ends of tokens, finding possible starts and ends of quoted segments, finding possible starting points for matches against various rules based on the possible token starts etc. You can further build syntax trees as arrays of vectors. If you have many enough cores it may pay off to subdivide the work to extreme levels like that.

But it's hard to reason about. We're not used to it, and most of us are no good at conceptualising it. Some are.

For a real-life example of a compiler that actually runs on GPU's and aims for massive parallelisation (it compiles a subset of Dyalog APL), check out "co-dfn" by Aaron Hsu. It's very terse and complex to read, and frankly I've only spent time looking at it very superficially, but it's an amazing piece of work. Now, if it was easier for mere mortals to actually write code like that, and we had a more compelling reason (many, but slower cores), we'd probably see a lot more parallelisation. In the short run it'd be extremely painful, but in the long run it might well benefit us.

Re:A 1000-processor chip powered by an AA battery (2016) by tenebrisalietum on Monday February 15, 2021 @01:04PM (#26145248)
Imagine an OS where each new thread or process gets allocated its own core. You'd be limited to 1k threads/processes on this CPU, but what would otherwise be the benefits/drawbacks?
Re:A 1000-processor chip powered by an AA battery (2016) by hvidgaard on Tuesday February 16, 2021 @03:22AM (#26151972)
.net has TPL, and most languages with locking constructs has similar libraries. Even if you have to roll it by hand, it's the hard part is, for embarrassingly parallel problems, not more difficult than other problems programming professionals encounters. In my experience anyway.