Live data from Hacker News

GPU advancements in M3 and A17 Pro [video]

developer.apple.com

91–100 of 148 posts

Re: GPU advancements in M3 and A17 Pro [video]

#91
post #85
post #26

Earlier quoted context omitted.

What Apple calls a GPU core seems to be roughly the same as what Nvidia calls a “stream multiprocessor”. For example a 1080 GTX GPU has 20 stream multiprocessors (SM), each containing 128 cores, each of which supports 16 threads. Meanwhile Apple describes the M1 GPU as having 8 cores, where “each core is split into 16 Execution Units, which each contain eight Arithmetic Logic Units (ALUs). In total, the M1 GPU contai…

Question from a GPU novice. I presume a thread is the individual calculation perform on one element of the vector? Can the 128 cores, or 20 SM perform different operations at the same time or all 24,576 threads perform the same operation at the same time, on a vector of data of length of 24,576?

"128 * the-number-of-cores" of threads can make progress truly in parallel (at the same time).

24,576 threads (or however many, I didn't validate the number and it depends on the occupancy, which depends on thread resource usage, like registers => depends on the shader program code) is how many threads can be executed concurrently (as opposed to in parallel), as in, how many of them can simultaneously reside on the GPU. A subset of those at any time are actually executed in parallel, the rest are idle.

You can think of this situation as follows using an analogy with a CPU and an OS:

1. 128 * the-number-of-cores is the number of CPU cores(*1)

2. 24,576 threads is the number of threads in the system that the OS is switching between

Major differences with the GPU:

3. On a CPU context switch (getting a thread off the core, waking up a different thread, restoring the context, and proceeding) takes about 2,000 cycles. On a GPU _from the analogy_ that kind of thread switching takes ~1-10 cycles depending on the exact GPU design and various other details.

4. In CPU/OS world the context switching and scheduling on the OS side is done mostly in software, as the OS is indeed software. In GPU's case the scheduler and all the switching is implemented as fixed function hardware finely permeating the GPU design.

5. In CPU/OS world those 2,000 cycles per context switch is so much larger than a roundtrip to DRAM while executing a load instruction that happened to miss in all caches - which is about 400-800 cycles or so depending on the design - that OS never switches threads to hide latencies of loads, it's pointless. As far as performance is concerned (as opposed to maintaining the illusion of parallel execution of all programs on the computer), the thread switching is used to hide the latency of IO - non-volatile storage access, network access, user input, etc. (which takes millions of cycles or more - so it makes sense).

In the GPU world the switching is so fast, that the hardware scheduler absolutely does switch from thread to thread to hide latencies of loads (even the ones hitting in half of the caches, if that happens), in fact, hiding these latencies and thus keeping ALUs fed is the whole point of this basic design of pretty much all programmable GPUs that there ever were.

6. In real world CPU/OS, the threads that aren't running at the time reside (their local variables, etc) in the memory hierarchy, technically, some of it ends up in caches, but ultimately, the bulk of it on a loaded system is in system DRAM. On a GPU, or I suppose by now we have to say, on a traditional GPU, these resident threads (their local variables, etc) reside in on-chip SRAM that is a part of the GPU cores (not even in a chunk on a side, but close to execution units in many small chunks, one per core). While the amount of DRAM (CPU/OS) is a) huge, gigabytes, and b) easily configurable, the amount of thread state the GPU scheduler is shuffling around is measured typically in hundreds of KBs per GPU Core (so on the order of about "a few MBs" per GPU), and the equally sized SRAM storing this state is completely hardwired in the silicon design of the GPU and not configurable at all.

Hope that helps!

footnotes (*1) a better analogy would be not "number of CPU cores", but "number-of-CPU-cores * SMT(HT) * number-of-lanes-in-AVX-registers", where number-of-lanes-in-AVX-registers is basically "AVX-register-width / 32" for FP32 processing which (the latter) yields about ~8 give or take 2x depending on the processor model. Whether to include SMT(HT) multiplier (2) in this analogy is also murky, there is an argument to be made for yes, and an argument to be made for no, and depends on the exact GPU design in question.

Re: GPU advancements in M3 and A17 Pro [video]

#92
> I'm excited to tell you about the new Apple family 9 GPU architecture in A17 Pro and the M3 family of chips, which are at the heart of iPhone 15 Pro and the new Max.

"The new Max"? He clearly meant "the new Macs".

Kinda weird that Apple can't properly transcribe its own content.

Re: GPU advancements in M3 and A17 Pro [video]

#93
post #92

> I'm excited to tell you about the new Apple family 9 GPU architecture in A17 Pro and the M3 family of chips, which are at the heart of iPhone 15 Pro and the new Max. "The new Max"? He clearly meant "the new Macs". Kinda weird that Apple can't properly transcribe its own content.

I’ve also noticed this on lots of YouTube videos, where the creator clearly meant one thing, but the subtitles substitute a more common, similarly-sounding word with a different meaning.

I suspect they have the videos transcribed externally, and don’t check the transcription (or only do so in a cursory manner).

Re: GPU advancements in M3 and A17 Pro [video]

#95
post #71

Does M3 still outputs garbage which make external displays flicker? https://forums.macrumors.com/threads/m1-m2-flickering-ghosti... https://www.benq.com/en-us/knowledge-center/knowledge/how-to... https://www.howtogeek.com/805459/mac-flickering-external-scr...

Interestingly, that's a different component than the GPU on these chips, which is the typical architecture in SoCs.

In fact, even in discrete GPUs, the display scanout engine is generally a nearly completely independent block relative to the rest of the GPU.

Re: GPU advancements in M3 and A17 Pro [video]

#96
post #92

> I'm excited to tell you about the new Apple family 9 GPU architecture in A17 Pro and the M3 family of chips, which are at the heart of iPhone 15 Pro and the new Max. "The new Max"? He clearly meant "the new Macs". Kinda weird that Apple can't properly transcribe its own content.

I’ve also noticed this on lots of YouTube videos, where the creator clearly meant one thing, but the subtitles substitute a more common, similarly-sounding word with a different meaning. I suspect they have the videos transcribed externally, and don’t check the transcription (or only do so in a cursory manner).

Or automated transcription.

For YT vids, especially shorts, it's because churning out shorts/reels/tiktoks of clips from longer form videos (and/or with the split screen gameplay of some mobile game/minecraft platforming run) is now a common tactic for trying to gain tons of views on your account for monetisation later.

Re: GPU advancements in M3 and A17 Pro [video]

#97
post #92

> I'm excited to tell you about the new Apple family 9 GPU architecture in A17 Pro and the M3 family of chips, which are at the heart of iPhone 15 Pro and the new Max. "The new Max"? He clearly meant "the new Macs". Kinda weird that Apple can't properly transcribe its own content.

Why is it surprising, it's not like content ownership gives you any advantage in the typical transcription algorithms

Re: GPU advancements in M3 and A17 Pro [video]

#98

Earlier quoted context omitted.

I’ve also noticed this on lots of YouTube videos, where the creator clearly meant one thing, but the subtitles substitute a more common, similarly-sounding word with a different meaning. I suspect they have the videos transcribed externally, and don’t check the transcription (or only do so in a cursory manner).

Or automated transcription. For YT vids, especially shorts, it's because churning out shorts/reels/tiktoks of clips from longer form videos (and/or with the split screen gameplay of some mobile game/minecraft platforming run) is now a common tactic for trying to gain tons of views on your account for monetisation later.

I’ve also frequently seen it on long-form videos. I think the transcriptions must be at least partially reviewed by humans, because YouTube already has automatic transcription for videos without subtitles.

Re: GPU advancements in M3 and A17 Pro [video]

#99
post #8

Does apple document exactly how many actual true cores there are inside their GPUs? It is always confusing they say "40 core GPU" but I assume these are shader cores which each inside them can execute (per the video) "many thousands" of parallel execution paths. So how does one translate to an equivalent in "CUDA cores" type terminology?

Nvidia "cheat" by counting approximately ALUs.

Re: GPU advancements in M3 and A17 Pro [video]

#100
post #78

Earlier quoted context omitted.

Missing the games on XBox and Cloud offerings? Also many developers support even more than 2, as you are fogetting Playstation and Switch, both of which with their own APIs, 2 for Playstayon (GNM and GNMX), 3 for Switch (NVN, Vulkan and OpenGL).

There are 480k games on iOS. Yes, most of them are bad. But it's a fact that there are more games running on Metal than DirectX. >Also many developers support even more than 2, as you are fogetting Playstation and Switch, both of which with their own APIs, 2 for Playstayon (GNM and GNMX), 3 for Switch (NVN, Vulkan and OpenGL). I didn't imply that developers only support 2.

I guess the relevant question would then be how many of those games are actually developed using Metal directly, and not some other API using Metal “behind the scenes”. Relevant in regards to developer acceptance I mean.
Post reply on HN