
This time, we will look at the power control structure by looking at NVIDIA Blackwell’s white paper.
Below is the content about power control from the Blackwell white paper.
“Blackwell reduced latencies to enter and exit different power states. It also has the most advanced power gating of different units on a chip that we’ve ever built, with multiple new levels of gating allowing very fine-grained control of power.”
“In the case of the deepest sleep state, Blackwell is 10x faster to enter sleep than Ada, enabling much more power savings in the lowest-power sleep state.”
“With the Blackwell design, rail-gated states can be entered at a frame granularity, which is especially helpful for battery gaming and creating. The separate power rails allow lowering of power when the GPU is idling, by turning off the GPU cores when they are not needed, greatly increasing the overall efficiency of computers that rely on power management, such as laptops.”
To put it simply,
it has very fine-grained power control.
It performs power gating 10x faster than existing products.
Power-off is possible on a per-frame basis.
How was it possible to enable power gating 10x faster?
I think the solution is hardware-level control.
Power control often presents more exceptions than you might think, making it difficult to handle with a simple state machine.
State machines control complex operations by pre-determining the sequence of operations, such as “If A, then B, then C.” They are used to directly control hardware. However, as chips become more complex, determining the sequence of operations becomes more challenging. Unexpected cases arise, such as requiring additional delays when turning on and off, or incorrect power sequences sent by IP. Implementing all these cases with a state machine would result in an overly complex architecture.
The biggest problem is that a state machine requires a defined sequence, and implementing a state machine is impossible when the expected sequence is unknown.
However, NVIDIA appears to have achieved this feat.
At least at the lowest level (CUDA cores), they likely used hardware control, which allows for a 10x increase in speed.
They could have simplified the architecture to accommodate all sequences, or they could have created a state machine-like control unit. Even if they did, it’s unlikely that they controlled all 24,000 CUDA cores individually. Since the GPU’s most basic execution unit, a warp, consists of 32 warps, it’s likely that they grouped them into smaller clusters of 8 or 16 cores, and created a control unit based on these units. The upper cores can sufficiently control the lower cores with this control unit.
As you can see in the figure above, the Cluster Control Unit is the control unit, and since it collects and controls all hardware information in real time, it is the most important and essential part of the system.
When all CUDA cores are turned off, the information is passed to PSC Layer 5, and PSC Layer 4 can obtain control rights corresponding to Layer 4 based on this collected information. Since the upper cores can be turned off only when all lower cores are turned off, the order should be Layer 5 → 4 → 3 → 2 → 1 when turning them off, and conversely, the order should be Layer 1 → 2 → 3 → 4 → 5 when turning them on. The lower cores cannot be turned on first.
And, since it is possible to turn on/off per frame only if all power domains below Layer 3 can be turned off, it will probably be possible to control the PMIC directly from Layer 3 or control it through a specific interrupt. However, if even one CUDA core wakes up, the entire system can be affected, so PSC Layer 3 must secure authority over all systems below Layer 3 and must be able to safely power off even when a CUDA core requests to wake up. Of course, if a CUDA core requests to be kept alive, the system must be able to wake up immediately.
I can imagine, but I think it will require a lot of manpower and know-how to perform such complex layered control.
이번에는 엔비디아 블랙웰의 백서를 보고 파워 제어 구조를 살펴보겠습니다.
아래는 블랙웰 백서의 파워 제어에 대한 내용입니다.
” Blackwell reduced latencies to enter and exit different power states. It also has the most advanced power gating of different units on chip that we’ve ever built, with multiple new levels of gating allowing very fine grain control of power.”
“In the case of the deepest sleep state, Blackwell is 10x faster to enter sleep than Ada, enabling much more power savings in the lowest-power sleep state.”
“With the Blackwell design, rail-gated states can be entered at a frame granularity, which is especially helpful for battery gaming and creating. The separate power rails allow lowering of power when the GPU is idling, by turning off the GPU cores when they are not needed, greatly increasing the overall efficiency of computers that rely on power management, such as laptops.”
간단하게 정리해보면,
매우 fine-grain한 파워 제어를 한다.
기존 제품 보다 10배 빠르게 power gating을 한다.
프레임 단위로 power-off가 가능하다
어떻게 10배나 빠르게 power gating을 가능하게 할 수 있었을까요?
방법은 하드웨어 레벨에서의 제어라고 생각합니다.
파워 제어를 해보면, 생각보다 많은 예외 경우들로 단순한 state machine으로 처리하지 못할 때가 많습니다.
state machine 은 “A면 B하고, 그다음 C를 해”처럼 동작 순서를 미리 정해서 복잡한 동작을 제어하는 방식으로, 하드웨어를 직접 제어할때 사용하는데, 칩이 복잡해짐에 따라 동작 순서를 정하는 것이 그렇게 간단하지가 않습니다. on/off하는데 특정 시점에 delay를 더 줘야 한다던가, IP가 보내온 파워 시퀀스가 잘못됐다거나 하는등 예상치 못한 다양한 경우들이 발생하게 됩니다. 이런 모든 경우를 state machine으로 구현하려면, 구조가 너무 복잡해집니다.
가장 큰 문제는 state machine을 구성하려면 정해진 시퀀스가 있어야 하는데, 어떤 시퀀스가 생길지 알 수 없는 상황에서는 state machine을 구현을 할 수가 없는 것입니다.
그런데, 엔비디아는 이 어려운 일을 해낸 것으로 보입니다.
적어도 가장 하위 (CUDA 코어)레벨에서는 하드웨어 제어 방식을 사용했을 것으로 보입니다. 그래야 10배 빨라질 수 있기 때문입니다.
구조를 매우 단순화 시켜서, 모든 시퀀스에 대응하도록 했던가 아니면, state machine like한 컨트롤 유닛을 만들었을 수도 있습니다. 어떤식으로 했다고 하더라도, 2만 4천개의 CUDA 코어들을 개별적으로 제어하진 않았을 것 같습니다. GPU의 가장 기본적인 실행 단위인 워프가 32개이니 그보다는 작은, 8개 혹은 16개 단위의 클러스터 단위로 묶어, 이 단위로 제어유닛을 만들었을 가능성이 큽니다. 상위 코어들은 이 제어유닛으로 하위 코어들을 충분히 제어할 수 있습니다.
아래 그림에서 보면, 클러스터 컨트롤 유닛(Cluster Control Unit,CCU) 이 제어유닛이고, 모든 하드웨어 정보를 실시간으로 모으고 제어하기 때문에, 시스템에서 제일 중요하며 꼭 필요한 부분입니다.
모든 CUDA 코어가 꺼지면, 그 정보를 PSC(Power System Core) Layer5에 전달하게 되고, PSC Layer4는 이 모아진 정보를 바탕으로 Layer4에 해당하는 제어 권한을 획득할 수 있습니다. 하위 코어가 모두 꺼져야만 상위 코어가 꺼질 수 있다보니, 꺼질때는 Layer5→ 4→ 3→ 2→ 1 의 순서가 되어야 하고, 반대로 켤때는 Layer1→ 2→ 3→ 4→ 5 순이 되어야 합니다. 하위 코어들이 먼저 켜질 수는 없습니다.
그리고, Layer3이하 파워 도메인을 전부 off할 수 있어야 프레임 단위로 on/off가 가능해지기 때문에, 아마도 Layer3부터는 직접 PMIC를 제어하거나, 특정 인터럽트를 통해 제어할 수 있을 것입니다. 하지만 CUDA 코어가 하나라도 깨어나면 시스템 전체가 영향을 받을 수 있으니, PSC Layer3는 Layer3이하 모든 시스템의 권한을 확보해야 하고, CUDA 코어의 wake-up 요청에도 안전하게 power-off를 수행할 수 있어야 합니다. 물론, CUDA 코어가 1개라도 살려 달라고 요청을 한다면, 시스템은 바로 wake-up을 할 수 있어야겠죠.
상상은 할 수 있지만, 이렇게 복잡하게 layer된 제어를 하기 위해서는 많은 인력과 노하우가 필요하다고 생각합니다.
