AscendGYM: A Cost-Aware Kernel Optimization Benchmark for Real-World Workloads on Ascend NPUs

arXiv:2611.17621 · 2026-11-18 공개 · arXiv · PDF

model-evaluation llm-training ascend-npu cost-aware kernel-optimization speedup-token-score real-world-workloads search-orchestration

Abstract

Kernel optimization is essential for efficient large language model (LLM) training and inference on Ascend NPUs. Existing Ascend kernel benchmarks primarily focus on kernel generation, with less emphasis on the ability of agents to optimize existing implementations under input configurations drawn from real workloads. To address this requirement, we introduce AscendGYM, a benchmark whose initial suite comprises 48 kernels across three difficulty levels. Each kernel is paired with test cases whose data types and tensor shapes are collected from real-world training and inference tasks. Consequently, performance improvements on AscendGYM map directly to the corresponding workloads. In terms of usability, two evaluation modes are supported in AscendGYM: model evaluation and model-harness evaluation. The kernel optimization capabilities of both trained models and custom agents are allowed to be measured. It provides a complete execution environment that closely reproduces how Ascend kernels are invoked in practical pipelines. For model evaluation, it additionally includes a built-in harness equipped with search orchestration and experience accumulation. Finally, we propose a new metric, the Speedup-Token Score (STS), which quantifies performance gains relative to token cost. By jointly considering speedup and cost, STS enables the assessment of practical kernel optimization capability of a model or harness under an acceptable budget. AscendGYM is available at https://github.com/SLAI-AITP/AscendGYM.

한국어 요약

한 줄 요약

AscendGYM은 실제 작업 부하를 반영한 Ascend NPU용 커널 최적화 성능을 평가하는 벤치마크로, 48개 커널과 새로운 STS 지표를 제시한다.

핵심 기여도

핵심 아이디어

기존 커널 벤치마크는 주로 커널 생성에 집중했으나, AscendGYM은 기존 커널을 실제 작업 부하 조건에서 최적화하는 능력을 평가하는 데 초점을 맞춘다. 이는 실제 LLM 훈련 및 추론 작업에서 발생하는 텐서 형태와 데이터 타입을 반영한 테스트 케이스를 사용함으로써 가능하다. 예를 들어, MindSpeed-LLM 및 vLLM-Ascend에서 수집한 프로파일링 데이터를 기반으로 병목 커널을 추출하고, 각 커널 최적화 작업에는 기존 커널 소스 코드, 텐서 입력/출력 형식, CPU 기반 참조 출력이 포함된다. 이는 수치 정확도 검증과 고립된 커널 성능 측정을 가능하게 한다.

AscendGYM은 기존 커널 최적화 과정을 반복적 개선과 경험 축적을 통해 진행되도록 설계되어 있으며, AuraKernel이라는 기본 하네스를 통해 전략 검색과 경험 요약을 지원한다. 이는 모델이 성능 향상과 함께 토큰 소비를 최소화하는 방식으로 최적화를 수행하도록 유도한다.

기술적 접근법

주요 결과

의의 및 한계

AscendGYM은 실제 작업 부하를 반영한 커널 최적화 평가를 가능하게 하며, 모델과 하네스의 조합을 통해 다양한 최적화 전략을 비교할 수 있다. 특히, STS 지표는 토큰 소비를 고려한 실용적 최적화 능력을 평가하는 데 유용하다. 그러나 현재는 48개 커널 중 17개만 평가되었으며, 나머지 31개 작업(Batch 2, 3)에 대한 평가 확장이 필요하다. 또한, 커널 최적화 과정에서 모델이 생성한 코드의 정확도와 안정성 검증이 필수적이며, 이는 AscendForge의 정확도 검증 기능에 의존한다.

실용적 활용

AscendGYM은 Ascend NPU 기반 LLM 훈련 및 추론 시스템의 커널 최적화 능력을 평가하는 데 활용될 수 있다. 특히, 클라우드 서비스 제공자나 AI 연구소에서 모델 훈련 효율성을 높이기 위해 커널 최적화 자동화 도구를 개발할 때 유용하며, 다양한 하네스와 모델의 조합을 비교하여 최적의 최적화 전략을 도출할 수 있다.