AI 추론을 위한 메모리 재고찰
🇰🇷 한글 번역
메모리 근처에서 데이터를 처리하면 전력 소모를 줄이고 성능을 높일 수 있지만, 소프트웨어, 열, 그리고 아키텍처상의 과제가 여전히 남아 있다.
주요 내용:
- 연산을 메모리 근처로 이동시키면 데이터 이동, 전력 소비, 그리고 지연 시간을 줄일 수 있다.
- 다양한 AI 워크로드는 메모리 아키텍처, 인터커넥트, 그리고 처리 방식에 대해 서로 다른 접근 방식을 필요로 한다.
- 소프트웨어 지원, 표준화, 그리고 열 관리는 더 광범위한 채택을 위한 주요 장벽으로 남아 있다.
데이터 센터에서의 AI 학습에서 가장자리(엣지)에서의 AI 추론으로의 전환은 데이터가 어디에서, 어떻게 처리되고 저장되는지, 어떻게 우선순위가 정해지는지, 그리고 제한된 전력 예산 내에서 유지하기 위해 전력 및 성능 측면에서 무엇을 절충해야 하는지에 대한 근본적인 재고를 요구한다.
이러한 노력의 중심에는 데이터의 폭발적 증가, 특히 센서에서 실시간 스트리밍되는 데이터를 다루는 물리적 AI(Physical AI)에서 데이터의 폭발적 증가가, 이러한 데이터의 대부분을 메모리 가능한 한 가까운 곳에서 처리해야 한다는 필요성을 야기한다는 인식이 자리 잡고 있다. 이는 사물인터넷(IoT)의 태동기부터 논의되어 온 주제였으나, 데이터의 홍수와 이를 이동하고 처리하는 데 필요한 전력량에 대한 우려로 인해 AI와 함께 본격적으로 주목받기 시작했다. 예를 들어, 배터리 전기 자동차와 드론에서는 데이터를 처리하는 데 소비되는 에너지가 적을수록 충전당 주행 거리가 길어지며, 중요하거나 중요하지 않은 기능에 할당할 수 있는 에너지가 더 많아진다.
과제는 어떤 데이터를 유지해야 하고, 어떤 데이터를 버릴 수 있으며, 어떤 데이터에 대해 행동을 취해야 하는지를 이해하는 것이다. 이러한 요소들은 매우 다른 우선순위를 가진다. 이러한 선택을 내리려면 고급 처리가 필요하며, 최소한의 에너지로 가장 빠른 결과를 얻는 길은 처리와 메모리 간에 데이터가 이동해야 하는 거리를 최소화하는 것이다.
"거대 언어 모델(LLM)이 물리적 장치로 진입하는 현실은 모든 사람이 메모리 아키텍처를 어떻게 설계할지 다시 생각하게 만들고 있다,"라고 Cadence의 제품 관리 그룹 디렉터인 프랭크 페로(Frank Ferro)는 말했다. "심지어 처리를 메모리 내에서 수행하는 것에 대해 논하지 않더라도, 기존 메모리를 사용할 때 전체 프로세서와 메모리 서브시스템의 성능을 극대화하기 위해 이러한 모델을 어떻게 분할할 것인가?"
이러한 문제들을 해결하려면 메모리 근처 처리(PNM)와 메모리 내 처리(PIM)와 같은 새로운 접근 방식과 여러 기술 및 접근 방식 전반의 개선이 필요하다. 컴파일러와 운영 체제는 뒤처진 부분을 따라잡아야 하며, 표준이 확립되어야 한다.
"데이터 센터의 AI와 모든 거대 언어 모델들은 지난 몇 년간 모두의 관심을 받아왔으며, 이제 이러한 모델들은 훈련되어 현장으로, 네트워크의 가장자리와 물리적 AI로 배포되고 있다,"라고 페로는 말했다. "현실은 컴퓨팅 파워와 메모리가 제한되어 있다는 것이다."
가장자리에서의 AI 추론은 AI 데이터 센터에서 AI 모델을 학습시키는 것과 다른 도전 과제를 제시한다.
“훈련은 거의 항상 매우 가변적인 메모리 접근 패턴을 수반하며, 주로 Python에서 PyTorch로와 같은 인터프리터 코드 사용과 관련되어 있어, 메모리 계층 간 일관성 유지의 복잡성이 필요합니다.”라고 Quadric의 최고 마케팅 책임자(Chief Marketing Officer)인 스티브 로디(Steve Roddy)는 말했다. “한번 추론이 시작되면 사용 모델은 극적으로 변합니다. 데이터 센터에서 대형 언어 모델(LLM)을 실행하든, 자동차 내의 소형 LLM이나 VLAs(시각-언어-액션 모델)와 같이 로컬에서 실행되는 모델을 보든, 실행하기 전에 모델이 이미 알려져 있습니다. 이는 데이터 접근 패턴이 사전에 알려져 있음을 의미합니다. 여기서 사전 컴파일(Ahead-of-time compilation)이 메모리 내(at-memory), 메모리 주변 처리(in-memory), 또는 메모리 내 연산(IMC) 옵션의 다양한 이점을 최대한 활용할 수 있습니다. 시스템은 연산이 어디서, 언제, 어떻게 발생할지 정확히 알고 있습니다. 연산 솔루션의 한 요소가 다른 메모리 하위 시스템에서 데이터가 조작되었는지 추측할 필요가 없습니다. 왜냐하면 전체 시스템 오케스트레이션은 AI 추론 모델이 컴파일될 때, 즉 몇 시간, 며칠, 혹은 몇 주 전에 미리 계획되었기 때문입니다.”
AI 추론 파이프라인의 특정 단계는 다른 단계보다 메모리 근접(near-memory) 솔루션의 혜택을 더 크게 받습니다.
“계산을 DRAM으로 또는 DRAM 근처로 이동시키는 것은 흥미로운 함의를 가집니다.”라고 Expedera의 최고 과학자이자 공동 창립자이자인 샤라드 콜레(Sharad Chole)는 말했다. “통신 패턴을 변경합니다. 즉, 내 활성화(activation)가 메모리로 가는 것이 아니라, 내 메모리가 활성화로 가는 것이 됩니다. 이는 수행해야 할 통신의 양을 변화시킵니다. 이러한 유형의 솔루션은 낮은 배치(low-batch) 디코딩에는 적합합니다. 예를 들어, 배치 크기가 1이고 디코딩을 시도하며 모든 가중치를 읽지 않는 경우입니다. 하지만 비용 최적화된 대형 배치 디코딩이나 대형 배치 실행인 프리필(prefill) 단계로 이동하면, 활성화 통신이 어려운 부분이 됩니다. 이것이 이를 바라보는 두 가지 방식입니다. 결국, 실행을 저장 공간(저장해야 하는 데이터의 양 측면에서), 대역폭, 또는 배치 크기에 민감한 부분으로 분할해야 합니다.”
어쨌든, 계산을 데이터에 더 가까이 가져오면 데이터를 이동하는 데 소요되는 시간과 에너지를 줄일 수 있으며, 동일한 메모리 패키지(사용자 정의 HBM)나 동일한 메모리 다이(LPDDR6-PIM) 내에서 처리하는 것은 두 가지 근본적인 이점을 제공합니다. “그중 하나는 성능입니다.”라고 Cadence의 제품 마케팅 디렉터인 코스 기체프(Kos Gitchev)는 말했다. “SoC 내부에 있는 CPU나 코어를 고려할 때, 연산을 수행할 때마다 메모리로 나가야 하며, 이는 ‘SoC 내 어딘가의 캐시에 도달할 데이터를 메모리에서 가져와 주세요’라고 말하는 트랜잭션을 의미합니다. 이는 결국 메모리로 이동했다가 캐시로 돌아와 다시 프로세서로 돌아옵니다. 이 작업은 상당한 시간이 걸립니다.”
따라서 칩 아키텍트들이 SoC에서 계산을 빠르게 실행할 수는 있지만, SoC는 데이터가 도착하기를 기다려야 합니다. “메모리 내 처리는 이러한 문제를 크게 해결합니다.”라고 기체프는 말했다. “이제 ‘이 메모리 데이터 덩어리가 메모리에 있으니, 그것으로 무언가 연산을 수행하고, 저는 결과만 읽으면 됩니다. 읽고, 다시 계산하고, 다시 저장하는 전체 단계를 건너뛰겠습니다. 저는 읽기만 하면 되고, 그것이 제가 필요로 하는 전부입니다.’라고 말할 수 있습니다.”
그림 1: 메모리 내 연산(CIM) 대 메모리 내/근접 연산 — 수학 연산이 이루어지는 위치와 각 용어의 의미. CIM과 IMC는 하드웨어 분야에서 메모리 어레이 내에서 직접 연산 작업을 수행하는 아키텍처를 설명하는 데 상호 교환적으로 사용되지만, IMC는 별도의 소프트웨어 의미도 가지고 있다. 출처: 반도체 엔지니어링
데이터 이동 감소
궁극적으로 전체 시스템은 이 방식이 작동하도록 최적화되어야 한다.
“논의의 초점이 ‘우리가 더 많은 메모리가 필요하다’에서 ‘다른 트래픽을 기아 상태로 만들지 않으면서 메모리에 데이터를 계속 공급할 수 있는 파브릭이 필요하다’로 바뀌었다,”라고 Baya Systems의 최고상무책임자(CCO)인 난단 나이암팔리는 말했다. “최근에는 ‘희소성 자체를 어떻게 아키텍처화할 것인가’가 화두가 되고 있다.”
다른 전문가들도 동의한다. “AI 시스템은 컴퓨팅, 메모리, 가속기, 칩렛 및 다이 간에 데이터를 효율적으로 이동시키는 능력에 의해 점점 더 제한되고 있다,”라고 Arteris의 제품 관리 및 마케팅 부사장인 앤디 나이트인게일은 말했다. “이로 인해 인터커넥트와 메모리 아키텍처가 메모리 디바이스 자체만큼이나 중요해졌다. 이는 고객이 실리콘 제작 전에 데이터 이동을 최적화하는 데 도움이 되는 확장 가능한 네트워크 온 칩(NoC), 칩렛, 캐시 일관성 및 시스템 매핑 기술에 대한 필요성을 강화한다.”
인터커넥트, 캐싱 방식 및 패키징은 엣지(Edge) 환경에서 점점 더 중요한 역할을 하고 있지만, 비용을 낮게 유지하면서 올바른 조합을 선택하는 것은 도전 과제이다. 따라서 고대역폭 메모리(HBM)의 새로운 버전들이 멀티 다이 스택의 베이스 다이에서 더 많은 연산을 가능하게 하고 있지만, DRAM 뱅크 옆에 연산 슬라이스를 배치하는 LPDDR6-PIM이 비용에 따라 더 매력적일 수 있다.
“근접 메모리 컴퓨팅은 여전히 외부 채널 인터페이스를 사용하고 있다,”라고 SK하이닉스의 수석 부사장 겸 펠로우인 호식 김은 말했다.[1] “하지만 처리 장치를 메모리 데이터 근처에 배치함으로써 우리는 데이터 이동을 상당 부분 제거하거나 없앨 수 있으며 더 높은 에너지 효율성을 얻을 수 있다. 또한 호스트 CPU나 GPU에서 연산 기능을 오프로딩할 수 있으므로 호스트 CPU나 GPU의 활용도를 높일 수 있다.”
일반적인 사용 사례에는 베이스 다이 내부의 메모리 컨트롤러가 포함된다. “우리는 간단한 MAC(누적 곱 및 합산) 연산을 오프로딩하기 위해 몇 가지 유용한 근접 메모리 처리 장치를 통합하고 있다,”라고 김은 말했다. “추론 워크로드 연산을 생각해보면, 대부분의 함수 연산은 간단한 MAC 연산이기 때문이다. 따라서 우리는 베이스 다이 안에 MAC 연산을 배치하여 확장하고, 더 복잡하고 연산 집약적인 작업의 경우 GPU와 함께 작동할 수 있다.”
다년간의 과정
필요한 기술 중 일부는 오늘날 이미 사용 가능하다. 다른 기술들은 개발에 수년이 걸리거나, 실질적인 차이를 만들 수 있을 정도로 개선되는 데 시간이 더 걸릴 것이다.
“우리는 3~5년 후, 아마도 2030년 경에 메모리 내 응용 프로그램을 보고 있다,”라고 Ayar Labs의 제품 관리 책임자인 비샬 찬드라세카르는 말했다. “여러 GPU를 연결하여 서로 다른 GPU가 다른 GPU의 메모리에 접근할 수 있도록 하고자 한다. 사람들은 GPU당 메모리 양을 늘리려고 노력하고 있지만, 패킷 크기와 HBM 대역폭 등의 제한으로 인해 한계가 있다. 메모리 내 연산은 메모리의 베이스 다이에 어떤 형태의 연산 능력을 부여하는 하나의 경로이다.”
그럼에도 불구하고 해당 기술은 아직 상용화에 완전히 준비되지 않았다. “이미 시장에서 이를 보고 있다고 말하는 것은 다소 공격적인 주장이다,”라고 Cadence의 페로는 말했다. “특정 임베디드 응용 분야에서 메모리 내 연산의 일부를 사용하고 있을 수 있지만, 광범위한 사용 측면에서는 아직 초기 단계이다.”
메모리 내 처리(PIM) 솔루션은 연구 단계에서 상용화 단계로 천천히 이동하고 있다. 예를 들어, 삼성전자는 저전력 모바일 온디바이스 AI 애플리케이션을 목표로 하는 LPDDR6-PIM 칩의 아키텍처와 성능 벤치마크를 발표했다.
“JEDEC 내에서 가장 많은 주목을 받고 있는 것은 LPDDR-PIM입니다.” 키사이트의 메모리 솔루션 프로그램 매니저인 랜디 화이트가 말했다. “LPDDR-PIM을 둘러싼 활발한 개발과 논의가 이루어지고 있지만, 하드웨어와 소프트웨어 양쪽 모두에 과제가 존재합니다. 하드웨어 관점에서 보면 로직 공정과 DRAM 공정을 혼합하게 되는데, 이들은 서로 다른 지표를 위해 최적화되어 있으므로 이러한 혁신 자체가 제조 공정을 더 복잡하고 비싸게 만듭니다. 매우 신중하게 선택해야 하며, 애플리케이션이 추가되는 비용을 감당할 수 있는지 확인해야 합니다. LPDDR6-PIM의 애플리케이션은 성능에 최적화된 고정 노드 에지 서버부터 효율성에 최적화된 모바일 폰과 태블릿까지 다양할 것입니다.”
하드웨어보다 더 까다로운 것은?
소프트웨어 과제가 더 어려울 수도 있다. “작업 부하의 치우침과 로드 밸런싱을 어떻게 관리하느냐?”라고 화이트는 지적했다. “체스판 스타일의 메모리 어레이나 코어를 가정해 보자. 메모리의 약 10개 열마다 수직으로 잘라낸 로직 실리콘을 배치한다고 가정해 봅시다. 이 PIM 다이(칩)를 현미경으로 들여다보면, 특정 수의 행마다 조각이 반복되는 체스판이 보일 것입니다. 이것만으로도 일부 타이밍 제약이 존재합니다. 한 행에 접근하는 동안 계산 엔진에서 명령어 계산이 완료될 때까지 기다려야 합니다. 따라서 단순히 데이터를 가져오고 다른 뱅크 접근 간 타이밍을 맞추는 문제가 아닙니다. 이제 메모리 접근과 계산 데이터 대기 시간이 결합됩니다. 핵심은 데이터를 덜 이동해야 한다는 점입니다. 인접한 셀 간에 데이터를 이동하므로 이는 매우 좋습니다. 하드웨어 관점에서는 전력 소모가 줄어드는 등의 이점이 있습니다. 하지만 BIOS를 작성하고 동기화를 위한 스케줄러를 만들어야 하는 엔지니어에게 있어서는 복잡성이 폭발적으로 증가했습니다.”
PIM 아키텍처는 시스템의 나머지 부분에 미치는 영향을 고려해야 한다. “하드웨어는 적절한 수의 계산 계수 등을 갖도록 설계되고 최적화되어야 합니다.”라고 화이트는 말했다. “그런 다음 메모리는 너무 세밀한 해상도를 가지지 않도록 분리되어야 하므로, 분리 측면에서 적절한 coarse(거시적)와 fine(미세) 간 트레이드오프를 확보해야 합니다.”
그림 2: 근접 데이터 컴퓨팅이 잠재력을 발휘하기 위해 해결해야 할 사항. 출처: SK하이닉스/DAC
또한 메모리 프로그래밍 모델은 여전히 변동 중이며, 특히 PIM, CIM(Cache-In-Memory), CXL 연결 계층형 메모리, 이종 메모리 아키텍처와 같은 비전통적 메모리 시스템의 부상으로 더욱 그러하다.
“산업이 단일 프로그래밍 모델과 일관성 구현 방식에 수렴할 것이라고 생각하지 않습니다.” 램버스(Rambus)의 펠로우이자 저명 발명가인 스티븐 우(Steven Woo)의 말이다. “지난 40년 동안 시스템 설계자와 애플리케이션 개발자에게 서로 다른 트레이드오프를 제공해 온 다양한 프로그래밍 모델, 일관성 프로토콜, 그리고 일관성 모델이 구현되어 왔습니다. 아키텍처와 일관성 구현 방식의 다양성은 서로 다른 시스템에 최적화된 방식으로 구현된 공통 함수를 호출할 수 있도록 하는 더 높은 성능의 라이브러리 개발 필요성을 촉진하고 있습니다. 고성능 라이브러리는 프로그래머가 하부 하드웨어의 모든 세부 사항을 이해해야 하는 부담 없이 프로그램의 이식성과 성능 확장성을 향상시키는 수준의 추상화를 유지합니다.”
컴파일러 및 메모리 컨트롤러 고려 사항
새로운 메모리 아키텍처를 지원하기 위해 소프트웨어 혁신이 필요합니다.
“더 이상 PIM(메모리 내 처리)이 실현 가능한지, 혹은 타당한지에 대한 질문은 아닙니다.” SK하이닉스의 킴(Kim)의 말이다. “이미 현실입니다. 문제는 소프트웨어 컴파일러 프레임워크와 시스템 소프트웨어를 어떻게 만들 것이냐는 점입니다. 생태계 전체가 이에 따라야 합니다.”
Cadence의 기체프(Gitchev)도 동의했다. “현재의 실제 과제는 시스템이 컴파일러, 운영 체제, 그리고 모든 것이 SoC 내부에 위치한 프로세서 코어나 가속기와 함께 작동하도록 설계되어 있으며, 모든 것이 이 프로세서가 모든 작업을 수행하도록 설계되어 있다는 점입니다. 이것이 바로 인프라입니다. 이제 본질적으로 프로세서 작업의 일부를 오프로딩하고 ‘이 연산을 수행해야 하는데 프로세서가 이를 수행할 필요는 없다’고 말할 수 있습니다. 이를 수행하기 위해서는 그 뒤에 전체 인프라가 필요합니다. 여기에는 소프트웨어 측면도 포함됩니다. 운영 체제와 프로세서는 ‘이 연산들은 메모리로 보내면 메모리가 처리하고 결과만 받으면 되지만, 이 연산들은 여전히 로컬에서 수행해야 합니다. 왜냐하면 제가 가진 메모리가 이를 처리하지 못할 수도 있고, 제 시스템이 그렇게 효율적이지 않을 수 있기 때문입니다’라고 이해해야 합니다.”
칩 내부의 표준화 필요성도 있습니다. “이러한 것들을 어떻게 연결합니까?”라고 기체프는 물었다. “현재로서는 프로세서에서 SoC 파브릭을 거쳐 메모리로 이동하는 트랜잭션의 유형에 관해 ‘메모리에서 이 연산을 수행하라’고 말하는 좋은 방법이 없습니다. 이러한 인프라가 아직 존재하지 않습니다. 메모리에 이러한 작업을 수행하라고 지시할 수 있는 하드웨어와 프로토콜이 필요하며, 그 다음에는 시스템이 이를 수행하고 무엇이 효율적인지 결정할 수 있도록 시스템을 지원할 소프트웨어와 운영 체제가 필요합니다.”
이는 두 가지 데이터 스트림으로 귀결됩니다. “저는 저장, 읽기, 쓰기를 수행하는 데이터 스트림을 가지고 있습니다.”라고 페로(Ferro)는 설명했다. “그런 다음 저는 연산을 수행하는 데이터 스트림을 가지고 있는데, 이는 운영 체제와 프로세서가 구축된 방식에 본질적으로 속하지 않습니다. 이제 프로세서 회사들과의 협력, 프로세서와 파브릭, 시스템 간의 인터페이스, 그리고 물론 운영 체제가 필요합니다. 이러한 모든 요소들이 조정되어야 합니다. 그것이 큰 조정일 수도 있고 아닐 수도 있지만, 표준화 없이는 모든 시스템이 매우 맞춤형으로 만들어질 것입니다.”
홈 에이전트 및 메모리 컨트롤러
근접 메모리 및 메모리 내 아키텍처는 트래픽 관리와 시스템 일관성에 고유한 압력을 가합니다.
“전통적인 하드웨어 일관성 시스템에서 홈 에이전트는 시스템 전반에 걸쳐 공유 데이터가 어디에서 사용되고 있는지 추적하고, 처리 요소들이 데이터의 정확한 사본을 갖도록 보장하는 책임을 집니다.”라고 램버스(Rambus)의 우(Woo)는 설명했다. “하드웨어 일관성은 프로그래머가 처리 요소 간 데이터 업데이트를 관리할 필요성을 제거함으로써 프로그래밍을 단순화합니다. 락과 배리어와 같은 동기화 원시 연산자 및 소프트웨어 일관성은 데이터가 어떻게 그리고 언제 업데이트될지에 대해 애플리케이션에 추가적인 수준의 제어권을 제공합니다. 이러한 하드웨어 및 소프트웨어 메커니즘은 모두 결합되어, 하드웨어 추상화 수준을 유지하면서 기본 하드웨어의 세부 사항을 숨기는 효율적인 알고리즘을 설계할 수 있게 하며, 이는 시스템에서 일관성을 유지하기 위해 데이터가 업데이트되는 방식을 프로그래밍하고 관리하는 작업을 용이하게 합니다.”
이는 소프트웨어 엔지니어들이 하드웨어를 더 깊이 이해해야 할 필요가 증가하고, 그 반대의 경우도 마찬가지임을 의미합니다.
“문제 크기가 커지고 처리 요소의 수가 증가함에 따라 확장 가능한 좋은 성능을 달성하는 것이 점점 더 어려워지고 있습니다.”라고 우는 말했습니다. “홈 에이전트가 프로그래머에게 일관성 관리의 부담을 덜어주지만, 일관성을 유지하기 위해 홈 에이전트가 보내는 메시지들이 성능 병목 현상이 될 수 있습니다. 프로그래머들은 좋은 성능을 달성하기 위해 하드웨어의 기본 구조와 기능에 대한 이해가 점점 더 필요합니다. 알고리즘은 종종 작업의 독립성을 극대화하고 시스템 내에서 이동하는 일관성 트래픽의 양을 최소화하는 방식으로 데이터를 샤딩하도록 수정됩니다. 일부 시스템에서는 하드웨어 일관성 메커니즘을 전혀 사용하지 않는 것이 가장 좋은 성능을 제공하지만, 프로그래밍 작업을 복잡하게 만듭니다.”
메모리 컨트롤러는 두 가지 도전에 직면해 있습니다. “하나는 PHY와 컨트롤러로 구성된 메모리 서브시스템 부분입니다.”라고 Cadence의 기체프(Gitchev)는 말했습니다. “컨트롤러 자체가 실제로 작업을 수행해야 하는 명령들이 있는 곳입니다. 하지만 이제 우리는 다른 세트의 명령들을 가지고 있습니다. 그전에는 근본적으로 두 가지 다른 명령, 즉 데이터를 읽고 데이터를 쓰는 것, 그리고 그것이 전부였습니다. 제어는 그보다 훨씬 복잡하지만, 높은 수준에서는 그것이 하는 일입니다. 그것은 가능한 가장 효율적인 방식으로 데이터를 읽고 씁니다. 이제 우리는 다른 세트의 명령과 규칙이 필요한 새로운 도전에 직면하고 있습니다. 즉, ‘이 데이터를 가져다가 곱셈을 하고, 메모리 안의 이 데이터를 가져다가 나눗셈을 하거나, 다른 연산을 수행해 보세요’라고 말하는 것입니다. 컨트롤러가 그러한 작업을 수행하는 것은 큰 도전이 아닙니다. 우리는 더 많은 명령을 추가하고, 그것이 어떻게 작동하는지 파악하며, 효율적으로 만들려고 노력할 것입니다.”
두 번째 도전은 더 어렵습니다. “프로세서는 이러한 명령들을 보낼 수 있어야 합니다.”라고 기체프는 말했습니다. “프로세서는 메모리 서브시스템 내부의 메모리를 준비해야 합니다. 즉, ‘이 데이터를 저 데이터와 곱셈하려면, 올바른 데이터가 올바른 위치에 있는지, 결과가 올바른 위치에 있는지, 이 연산이 완료되었는지’를 확인해야 합니다. 컨트롤러는 그중 일부 관리를 하지만, 전체 시스템과 매우 밀접하게 협력해야 합니다.”
열, 물리학 및 CIM(Compute In Memory)
메모리 근처에서 처리하는 것은 데이터 트래픽을 줄이는 데 도움이 될 수 있지만, 열 문제와 같은 기존 물리학 문제를 증폭시킬 수도 있습니다.
“메모리 부족 현상은 부분적으로 현재 최첨단 설계와 사용 가능한 메모리의 활용 방식에 기인합니다.”라고 빈치(Vinci)의 글로벌 필드 애플리케이션 및 솔루션 책임자 사티시 라다크리슈난(Satish Radhakrishnan)은 말했습니다. “혁신적인 설계는 단위당 수요를 줄이고 활용도를 향상시키는 데 도움이 될 수 있습니다. 메모리 활용도를 높이기 위한 가장 실현 가능한 솔루션들, 즉 더 높은 HBM 스택, 맞춤형 HBM, 메모리 근접 컴퓨팅, 인메모리 컴퓨팅, 그리고 칩렛 기반의 디에그리게이션(분리형 설계)은 모두 하나의 공통된 특성을 공유합니다. 즉, 대역폭 문제를 물리적 문제로 교환한다는 점입니다. 메모리를 컴퓨팅에 더 가깝게 적층하면 열이 제거하기 가장 어려운 곳에 집중됩니다. 이종 소재 스택과 마이크론 규모의 인터커넥트는 다이, 패키지, 기판 간의 경계를 무시하는 열기계적 스트레스와 뒤틀림(warpage) 현상을 초래합니다. 열은 칩에서 멈추지 않으며, 그에 따른 제약 조건들도 마찬가지입니다.”
이러한 이유로 메모리 기업들은 새로운 아키텍처와 함께 새로운 열 관리 기술을 발표하는 경향이 있습니다. 예를 들어, SK하이닉스는 HBM 패키지에 통합 냉각 요소(ICEs)를 내장한 통합 HBM(iHBM) 솔루션을 발표했습니다. 마이크론의 최근 로드맵에는 PHY 위에 히트 스프레더를 갖춘 열 인식 설계가 적용된 수직 HBM(vHBM)이 포함되었습니다. 삼성은 하이브리드 구리 본딩(HCB)과 HBM5에 포함할 계획인 히트 패스 블록(HPB)을 포함한 다양한 솔루션을 통해 열 문제를 해결하고 있습니다. [2]
SK하이닉스의 김씨는 HBM 베이스 다이의 열을 줄이기 위해 인메모리 컴퓨팅을 제안했습니다. 그는 “논리 회로 위에 DRAM을 배치하면 DRAM은 온도에 매우 민감합니다.”라고 말했습니다. “논리 회로는 핫스팟에 매우 취약합니다. 기본적으로 핫스팟은 메모리 하단에서 발생합니다. 열 관리는 실제적인 도전 과제가 될 수 있으며, 이러한 문제를 해결해야 합니다. 인메모리 컴퓨팅이 해결책이 될 수 있습니다. 이는 극도로 낮은 전력 소비를 가지므로, 인메모리 컴퓨팅을 베이스 다이나 메모리 하단에 배치할 수 있을 것입니다.”
실제 환경에서 IMC/CIM은 파운드리 논리 공정을 기반으로 구축된 베이스 다이 때문에 맞춤형 HBM4 또는 HBM4E와 함께 작동할 수 있습니다. SRAM은 네이티브 메모리이므로, SRAM CIM 매크로를 그곳에 구축할 수 있습니다. CIM은 SRAM 어레이 내에서 곱하기-누산(MAC) 연산을 수행하므로, 가중치가 메모리와 별도의 MAC 유닛 사이를 반복적으로 이동할 필요가 없습니다. 데이터 이동이 대부분의 에너지를 소비하므로, SRAM CIM 매크로는 기존 디지털 가속기보다 와트당 연산 수 측면에서 훨씬 뛰어난 에너지 효율성을 보입니다. 연산당 에너지가 적다는 것은 전력 밀도가 낮다는 것을 의미하며, 이는 DRAM 하단의 핫스팟이 줄어든다는 것을 뜻합니다.
결론
소프트웨어 지원은 메모리 근접 하드웨어와 그 AI 잠재력 사이의 결여된 고리입니다. 컴파일러와 AI 프레임워크 관점에서 볼 때, 메모리 근접 컴퓨팅 및 인메모리 아키텍처는 개발자가 수학적 연산자를 메모리 서브시스템으로 직접 오프로딩할 수 있게 해주는 새로운 타겟으로 부상하고 있지만, 이러한 전환을 지원하기 위한 소프트웨어는 아직 뒤처져 있습니다.
사용 가능한 컴퓨팅 성능과 그 한계는 아키텍처에 따라 다릅니다. LPDDR6-PIM은 행렬-벡터 곱셈 및 요소별 연산에 적합한 MAC 유닛이나 간단한 ALU로 제한됩니다. 맞춤형 HBM4/HBM4E 논리 프로세스 베이스 다이는 다른 메모리 제어 기능을 추가할 수 있습니다. 하지만 이러한 유연성에는 열적 한계가 따릅니다. DRAM 하단에 추가되는 열에 따라 얼마나 많은 컴퓨팅을 수용할 수 있는지가 결정됩니다.
“우리는 지난 2년 동안 맞춤형 HBM과 그 베이스 레이어를 어떻게 활용할지에 대해 많은 시간을 할애해 왔습니다.”라고 Cadence의 페로(Ferro)는 지적했습니다.
AI는 연산을 메모리 근처로 가져오려는 움직임을 주도하고 있지만, 근접성만으로는 이러한 이점을 실현할 수 없다. 더 광범위한 채택은 워크로드와 하드웨어를 일치시키고, 열을 관리하며, 컴파일러와 운영체제가 오프로드할 대상을 결정할 수 있는 도구를 갖추는 것에 달려 있다. 연산을 이동하는 것은 해결책의 일부에 불과하며, 시스템을 효율적으로 활용하게 만드는 것이 다음 과제가 될 것이다.
참고 문헌
- DAC 2026 연구 특별 세션: “Near-Memory Processing is Becoming a Reality” (SK하이닉스)
- 차세대 AI 메모리를 위한 냉각 설계가 주요 쟁점으로 부상 (코리아타임스)
관련 읽을거리
커스텀 HBM 비즈니스는 어떻게 작동할 것인가?
아직 만능 해결책은 존재하지 않는다.
태그: AI Arteris Ayar Labs Baya Systems Cadence compute-in-memory Expedera in-memory compute Keysight EDA LPDDR memory near-memory processing in memory processing-near-memory Quadric Rambus SK Hynix Vinci
📄 원문 (English)
Processing data closer to memory could reduce power and boost performance, but software, thermal, and architectural challenges remain.
Key Takeaways:
- Moving compute closer to memory can reduce data movement, power consumption, and latency.
- Different AI workloads require different approaches to memory architecture, interconnects, and processing.
- Software support, standardization, and thermal management remain major barriers to wider adoption.
The shift from AI training in data centers to AI inferencing at the edge will require a fundamental rethinking of where and how data is processed and stored, how it is prioritized, and what needs to be traded off in terms of power and performance to stay within a limited power budget.
At the center of these efforts is a recognition that the explosion of data — especially in physical AI where data is being live-streamed from sensors — requires much of that data to be processed as close to memory as possible. This has been a topic of discussion since the inception of the Internet of Things, but it really began gaining traction with AI due to the flood of data and concerns about the amount of power required to move and process it. In battery-electric vehicles and drones, for example, the less energy spent on processing data, the greater the range per charge and the more energy that can be allocated to critical and not-so-critical functions.
The challenge is understanding what data needs to be kept, what can be discarded, and what needs to be acted upon. Those are very different priorities. Making those choices requires advanced processing, and the quickest path to results using the least amount of energy is to minimize the distance data needs to travel between processing and memory.
“The realities of these LLMs getting into physical devices are causing everyone to rethink how they architect their memory,” said Frank Ferro, group director for product management at Cadence. “Even with conventional memory — without even talking about processing in memory — how do I partition these models to maximize the performance both of the overall processor and memory subsystem?”
Solving those issues will require several new approaches, such as processing near memory (PNM) and processing in memory (PIM), as well as improvements across multiple technologies and approaches. Compilers and operating systems will need to catch up, and standards will need to be established.
“AI in the data center and all these large language models have been the focus of everyone’s attention for the last couple of years, and now these models have been trained and pushed out into the field, into the edge of the network and physical AI,” Ferro said. “The reality is you have limited compute power and limited memory.”
AI inferencing at the edge presents different challenges than training AI models in AI data centers.
“Training almost always involves highly variable memory access patterns, and mostly involves the use of interpreted code — for example, Python to PyTorch — which necessitates the complexities of coherence across layers of memory,” said Steve Roddy, chief marketing officer at Quadric. “Once inference begins, the use model changes dramatically. Whether you are looking at big LLMs running in a data center, or models running locally, such as smaller LLMs or VLAs (vision-language-action) in cars, the model is known before you run it. That means the data access patterns are known ahead of time. This is where ahead-of-time compilation can start to take great advantage of the various at-memory, processing-in-memory, or in-memory-compute (IMC) options. The system knows exactly where, when, and how the compute is going to occur. There is no need for one element of a compute solution to guess if something manipulated the data while it was in another memory subsystem, because the entire system orchestration was planned out hours, days, or weeks before, when the AI inference model was compiled.”
Certain stages of the AI inference pipeline benefit from near-memory solutions more than others.
“Pushing the compute into the DRAM or near the DRAM has interesting implications,” said Sharad Chole, chief scientist and co-founder of Expedera. “You’re moving your communication pattern — my activation goes to memory, rather than my memory goes to activation — and that changes how much communication you need to do. These sort of solutions are okay for low-batch decode. For example, if you have batch one and you are trying to do decode and you are not reading all the weights, as soon as we move to large-batch decode, which is cost-optimized, or prefill, which is large-batch execution, the activation communication becomes the challenging part. These are the two ways to think about it. In the end, you have to break your execution into parts that are either storage-sensitive, in terms of how much data you need to store, or bandwidth-sensitive, or batching-sensitive.”
Either way, bringing compute closer to data can reduce the time and the energy spent moving it, and processing in the same memory package (custom HBM), or on the same memory die (LPDDR6-PIM), provides two fundamental advantages. “One of them is performance,” said Kos Gitchev, product marketing director at Cadence. “If we’re looking at a CPU or a core sitting inside the SoC, and every time you need to do an operation you’ve got to go out to memory, there’s a transaction that says, ‘Okay, get me some data from the memory that’s going to hit a cache somewhere in the SoC.’ That will eventually go to memory. It will come back to the cache and eventually come back to the processor. This operation really takes some time.”
So while chip architects can get compute running quickly on an SoC, the SoC has to wait for data to arrive. “Processing in memory to a large degree addresses this,” said Gitchev. “Now you can say, ‘I have this chunk of memory data in the memory, go do something with it, and I’m just going to go read the results. I’m going to skip this whole step of reading it, compute again, and putting it back. I’m just going to do a read, and that’s all I need.'”
Swipe left to view all columns →
Fig. 1: Compute-in-memory vs. processing-in/near-memory — where the math happens and what each term means. Note that CIM and IMC are used interchangeably in hardware to describe architectures that perform computational tasks directly within the memory array, but IMC also has a separate software meaning. Source: Semiconductor Engineering
Reducing data movement
Ultimately, the entire system needs to be optimized to make this scheme work.
“The framing has shifted from, ‘We need more memory,’ to, ‘We need fabric that keeps memory fed without starving other traffic,'” said Nandan Nayampally, chief commercial officer at Baya Systems. “More recently it’s, ‘How to architect around scarcity itself.'”
Others agree. “AI systems are increasingly limited by the ability to move data efficiently between compute, memory, accelerators, chiplets, and dies,” said Andy Nightingale, vice president of product management and marketing, at Arteris. “This makes the interconnect and memory architecture as important as the memory device itself. This reinforces the need for scalable NoC, chiplet, cache coherence, and system mapping technologies that help customers optimize data movement before silicon.”
Interconnects, caching schemes, and packaging all play increasingly significant roles at the edge, but choosing the right combination while also keeping costs down is a challenge. So while new versions of high-bandwidth memory are enabling more processing in the base die of a multi-die stack, an LPDDR6-PIM that places slices of compute alongside the DRAM banks may be more attractive, depending on the cost.
“Near-memory computing is still using an external channel interface,” said Hoshik Kim, senior vice president and fellow at SK hynix.[1] “But by putting processing units near memory data, we can actually get rid of or remove a lot of data movement and have higher energy efficiency. Also, we can offload the compute function from the CPU or GPU, so that we can have better utilization of the host CPU or GPU.”
Typical use cases involve memory controllers inside the base die. “We are integrating some useful near-memory processing units to offload simple MAC operations,” said Kim. “Because, if you think about inference workload operations, most function computation is a simple MAC operation. So we could put MAC operations inside the base die to expand for and then work with the GPU for a more complex, compute-intensive operation.”
Multi-year process
Some of the necessary technologies are available today. Others will take years to develop, or improve enough to the point where they can make a difference.
“We are looking at in-memory applications in three to five years, maybe around 2030,” said Vishal Chandrasekar, director of product management at Ayar Labs. “You want to be able to connect up many GPUs so that you are able to have different GPUs access the memory of others. People are trying to ramp up the amount of memory per GPU, but you’re limited by packet size and HBM bandwidths and the like. Compute in memory is one path, which makes it so the base die of your memory now has compute capabilities of some kind.”
Still, that technology is not quite ready for commercialization. “It’s a little aggressive to say that we’re already seeing it out in the market,” said Cadence’s Ferro. “There might be some very specific embedded applications that are using a type of processing in memory, but as a broad usage, it’s still pretty early.”
Processing-in-memory solutions are slowly moving from research to commercialization. For example, Samsung announced the architecture and performance benchmarks for its LPDDR6-PIM chip aimed at low-power, mobile on-device AI applications.
“LPDDR-PIM is the one that has got the most attention within JEDEC,” said Randy White, memory solutions program manager at Keysight. “There is active development and discussion around LPDDR-PIM, but there are challenges for both the hardware and software. From a hardware standpoint, you’re mixing logic process with DRAM process, and they’re optimized for different metrics, so that innovation itself makes the manufacturing process more complex and expensive. You have to be very selective and make sure you know your application can sustain the added cost of that.” Applications for LPDDR6-PIM will range from fixed-node edge servers optimized for performance to mobile phones and tablets optimized for efficiency.
Trickier than hardware?
The software challenges may be even more difficult. “How do you manage workload skew and load balancing?” White noted. “Let’s say you take a checkerboard-style memory array or core, and every 10 columns or so of memory, you stick a vertical slice of logic silicon. If you were to take that PIM die, put it under a microscope, you’d see a checkerboard with slices repeated every certain number of rows. That by itself has some timing constraints. While you’re accessing one row, you have to wait for calculation to an instruction to be complete on the compute engine. So it’s not just a matter of fetching data and balancing timings between different bank accesses. Now you have memory access coupled with waiting for compute data. The whole point is that I don’t have to move data as much. I’m moving data between adjacent cells, and that’s great. From a hardware standpoint, you get lower power, etc. But for the engineer who’s writing the BIOS, who has to create the scheduler for synchronizing, that has just exploded in terms of complexity.”
PIM architectures need to be considered in terms of the impact on the rest of the system. “The hardware has to be designed and optimized so you have the right number of compute coefficients and things like that,” said White. “Then the memory has to be segregated in a way that you don’t have too fine resolution, so you have the right coarse and fine trade-offs in terms of separation.”
Fig. 2: What must be solved for near-data computing to achieve its potential. Source: SK hynix/DAC
Additionally, memory programming models are still in flux, particularly with the rise of non-traditional memory systems such as PIM, CIM, CXL-attached tiered memory, and heterogeneous memory architectures.
“I don’t think the industry will settle on a single programming model and coherence implementation,” said Steven Woo, fellow and distinguished inventor at Rambus. “Over the last 40 years, different programming models, coherence protocols, and consistency models have been implemented that provide different trade-offs to systems designers and application developers. The diversity of architectures and coherence implementations is driving the need for more high-performance libraries to be developed that allow programmers to call common functions that are implemented in ways that are optimized for different systems. High-performance libraries maintain a level of abstraction that improves program portability and performance scalability without burdening the programmer with understanding all details of the underlying hardware.”
Compiler and memory controller considerations
Software innovations are needed to support new memory architectures.
“The question is no longer whether a PIM is viable or makes sense,” said SK hynix’s Kim. “It’s a reality. The problem is how to make a software compiler framework and system software. All of the ecosystem needs to follow up.”
Cadence’s Gitchev agreed. “The real challenge is that currently the systems are designed so that the compilers, operating system, and everything works with a processor core or an accelerator sitting inside your SoC, and everything is designed for this processor to do all the work,” he said. “That’s the infrastructure. Now, essentially, you can offload some of that processor work and say, ‘I need to do this operation, and I don’t really need the processor to do it.’ There’s a whole infrastructure behind that to be able to do that. There’s a software aspect. The operating system and the processor need to understand, ‘These operations I can send to memory, they’ll do it, and I’ll just get the results, but these operations I still have to do locally because the memory I have may not be able to do it, or my system is not as efficient.'”
There’s also the need for standardization inside the chip. “How do you connect these things together?” said Gitchev. “Today we don’t really have a good way to say, ‘Go and do this operation in memory,’ as far as the type of transactions that move from the processor to the SoC fabric to memory. This infrastructure is not there. We need the hardware and protocol to be able to tell memory to go do this stuff, and then we need the software and the operating system to support the system to be able to do this and decide what’s efficient.”
This comes down to two streams of data. “I’ve got a stream of data that’s storing and reading and writing,” explained Ferro. “Then I’ve got a stream of data that’s compute, and that’s not native to the way operating systems and processors are built. You now need cooperation with the processor companies, the interface between the processor and the fabric, the system, and then of course the operating system. All those pieces need to get adjusted. It may or may not be a big adjustment, but without standardization, everyone’s system is going to be highly customized.”
Home agents and memory controllers
Near-memory and in-memory architectures introduce distinct pressures to traffic management and system coherence.
“In traditional hardware coherent systems, home agents are responsible for tracking where shared data is being used throughout the system and making sure processing elements have correct copies of the data,” explained Rambus’ Woo. “Hardware coherency eliminates the need for programmers to manage the updating of data across processing elements, simplifying programming. Synchronization primitives like locks and barriers, and software coherence give applications an additional level of control over how and when data is updated. Together, these hardware and software mechanisms enable efficient algorithms to be designed that maintain a level of hardware abstraction that hides the details of the underlying hardware, easing the task of programming and managing the way data is updated to maintain coherence in systems.”
That means software engineers increasingly need to understand the hardware, and vice versa.
“Achieving good, scalable performance as problem sizes grow and the number of processing elements increases is becoming more difficult,” said Woo. “While home agents remove the burden of managing coherence from the programmer, the messages sent by home agents to maintain coherence can become performance bottlenecks. Programmers increasingly need to understand the underlying structure and functions of the hardware to achieve good performance. Algorithms are often modified to shard data in ways that maximize the independence of tasks and minimize the amount of coherence traffic traveling in the system. In some systems, utilizing no hardware coherence mechanisms results in the best performance, but complicates the task of programming.”
The memory controller faces a twofold challenge. “One part is the memory subsystem, which consists of a PHY and a controller,” said Cadence’s Gitchev. “The controller itself is where these commands need to actually do the work. But now you have a different set of commands. Before that, you fundamentally had two different commands — read data, write data, and that’s about it. The control is a lot more complicated than that, but at a high level, that’s what it does. It reads data and writes data in the most efficient way possible. Now a different challenge is coming in where we need a different set of commands and rules to say, ‘Hey, now can you go take this data and multiply it, and take this data inside the memory and divide it, or do an operation.’ It’s not a significant challenge for a controller to do that. We add more commands, and we’ll figure out how that works, and try to make it efficient.”
The second challenge is harder. “The processor needs to be able to send those commands,” said Gitchev. “It needs to prepare a memory inside the memory subsystem to say, ‘If I’m going to multiply this data by that data, do I have the right data in the right place? Do I have the results in the right place? This operation is complete.’ The controller manages some of that, but it also has to have very close collaboration with the overall system.”
Thermal, physics, and CIM
Processing near memory can help reduce data traffic, but it could amplify existing physics problems, such as thermal issues.
“The memory shortage is partially due to current state-of-the-art design and use of available memory,” said Satish Radhakrishnan, head of global field applications and solutions at Vinci. “Innovative design can help reduce demand per unit and improve utilization. The most viable solutions to increasing memory utilization — including higher HBM stacks, custom HBM, near-memory, in-memory compute, and chiplet-based disaggregation — all share one property. They trade a bandwidth problem for a physics problem. Stacking memory closer to compute concentrates heat in exactly the places it’s hardest to remove. Heterogeneous material stacks and micron-scale interconnects create thermo-mechanical stress and warpage behavior that doesn’t respect the boundaries between die, package, and board. Heat doesn’t stop at the chip, and neither do the constraints that come with it.”
For this reason, memory companies tend to announce new thermal technology with their new architectures. For example, SK hynix announced an integrated HBM (iHBM) solution that embeds integrated cooling elements (ICEs) within the HBM package. Micron’s recent roadmap included vertical HBM (vHBM) with thermally aware design and a heat spreader over the PHY. Samsung is tackling heat issues with a range of solutions, including hybrid copper bonding (HCB) and a heat path block (HPB), which it plans to include in HBM5. [2]
SK hynix’s Kim proposed in-memory compute to reduce heat in the HBM base die. “If you put DRAM on top of logic, DRAM is very sensitive to temperature,” he said. “Logic is very prone to hot spots. Basically, the hot spots happen at the bottom of memory. Thermal can be a real challenge, and you need to resolve these issues. In-memory computing can be an answer. It has extremely low power consumption, so you can probably put in-memory computing at the base die or the bottom of memory.”
In practice, IMC/CIM could work with custom HBM4 or HBM4E because the base die is built on a foundry logic process. SRAM is the native memory, meaning that SRAM CIM macros can be built there. CIM does multiply-accumulate inside the SRAM array, so weights aren’t repeatedly moved between memory and a separate MAC unit. Data movement is where most of the energy goes, which is why SRAM CIM macros report far better energy efficiency, in operations per watt, than conventional digital accelerators. Less energy per operation means lower power density, so fewer hot spots under the DRAM.
Conclusion
Software support remains the missing link between near-memory hardware and its promise for AI. For compilers and AI frameworks, processing-near-memory and in-memory architectures are emerging targets that could let developers offload mathematical operators directly to the memory subsystem, but the software needed to support that shift is still catching up.
The available compute — and the limits on it — differ by architecture. LPDDR6-PIM is limited to MAC units or simple ALUs suited to matrix-vector multiplication and element-wise math. A custom HBM4/HBM4E logic-process base die can add other memory-control functions. But that flexibility comes with a thermal ceiling — how much compute fits depends on the heat it adds beneath the DRAM.
“We have spent a lot of time over the last two years talking about custom HBM and how to use that base layer,” noted Cadence’s Ferro.
AI is driving the push to bring compute closer to memory, but proximity alone will not deliver the gains. Broader adoption depends on matching workloads to the hardware, managing heat, and giving compilers and operating systems the tools to decide what to offload. Moving the compute is only part of the solution; making the system use it efficiently is the next test.
References
- DAC 2026 Research Special Session: “Near-Memory Processing is Becoming a Reality” (SK hynix)
- Cooling design emerges as battleground for next-gen AI memory (Korea Times)
Related Reading
How Will The Custom HBM Business Work?
There is no one-size-fits-all — yet.
Tags: AI Arteris Ayar Labs Baya Systems Cadence compute-in-memory Expedera in-memory compute Keysight EDA LPDDR memory near-memory processing in memory processing-near-memory Quadric Rambus SK Hynix Vinci
▶ 칩 라이브 24 홈으로 — chiplive24.com