Skip to main content
Power Canvas
Power should be turned off and on in real time, but CPU issues the command in non-real time (2/3)

December 30, 2024

Power must be turned on and off in real time, but the CPU issues commands in non-real time, so power system design is difficult. To explain it a little more easily, let’s take a more specific example with the hottest LLM (Large Language Model) or NPU (Neural Processing Unit) chips in the computing market these days. 

Many companies enthusiastically start making chips, saying, “Power consumption is a problem worldwide, so we’ll make our NPU chips consume the least power.” They claim, “Our company’s algorithm is excellent, so the chip consumes the least power (TOPS/W) per second of the work it can process in the world,” and they can gain an advantage over existing companies in this regard. 

However, when you look at chatGPT in action, you can see that it is not used continuously, but only when necessary. If you look at a long period of time, such as a day, a week, or a month, chatGPT is mostly waiting.
If you ask chatGPT, it will say that more than 50% of the total time is waiting time. So the actual waiting time is probably longer. If you think about it a little, not only is there no one who uses chatGPT like a real-time conversation, but even if they do, the user does not type continuously but thinks while typing, so the waiting time is bound to exceed 50%. When you recognize this situation, you realize how important it is to reduce the power consumption during the waiting period in terms of power consumption, and you start to think about active power control. However, reducing the power consumption during the waiting period is not as easy as you think. 

This is because you need to control the power of the NPU so that it can respond immediately when the user requests,
but 
the NPU is a subsystem that is in charge of a specific function from the perspective of the entire computer, and the subsystem does not have the authority to control power. Therefore, in a situation where you do not know when the user will type on chatGPT, the NPU must always be on to respond immediately when a request is made. 

Then, you may think, why don’t the O/S notify the NPU in real time whether LLM is being used? However, the O/S is too busy. If the O/S is not busy when the user starts typing on chatGPT, it will make the NPU work in real time without a problem. However, if the O/S is very busy and has to run both the CPU and GPU, the NPU may not be able to start working even after the user has finished typing. This will result in a very bad user experience. 

Then, let’s think about the case where the NPU controls its own power. The first thing that comes to mind is a situation where the NPU turns off its own system without a command from the O/S, and the O/S does not know about this and issues a work command to the NPU. If the NPU is off and the O/S issues a command, the system will malfunction. When the system malfunctions, it will just stop or die. This is the worst situation a user can experience. 

In this way, since the O/S cannot give commands in real time and the NPU does not have the authority, it is impossible to create a control system that can respond to the waiting period of more than 50% of the total usage period.


Power는 real time으로 끄고 켜야 하는데, CPU는 non-real time으로 명령을 내리기 때문에 power 시스템 설계가 어려운 얘기를 하고 있습니다. 조금 더 쉽게 설명하기 위해 요즘 컴퓨팅 시장에서 가장 핫한 LLM(Large Language Model) 전용 혹은 NPU(Neural Processing Unit) 칩으로 조금 더 구체적인 예를 들어보겠습니다.

“전세계적으로 전력 소비가 문제가 되니까, 우리 NPU칩은 전력을 가장 적게 소모하도록 만들꺼야” 라고 많은 회사들이 의욕적으로 칩을 만들기 시작합니다. “우리 회사의 알고리즘은 훌륭하기 때문에, 칩이 1초 동안 처리할 수 있는 작업량 대비 소비하는 전력(TOPS/W)이 전세계에서 가장 적어” 라고 주장하고, 이 부분으로 기존 업체 대비 우위를 점 할 수도 있습니다.

하지만, 실제 chatGPT를 사용하는 것을 보면 쉬지 않고 계속해서 사용하는 것이 아니라, 필요할 때만 사용합니다. 하루,한 주, 한 달 긴 시간을 놓고 보면 chatGPT는 대부분 대기를 하고 있는 것이죠.
chatGPT에게 물어보아도, 전체 시간의 50% 이상이 대기 시간이라고 얘기합니다. 그러니 실제 대기 시간은 더 길 것입니다. 조금만 생각해보면, chatGPT를 끊임없이 실시간 대화 하듯이 마구 사용하는 사람도 없을 뿐 아니라, 실시간 대화 하듯이 마구 사용한다고 하더라도, 사용자가 쉬지 않고 계속 입력하는 것이 아니라 생각을 하면서 입력을 하기 때문에 대기 시간이 50%를 넘을 수 밖에 없다는 것을 알게 됩니다. 이런 상황을 인지하게 되면, 대기 구간의 power를 줄이는 것이 전력 소비 측면에서 얼마나 중요한 지를 알게 되고, 적극적인 power 제어를 고민하게 됩니다.
하지만, 대기 구간의 power 소모를 줄이는 일은 생각보다 쉬운 일이 아닙니다.

왜냐하면, 사용자가 요청할 때 즉시 반응할 수 있도록 NPU의 power를 제어해야 하는데,
NPU는 전체 컴퓨터 입장에서 보면 특정 기능을 담당하는 sub system이고, sub system은 power제어 권한이 없습니다. 따라서 사용자가 언제 chatGPT에 타이핑을 할지 알 수 없는 상황에서, 요청이 있을 때 즉시 반응하기 위해서 NPU는 항상 켜져 있어야 합니다.

그럼 O/S가 LLM사용 여부를 실시간으로 NPU에게 알려주면 되지 않냐? 라고 생각할 수도 있지만, O/S는 너무 바쁩니다. 사용자가 chatGPT에 타이핑을 시작할 때 O/S가 바쁘지 않다면, 문제 없이 실시간으로 NPU에게 일을 시키겠지만, O/S가 CPU도 돌리고 GPU도 돌려야 하는 매우 바쁜 상황이라면, 사용자는 타이핑을 마쳤는데도, NPU에게 일을 시키지 못해 NPU는 일을 시작도 못하고 있을 수도 있습니다. 이는 매우 좋지 않은 사용자 경험으로 나타나게 됩니다.

그렇다면 이번에는, NPU 스스로 power를 제어하는 경우를 생각해볼 수 있습니다. 바로 떠오르는 상황은, O/S의 명령 없이 NPU가 스스로 자신의 시스템을 껐는데, O/S는 이것을 모른 채로 NPU에 작업 명령을 내린 상황입니다. NPU는 꺼져 있는데 O/S가 명령을 내리면, 시스템은 오작동을 하게 됩니다. 시스템이 오작동을 하게 되면 그대로 멈춰버리거나, 죽어버리게 됩니다. 사용자가 경험할 수 있는 가장 좋지 않은 상황이죠.

이처럼 O/S입장에서는 실시간으로 명령을 주지 못해서, NPU입장에서는 권한이 없어서,
전체 사용 기간의 50%가 넘는 대기 구간을 대응할 제어 시스템을 만들지 못하는 것입니다.