불규칙성의 대가: 해시 블록 GPU 워크로드에서 CUDA C++, Rust, Triton
What Irregularity Costs: CUDA C++, Rust, and Triton on a Hash-Blocked GPU Workload
한국어 초록
GPU 언어 비교는 거의 항상 타일형 밀집 선형 대수에서 수행되며, 모든 툴체인이 잘 동작하고 차이는 작다. 우리는 동일한 해시 블록 TSDF fusion 커널을 CUDA C++, NVIDIA cuda-oxide를 통한 Rust, Triton으로 각각 구현하고, 정반대 성격의 워크로드에서 측정한다: compare-exchange 삽입, 데이터 의존적 레인별 probe 깊이, 경합이 있는 scatter를 갖는 개방 주소법 해시 테이블. 결과는 갈림길이다. truncation band를 순회하며 누적하는 규칙적인 단계에서는 세 언어 모두 서로 작은 배수 안에 들어온다. probe와 삽입을 수행하는 불규칙적인 단계에서는 Rust가 수작업 CUDA C++에 가깝게 유지되는 반면 Triton은 한 자릿수 이상 더 느리다. 언어 선택은 보통 벤치마크되는 작업에서는 거의 공짜이고, 벤치마크되지 않는 작업에서는 비용이 크다. 우리는 두 격차 모두 비율이 아니라 언어가 표현할 수 없는 구체적인 것들 때문이라고 귀인한다. Triton의 비용은 compile-time 상한까지 실행해야 하는 probe 루프와 마스크를 받지 않는 tl.atomic_cas에서 비롯되며, 이는 CUDA에 대응物이 없는 스크래치 구조를 강제한다. Rust의 비용은 모든 명령어 수에서 보이지 않았다: 동일한 occupancy에서 더 적은 명령어, 더 적은 compare-exchange, 더 적은 레지스터를 발행하는 커널이었지만 더 느렸다. 하드웨어 카운터는 L1 체류(residency)에서 원인을 찾았다. GPU 범위(scope) atomic load는 SM 전반에서 일관(coherent)해야 하지만 NVIDIA L1은 그렇지 않으므로, 공유 위치를 읽는 타입-정확한 방식은 매 접근마다 캐시를 우회한다. Triton의 bounded probe는 fusion에서 정확성 문제이기도 하다: 일반적인 depth trajectory가 도달하는 load factor에서 조용히 블록을 버리며, 아무 보고 없이 재구성(reconstruction)이 표면의 패치를 잃는다. 또한 cuda-oxide 자체에서 발견해 수정한 결함을 보고하며, 이는 upstream에 병합되었다: scoped atomic load와 store가 실제 커널을 생성하는 빌드 모드에서 아예 호출될 수 없었다.
원문 초록
GPU language comparisons are almost always run on tiled dense linear algebra, where every toolchain is good and the differences are small. We implement the same hash-blocked TSDF fusion kernel in CUDA C++, in Rust through NVIDIA's cuda-oxide, and in Triton, and measure it on a workload with the opposite character: an open-addressed hash table with compare-exchange insertion, data-dependent per-lane probe depth, and contended scatter. The result is a split. On the regular stage, which walks a truncation band and accumulates, all three languages land within a small factor of each other. On the irregular stage, which probes and inserts, Rust stays close to hand-written CUDA C++ while Triton is more than an order of magnitude slower. Language choice is nearly free on the work that is usually benchmarked and expensive on the work that is not. We attribute both gaps to specific things the languages cannot express, not to ratios. Triton's cost follows from a probe loop that must run to a compile-time bound and from tl.atomic_cas taking no mask, which forces a scratch structure with no counterpart in CUDA. Rust's cost was invisible in every instruction count: its kernel issues fewer instructions, fewer compare-exchanges and fewer registers at identical occupancy, yet was slower. Hardware counters located it in L1 residency. A GPU-scope atomic load must be coherent across SMs, no NVIDIA L1 is, so the type-correct way to read a shared location bypasses the cache on every access. Triton's bounded probe is also a correctness problem for fusion: at load factors an ordinary depth trajectory reaches, it silently discards blocks and the reconstruction loses patches of surface with nothing reported. We also report a defect found and fixed in cuda-oxide itself, now merged upstream: its scoped atomic load and store could not be called at all in the build mode that produces real kernels.
제출 이력
확인된 버전만 표시합니다. 전체 제출 이력은 arXiv 원문에서 확인하세요.
- arXiv:2608.08287v1제출 시각 미확인
함께 살펴볼 논문
공통 태그를 근거로 연결했습니다. 실제 인용 관계나 논문의 우수성을 뜻하지 않습니다.
공통 태그로 연결된 공개 논문이 아직 없습니다.
토론
이 논문과 연결된 포럼 글이 아직 없습니다.