1. 결론
acc 는 accumulator 의 줄임말, 계산 중간 결과를 계속 누적하는 변수 또는 register 를 의미한다.
CUDA 관점에서 더 정확히 말하자면
- warp : 32 개의 thread 실행 단위
- thread : 실제 instruction 을 실행하는 lane
- register : 각 thread 가 가진 빠른 저장 공간
- accumulator : register 에 들어 있는 누적용 중간값
acc2 는 warp 가 2 개 라는 뜻이 아닌,
acc2 = 각 thread 가 누적용 accumulator register 를 2개 사용한다는 뜻
2. warp 와 accumulator 의 차이
2.1 warp
NDIVIA GPU 에서 thread 가 실행되는 기본 scheduling 단위
하나의 warp 는 32 개의 thread 로 구성
threads_per_block=256 은 다음 처럼 해석
256 threads / 32 threads per warp = 8 warps
즉 이번 실험의 warps_per_block=8 은 block 안에 warp 가 8개 있다는 뜻
2.2 accumulator
accumulator 는 thread 내부에서 계산 결과를 누적하는 변수
다음 코드는 accumulator 가 하나인 형태
float acc = 0.0f;
acc = fmaf(a0, b0, acc);
acc = fmaf(a1, b1, acc);
acc = fmaf(a2, b2, acc);
acc = fmaf(a3, b3, acc);
acc 는 이전 결과를 계속 들고 있음
이런 구조를 acc1, single accumulator chain 이라고 볼 수 있다.
3. acc1 이 의미하는 것
SASS 에서 다음처럼 보일 수 있음
FFMA R16, R24, R16, R25
FFMA R16, R24, R16, R25
FFMA R16, R24, R16, R25
...
R16 이 계속 입력이자 출력으로 사용된다.
다음 instruction 은 이전 instruction 의 결과를 기다려야 한다.
이것이 dependenat chain
장점
- 사용 register 수가 적다
- sink/reduction 비용이 작다
단점
- dependency 가 길다
- ready instruction 이 부족할 수 있다.
- FFMA latency 를 숨기기 어렵다.
4. acc2 가 의미하는 것
하나의 긴 chain 을 두 개의 짧은 chain 으로 나눈다
두 개의 independent chain 이 교차됨
충분한 ILP 를 만들지만, live register 수는 과도하게 늘리지 않음
5. accumulator 는 thread 마다 따로 존재한다
중요한 점은 accumulator 가 warp 전체에 하나 있는 것이 아니라는 것
각 thread 가 자기 register 안에 accumulator 를 가진다.
acc 의 증가에 따른 ready instruction 이 증가,
하지만 live register 와 sink 비용도 같이 증가
'GPU Probing Lab' 카테고리의 다른 글
| Optimal Accumulator Count Probe (1) | 2026.05.20 |
|---|---|
| 10. Chain 7 Tail Distribution Probe (0) | 2026.05.20 |
| Irregular FMA Dependency Shape Probe (0) | 2026.05.20 |
| Kernel Code Shape와 Compiler Transformability - codegen 관점에서 SASS shape 안정성 이해하기 (0) | 2026.05.19 |
| Controlled Arithmetic Chain Probe 문서화 - chain length, progress scaling, SASS shape 변화 (0) | 2026.05.19 |