Live data from Hacker News

Dissecting the Apple M1 GPU, Part II

rosenzweig.io

151–160 of 195 posts

Re: Dissecting the Apple M1 GPU, Part II

#151

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.

I'd be excited to see arm competition in the desktop space but I don't believe there are any arm chips that compete in performance to high end x86. Arm can do lots of cores which is very good for servers, but single threading performance is still a significant necessity on user end hardware. The M1 is great because it's low power with optimized performance, but on a desktop you can have well over 500W+ and that's nor…

> but on a desktop you can have well over 500W+ and that's normal.

You only see that on gaming rigs and high end workstations. The typical office machine or ma & pa PC is either a laptop or a mini-PC with mobile parts.

Re: Dissecting the Apple M1 GPU, Part II

#152

Earlier quoted context omitted.

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…

I agree that's a real difference and M1 makes good use of it, it's just to me RISC ("everything MIPS did") vs CISC ("everything x86 did") implies a lot of other stuff that's just coincidences. Specifically RISC means all of simple fixed-length instructions, 3-operand instructions (a=b+c not a+=b), and few address modes. Some of these are the wrong tradeoff when you have the transistor budget of a modern CPU.

x86 has complicated variable instructions but the advantage is they're compressed - they fit in less memory. I would've expected this to still be good because cache size is so important, but ARM64 got rid of theirs and they know better than me, so apparently not. (They have other problems, like they're a security risk because attackers can jump into the middle of an instruction and create new programs…)

One thing you can do is have a cache after the decoder so you can issue recent instructions over again and let it do something else. That helps with loops at least.

Re: Dissecting the Apple M1 GPU, Part II

#153
post #127
post #37

Earlier quoted context omitted.

"I get Intel doesn't own the stack/vertical integration, but Intel could have devoted 1% of its revenue to a kickass Linux OS to keep Microsoft honest a long time ago and demonstrate its full hardware." Interesting point.. makes one wonder why didn't they do it while having a mountain of cash.

They had Intel Clear Linux, a server-oriented distro. Quite good at what it targeted.

Intel Clear Linux still exists and is still developed by Intel.

Re: Dissecting the Apple M1 GPU, Part II

#154
post #116
post #115

Earlier quoted context omitted.

Yes, perhaps, and at that time it was also a much simpler proposition to do that. I would imagine at that time there were also many fewer kids at a high-school level doing that kind of hacking, so it might not be totally wrong to say they were all prodigies.

I guess, C64, Amiga, Atari didn't had programmable graphics hardware after all.

The Atari did, at least in the technical sense, though not in the sense you mean it.

The Ataris had a display process called Antic that you supplied with a display-list, a set of tokens that defined which antic-mode was next as the electron-dot proceeded down the screen. Antic would halt the CPU and take over the bus in order to transfer data from main memory to use for display purposes, be it character or bitmap data

You could choose from a variety of modes (15 in all, IIRC) and add horizontal or vertical smooth scrolling to each mode-line individually by toggling a bit in the display-list entry.

One further bit allowed you to set a DLI (Display-list interrupt) where the CPU would be interrupted and run your code at that end of the specific display-line on-screen - you had the flyback interval to effect something (not a lot, but you could change colour registers, character-sets, do a few register operations, basically).

So it was minimally programmable, and certainly not comparable to today's stuff - but it was groundbreaking in its day.

Re: Dissecting the Apple M1 GPU, Part II

#155

Earlier quoted context omitted.

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…

> My prediction is x86 is dead. I don't see that. At least in corporate environment with bazillion legacy apps, x86 will be the king for the foreseeable future. And frankly I don't really see the pull of ARM/M1 anyway. I mean, I can get a laptop with extremely competitive Ryzen for way cheaper than MacBook with M1. The only big advantage I see is the battery, but that's not very relevant for many use cases - most peo…

> At least in corporate environment with bazillion legacy apps

They could just run them as virtual desktop apps. Citrix, despite its warts, is quite popular for running old incompatible software in corporate environments.

Re: Dissecting the Apple M1 GPU, Part II

#156

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…

>There is a world of difference in free time between "having a 9-5 job" and "being in high school", though.

Funny how this works. In high school I had a ton of free time. In college, not a lot of free time and very stressed. Entering the workforce, again a lot of free time and very stress free. I expect free time will disappear if children ever come into play

Re: Dissecting the Apple M1 GPU, Part II

#157

Earlier quoted context omitted.

They have bitten off an even bigger chunk of the meal they had nearly finished already: - Developers - Creatives - Dutiful citizens of The Ecosystem What they are no closer to biting off is gamers and hardware enthusiasts. Anyone who actually needs to open their PC for any purpose whatsoever. I know Apple wants to be the glossy Eve to all the PC market's Wall-E's, but I will continue to shun them forcefully as long a…

Wow, obvious bias much? Great way to engage in reasonable, level headed conversation is to lead with telling people they should be ashamed for not holding your values and opinions. I honestly can't think of a better way to demonstrate to most people why they _should_ get a Mac than to just show off comments like yours.

Convince me otherwise! :)

Re: Dissecting the Apple M1 GPU, Part II

#159

Everyone, remember that in 2019 Alyssa was in _High School_. Where do people get this knowledge? It's astounding. She was literally reverse-engineering Mali for Panfrost starting in her Sophomore year.

Started early. This is a blog post from 2016:

https://rosenzweig.io/blog/solving-bit-magic.html

I'm jealous of people who started programming as a kid.

Re: Dissecting the Apple M1 GPU, Part II

#160
post #8

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 new Ryzen mobile processors should be interesting. Their GPU drivers (while not of the best code quality) are in the mainline Linux kernel. So it all should just “work”

What I want is to take a mobile CPU and put it in a normal form factor for power saving and excellent integrated graphics. Why is this not possible?
Post reply on HN