Live data from Hacker News

Dissecting the Apple M1 GPU, Part II

rosenzweig.io

141–150 of 195 posts

Re: Dissecting the Apple M1 GPU, Part II

#141

Earlier quoted context omitted.

I cannot speak for OP, but software is the reason for me. I can not run Solidworks on MacOS without bootcamp or other tricks, for example. Photogrammetry apps? GIS apps? CNC CAM apps? I mean, compare the Mac[1] compatible apps to the catalog of Apps Autodesk has. The fact of the matter is GPU support on MacOS is just not there in the same way it is with windows. It is really hard to justify the price of Apple when yo…

I'm always surprised when I see discussions about somebody dumping one operating system for another. Isn't your operating system choice dictated by the applications you want to run?

Presumably these people use cross-platform software.

Re: Dissecting the Apple M1 GPU, Part II

#142

Earlier quoted context omitted.

> So Apple strategy seems to be to commit as little resources as possible to their products knowing that "open source" developers will do their work for free thus Apple will not have to pay extra salaries and taxes? Apple has no Linux strategy. Nobody is working for Apple for free. People are working on their own time (or supporting the project with their own money) because they want to see this happen. There is no s…

> Apple has no Linux strategy. macOS comes with a free built in hypervisor for running things in VMs. That's how Linux is supported. (Although I guess not if you want to use the GPU.)

It's a good point, and well supported.

I was thinking about bare metal.

Re: Dissecting the Apple M1 GPU, Part II

#143

question from ignorance - Why not use Metal? Is that too embedded in the macOS system to be useful for something like Linux? Or is this for the sake of understanding the bare metal?

If you used metal as the graphics api on Linux, literally no existing Linux software would work with it unless you also used a layer like MoltenGL or MoltenVK (which have been written for a Mac system and would likely need modification). Linux graphics drivers also tend to have extra APIs for buffer management for X11/Wayland, which a molten compat layer probably doesn't do as molten is meant to run in-process with e…

of course. thanks!

Re: Dissecting the Apple M1 GPU, Part II

#145

Earlier quoted context omitted.

> "Why? Somehow Apple's chips will get better, but competition will stand still?" Arguably this has been the case for the last ten years (comparing chips on iPhones to others). I think x86 can't compete, CISC can't compete with RISC because of problems inherent to CISC ( https://debugger.medium.com/why-is-apples-m1-chip-so-fast-32... ) It won't be for lack of trying - x86 will hold them back. I suppose in theory they…

RISC vs CISC is not real. Anyone writing articles about it is uninformed and you should ignore them. (However, it's also not true that all ISAs perform the same. x86-64 actually performs pretty well though and has good memory density - see Linus's old rants about this.) ARM64 is a good ISA but not because it's RISC, some of the good parts are actually moving away from RISCness like complex address operands.

Very much this. Intel is not that stupid. They went in the lab, built and simulated everything to find that the penalty of extra decoding has an upper bound of a few percent perf/Watt max once you are out of the embedded space.

OTOH, apple is doing some interesting things optimizing their software stack to the store [without release] reordering that ARM does. These sorts of things are where long term advantage lies. Nobody is ever ahead in the CPU wars by some insurmountable margin in strict hardware terms.

System performance is what counts. Apple has weakish support for games, for example, so any hardware advantage they have in a vacuum is moot in that domain.

Integrated system performance and total cost of ownership are what matters.

Re: Dissecting the Apple M1 GPU, Part II

#146

Earlier quoted context omitted.

Are you saying you don't see much promise for AMD, Intel and Nvidia in the GPU space or with computers in general? I had a hard time following your logic. Apple may own their stack, but there are a TON of use cases where that stack doesn't even form a blip on the radar of the people who purchase computer gear.

My prediction is x86 is dead. External GPUs will remain and I think Nvidia has an advantage in that niche currently. The reason stack ownership matters is because it allows tight integration which leads to better chip design (and better performance/efficiency). Windows has run on ARM for a while for example, but it sucks. The reason it sucks is complicated but largely has to do with bad incentives and coordination pr…

Wow I feel like I'm back in 1995 or something. Stupid Intel doubling down on the Pentium! DEC, Sun, and Motorola RISC will extinct them!

Re: Dissecting the Apple M1 GPU, Part II

#148

Earlier quoted context omitted.

Truly impressive work. > Where do people get this knowledge? Time, hands-on experimentation, and focus. Anecdotally, reverse engineering and low-level hacking felt more popular back in the 90s and early 2000s. Back then, there were fewer distractions to soak up the free time of young tech enthusiasts. Old IRC chatrooms feel like a trickle of distraction relative to the firehose of Twitter, Reddit, 24/7 news cycles, a…

There is a world of difference in free time between "having a 9-5 job" and "being in high school", though. In high school, I was lucky enough to not have to do laundry, feed myself, or a variety of other tasks and chores that come along with adulthood. I also could sleep like crap and make it up during school the next day. Not to mention that the time I spent at school wasn't spent programming, so when I got home it…

When I was in high school in 2004, I would fantasize about getting done with my work early and then catching the teacher on a good day where she let me get on the class computer so I could go to online forums and read more about programming. I sometimes wonder how far I would have been ahead had I had a smartphone in my pocket when I was in school like kids have today.

It doesn't surprise me that some kids capitalize on it instead of just using it to watch Twitch in class.

Re: Dissecting the Apple M1 GPU, Part II

#149

Earlier quoted context omitted.

RISC vs CISC is not real. Anyone writing articles about it is uninformed and you should ignore them. (However, it's also not true that all ISAs perform the same. x86-64 actually performs pretty well though and has good memory density - see Linus's old rants about this.) ARM64 is a good ISA but not because it's RISC, some of the good parts are actually moving away from RISCness like complex address operands.

Very much this. Intel is not that stupid. They went in the lab, built and simulated everything to find that the penalty of extra decoding has an upper bound of a few percent perf/Watt max once you are out of the embedded space. OTOH, apple is doing some interesting things optimizing their software stack to the store [without release] reordering that ARM does. These sorts of things are where long term advantage lies.…

I'm confused - I thought the reason that it's hard for Intel to add more decoders is because x86 ISA doesn't have fixed length instructions. As a result you can't trivially scale things up.

From that linked article:

--

Why can’t Intel and AMD add more instruction decoders?

This is where we finally see the revenge of RISC, and where the fact that the M1 Firestorm core has an ARM RISC architecture begins to matter.

You see, an x86 instruction can be anywhere from 1–15 bytes long. RISC instructions have fixed length. Every ARM instruction is 4 bytes long. Why is that relevant in this case?

Because splitting up a stream of bytes into instructions to feed into eight different decoders in parallel becomes trivial if every instruction has the same length.

However, on an x86 CPU, the decoders have no clue where the next instruction starts. It has to actually analyze each instruction in order to see how long it is.

The brute force way Intel and AMD deal with this is by simply attempting to decode instructions at every possible starting point. That means x86 chips have to deal with lots of wrong guesses and mistakes which has to be discarded. This creates such a convoluted and complicated decoder stage that it is really hard to add more decoders. But for Apple, it is trivial in comparison to keep adding more.

--

Maybe you and astrange don't consider fixed length instruction guarantees to be necessarily tied to 'RISC' vs. 'CISC', but that's just disputing definitions. It seems to be an important difference that they can't easily address.

Re: Dissecting the Apple M1 GPU, Part II

#150

OK I love this, but I am pretty sure my chances of getting a mac in the future are zero. From which side should I expect the PC response? Intel? AMD? Microsoft? ARM? Samsung? I think Apple willingly or not has just obliterated the whole consumer pc market.

The rest of the PC market has a chicken and egg problem. Software won’t be developed for a new CPU until it has market share, but a new CPU has little chance of getting market share without software.
Post reply on HN