많은 연구 기관과 기업에서는 여전히 비용 효율적인 PCIe 기반 GPU 서버를 사용합니다. 그러나 기존 라이브러리들은 PCIe 환경에서 NUMA 구조로 인한 트래픽 충돌,
중간 CPU 메모리 버퍼(bounce buffer) 사용 시 병목, GPU 간 직접 전송(direct transfer)의 성능 저하 등의 문제를 고려하지 못합니다.
TCCL은 이러한 한계를 극복하기 위해 설계된 집합 통신 라이브러리입니다. TCCL은 네트워크 및 PCIe 계층의 병목을 진단하고, 최적 경로 탐색(pathfinder) 및 통신
런타임(runtime) 모듈을 통해 효율적인 통신 경로를 자동으로 구성합니다.
TCCL은 기존 NCCL 기반으로 구현되어 PyTorch 등 주요 딥러닝 프레임워크와 호환되며, 별도의 코드 수정 없이 쉽게 사용할 수 있습니다.
TCCL은 다양한 PCIe 기반 GPU 클러스터 환경에서 성능을 검증하였으며, 기존 state-of-the-art 통신 라이브러리인 NCCL 및 MSCCL 대비 최대
2.07배 빠른 성능을 달성하였습니다.
Many research institutions and companies continue to utilize cost-effective PCIe-based GPU servers.
However, existing libraries often fail to account for various issues in PCIe environments, such as
traffic congestion caused by NUMA architectures,
bottlenecks when using intermediate CPU memory buffers (also known as bounce buffers), and
performance degradation of GPU direct transfers.
TCCL is a collective communication library designed to overcome these limitations.
It automatically constructs efficient communication paths by diagnosing bottlenecks in the network
and PCIe layers through its pathfinder and runtime modules.
Built on top of NCCL, TCCL is fully compatible with major deep learning frameworks such as PyTorch,
allowing users to adopt it without any code modifications.
TCCL is evaluated on various PCIe-based GPU cluster environments, achieving up to
2.07× higher performance compared to state-of-the-art communication libraries such
as NCCL and MSCCL.
PCIe 기반 시스템이란?
What are PCIe-dependent systems?
GPU 클러스터 시스템은 크게 NVLink, NVSwitch와 같은 고속 전용 인터커넥트를 사용하는 고대역폭 시스템(high-bandwidth systems)과,
PCIe 및 CPU 메모리를 경유하는 통신에 의존하는 PCIe 기반 시스템(PCIe-dependent systems)으로 나눌 수 있습니다.
후자의 경우 주로 범용 서버 부품으로 구성된 비용 효율적인 시스템에서 많이 사용되며, 실제로 Microsoft Philly, Alibaba PAI 등의 클러스터 트레이스 분석
결과에 따르면,
현재 클러스터 환경의 약 90% 이상이 이러한 PCIe 기반 시스템으로 구성되어 있습니다.
이러한 PCIe 기반 시스템에서는 GPU 간 데이터 전송이 CPU 메모리와 NUMA 노드를 경유하기 때문에, 링크 병목이나 비효율적인 메모리 경로 사용으로 성능 저하가 발생하기
쉽습니다.
하지만 기존 집합 통신 라이브러리들은 NVLink 기반 고성능 시스템을 중심으로 최적화되어 있어 PCIe 기반 시스템에서 최적 성능을 내기 어려운 상황입니다.
GPU cluster systems can generally be categorized into two types:
high-bandwidth systems that utilize dedicated high-speed interconnects such as NVLink and
NVSwitch,
and PCIe-dependent systems that rely on PCIe and CPU memory for communication.
The latter are typically built with off-the-shelf server components and are widely used for
cost-effective deployments.
In fact, according to cluster trace analyses from Microsoft Philly and Alibaba PAI, more than 90% of
current cluster environments are composed of such PCIe-based systems.
In such PCIe-based systems, data transfers between GPUs often traverse CPU memory and NUMA nodes,
making them prone to link bottlenecks and inefficient memory paths that can significantly degrade
performance.
However, existing collective communication libraries are primarily optimized for high-performance
NVLink-based systems,
making it difficult to achieve optimal performance on PCIe-dependent systems.
Topologies of a high-bandwidth and a PCIe-dependent system
TCCL
TCCL
TCCL은 NVLink나 외부 PCIe 스위치와 같은 고속 전용 인터커넥트가 없는 시스템에서 집합 통신 성능을 가속하기 위해 개발된 라이브러리입니다.
TCCL은 Profiler, Pathfinder, 그리고 Runtime으로 구성됩니다.
TCCL is a collective communication library designed to accelerate communication performance on
systems that lack dedicated high-speed interconnects,
such as NVLink or external PCIe switches. TCCL consists of three components: Profiler,
Pathfinder, and Runtime.
Overview of TCCL
1. 기존 벤치마크들이 단일 전송 성능만 측정하는 것과 달리, TCCL Profiler는 복수의 전송이 동시에 발생할 때의 전체 완료 시간과 대역폭을 측정해 congestion
상황을 정확하게 진단합니다.
1. Unlike conventional benchmarks that only measure the performance of single transfers, TCCL
Profiler accurately diagnoses congestion by measuring the total completion time and bandwidth when
multiple transfers occur simultaneously.
TCCL Profiler
2. TCCL Pathfinder는 GPU 간 다양한 통신 경로를 실제로 프로파일링하여 혼잡(congestion)이 발생하지 않는 최적의 경로를 자동으로 탐색하는 모듈입니다.
GPU 수가 증가할수록 가능한 경로의 수는 지수적으로 증가하기 때문에, 모든 경로를 탐색하는 것은 현실적으로 불가능합니다.
이를 해결하기 위해 Pathfinder는 노드 내(intra-node) 경로를 먼저 측정한 후, 여러 싱글 노드 경로를 효율적으로 결합하여 멀티 노드 경로를 구성합니다.
2. TCCL Pathfinder is a module that automatically searches for optimal communication paths between
GPUs by profiling actual transfer performance and identifying routes that avoid congestion.
As the number of GPUs increases, the number of possible paths grows exponentially, making exhaustive
search impractical.
To address this, the Pathfinder first measures intra-node paths and then efficiently combines
multiple single-node paths to construct multi-node communication paths.
Merging two linear chains
3. TCCL Runtime은 기존 NCCL을 수정한 구현으로, Pathfinder가 찾은 최적 경로를 NCCL의 통신 알고리즘에 적용하여 실행합니다.
사용자는 기존 PyTorch 등 NCCL 기반 소프트웨어를 코드 변경 없이 그대로 사용할 수 있으며, TCCL 적용 시 자동으로 최적화된 경로가 활용됩니다.
3. TCCL Runtime is a modified implementation of NCCL that applies the optimal communication paths
discovered by the Pathfinder to NCCL’s collective communication algorithms.
Users can continue to use existing NCCL-based software, such as PyTorch, without any code changes,
and TCCL will automatically utilize the optimized paths during execution.
Acknowledgements
Acknowledgements
본 연구는 과학기술정보통신부 선도연구센터사업(ERC)의 지원을 받아 수행된 연구입니다 (과제번호: RS-2023-00222663, 초거대 AI 모델 및 플랫폼 최적화 센터).
This work was supported by the National Research Foundation of Korea (NRF) under Grant No.
RS-2023-00222663 (Center for Optimizing Hyperscale AI Models and Platforms, ERC).
Contributors
Contributors
김희훈*, 유준열*, 이재진*+
* 서울대학교 컴퓨터공학부 + 서울대학교 데이터사이언스대학원
Heehoon Kim*, Junyeol Ryu*, Jaejin Lee*+
*Department of Computer Science and Engineering, Seoul National
University +Graduate School of Data Science, Seoul National University