PyTorchKR Papers

최신 논문

총 2편
태그·기간 등 상세 필터

카테고리 탐색

로그인 후 이 태그 구독

arXiv:2610.10924v1cs.AR

에뮬레이션 텐서-메모리 평형(TME) 모델에서 누락된 네 번째 항: 잔차 분해 비용

The Missing Fourth Term for the Emulation Tensor Memory Equilibrium (TME) Model: The Residue Deconstruction Cost

"FP8 is All You Need (Part 1)"의 텐서-메모리 평형(Tensor-Memory Equilibrium, TME) 모델은 fp64에 대한 Ozaki Scheme II 에뮬레이션의 실행 시간을 텐서 코어 항과 고대역폭 메모리(HBM) 트래픽 항 중 더 큰 값에 출력당 재구성(reconstruction) 항을 더한 값으로 계산한다. 그러나 이 모델은 입력당 분해(deconstruction) 비용을 누락하고 있다: 스트리밍되는 모든 fp64 피연산자는 행렬 곱셈이 실행되기 전에 SIMT 파이프에서 스케일링, 라운딩, 그리고 $r$개의 모듈러스(moduli) 각각에 대한 모듈로 축소(modulo reduction)를 거쳐야 한다. 이 노트에서는 이 네 번째 항을 추가하고, cuBLAS 에뮬레이션 경로로부터 그 상수를 보정(calibrate)하며, 텐서 코어 처리량과 무관하게 에뮬레이션이 네이티브 fp64 성능에 도달할 수 없는 연산 강도(operational intensity) 임계값을 $\mathrm{OI}^{*} = c_q r P_{\mathrm{fp64}}/(8P_{\mathrm{int}})$라는 닫힌 형태(closed-form)로 도출한다. NVIDIA B300 GPU에서 이 임계값은 $\mathrm{OI}^{*}\approx 0.56$ FLOP/B이다. 그 결과, 원 논문이 가속 대상으로 주장하는 메모리 바운드 커널인 GEMV, SpMV, 그리고 저배치(low-batch) GEMV는 네이티브 성능의 0.3~0.9배로 제한되며, 7점 스텐실(stencil)은 주장된 3.1배가 아닌 1.8배에 그친다. 예상대로 밀집(dense) GEMM은 영향을 받지 않는다. 또한 우리는 잔차(residue)를 미리 계산하여 저장하는 방식이 동일한 비용을 대역폭 항으로 이전시킨다는 것을 보이며, 이 경계(bound)를 무효화하기 위해 구현이 달성해야 하는 명령어 수(instruction count)를 제시한다.

arXiv:2606.28565v1cs.PF

KernelSight-LM: A Kernel-Level LLM Inference Simulator

As large language models (LLMs) move into production serving, practitioners must rapidly evaluate inference performance across diverse hardware, models, and serving parameters to meet cost and latency targets. However, the end-to-end behavior of LLMs couples serving-layer policies with low-level GPU kernel execution and rapidly evolving architectures, forcing slow, deployment-specific benchmarking that is hard to generalize. We present KernelSight-LM, a fine-grained inference simulator that models token-level execution and produces kernel-level latency breakdowns. It decomposes each serving step into a roofline kernel model with a learned efficiency term, a communication model, and a host-overhead model, composed through a discrete-event scheduler that also captures mechanisms like prefix caching and continuous batching. KernelSight-LM offers two prediction tiers that trade target-GPU data for accuracy. The cross-generation tier uses no target-GPU measurements, only hardware specifications and kernel microbenchmarks from previously profiled GPUs, and predicts per-kernel latency on an unseen GPU generation to 12.1% error, a 1.8x improvement over the roofline baseline (22.0%). A second target-measured tier adds one model-agnostic kernel-microbenchmark sweep on the target GPU, sharpening per-kernel error to 3.8%, a 7.3x improvement over a comparable baseline (27.7%). Both tiers require far less target-GPU data than the prior systems they extend. In our simulator, these predictions yield end-to-end median (p50) errors across six model families of 15.4%, 12.8%, and 3.0% (TTFT, TPOT, throughput) in the cross-generation tier and 14.3%, 6.2%, and 2.7% in the target-measured tier, matching dedicated profiling tools while collecting far less on-device data. Beyond prediction, its kernel-level bottleneck breakdowns support hardware/software co-design and capacity planning.