1. 문제의식
이번 controlled arithmetic chain probe는 dependent ADD/FMA chain의 길이를 조절하여, chain length가 warp progress signature에 어떤 영향을 주는지 확인하기 위한 실험이다.
비교 대상은 다음 네 가지 role이다.
controlled_dependent_add_8
controlled_dependent_fma_8
controlled_dependent_add_16
controlled_dependent_fma_16
여기서 _8, _16은 loop body 안에 포함된 dependent arithmetic instruction sequence의 길이를 의미한다.
즉 단순히 chain “개수”가 늘어난 것이 아니라, 하나의 dependent chain 안에서 직렬로 이어지는 arithmetic step 수가 8에서 16으로 증가한 것이다.
2. chain의 의미
이 문맥에서 chain은 다음과 같은 데이터 의존성 흐름을 의미한다.
FADD R14, R7, R14
FADD R14, R7, R14
FADD R14, R7, R14
FADD R14, R7, R14
각 instruction은 이전 instruction이 만든 R14 값을 다음 source operand로 다시 사용한다.
데이터 흐름은 다음과 같다.
R14_0
↓
FADD → R14_1
↓
FADD → R14_2
↓
FADD → R14_3
↓
FADD → R14_4
FMA도 동일하다.
FFMA R14, R2, R14, R7
FFMA R14, R2, R14, R7
FFMA R14, R2, R14, R7
데이터 흐름은 다음과 같다.
R14_0
↓
FFMA → R14_1
↓
FFMA → R14_2
↓
FFMA → R14_3
따라서 chain length 8은 dependent arithmetic step이 8개인 구조이고, chain length 16은 dependent arithmetic step이 16개인 구조다.
중요한 점은 이것이다.
chain length 증가
= 같은 loop progress 1회를 만들기 위해
더 많은 dependent arithmetic instruction을 통과해야 함
따라서 8-chain보다 16-chain의 progress가 낮아지는 것은 자연스럽다.
3. SASS에서 확인된 8-chain
실제 SASS에서는 8-chain이 매우 명확하게 확인된다.
3.1 FMA 8-chain
/*0270*/ FFMA R14, R2, R14, R7
/*0280*/ FFMA R14, R2, R14, R7
/*0290*/ FFMA R14, R2, R14, R7
/*02a0*/ FFMA R14, R2, R14, R7
/*02b0*/ FFMA R14, R2, R14, R7
/*02c0*/ FFMA R14, R2, R14, R7
/*02d0*/ FFMA R14, R2, R14, R7
/*02e0*/ FFMA R14, R2, R14, R7
즉 FFMA R14, R2, R14, R7가 8회 반복된다. R14가 destination이면서 다음 FFMA의 source로 다시 들어가므로 strict 8-step dependent chain이다.
3.2 ADD 8-chain
/*0300*/ FADD R14, R7, R14
/*0310*/ FADD R14, R7, R14
/*0320*/ FADD R14, R7, R14
/*0330*/ FADD R14, R7, R14
/*0340*/ FADD R14, R7, R14
/*0350*/ FADD R14, R7, R14
/*0360*/ FADD R14, R7, R14
/*0370*/ FADD R14, R7, R14
이 역시 R14 → R14 → R14로 이어지는 strict 8-step dependent chain이다.
따라서 8-chain 기준에서는 ADD와 FMA가 모두 같은 accumulator R14를 사용하는 공정한 dependent chain 형태로 생성되었다.
4. SASS에서 확인된 16-chain
16-chain도 실제 SASS에서 확인된다.
4.1 FMA 16-chain
/*07b0*/ FFMA R14, R2, R14, R7
/*07c0*/ FFMA R14, R2, R14, R7
/*07d0*/ FFMA R14, R2, R14, R7
/*07e0*/ FFMA R14, R2, R14, R7
/*07f0*/ FFMA R14, R2, R14, R7
/*0800*/ FFMA R14, R2, R14, R7
/*0810*/ FFMA R14, R2, R14, R7
/*0820*/ FFMA R14, R2, R14, R7
/*0830*/ FFMA R14, R2, R14, R7
/*0840*/ FFMA R14, R2, R14, R7
/*0850*/ FFMA R14, R2, R14, R7
/*0860*/ FFMA R14, R2, R14, R7
/*0870*/ FFMA R14, R2, R14, R7
/*0880*/ FFMA R14, R2, R14, R7
/*0890*/ FFMA R14, R2, R14, R7
/*08a0*/ FFMA R14, R2, R14, R7
이 구간은 FFMA R14, R2, R14, R7가 16회 반복된다. 즉 16-step dependent FMA chain이다.
4.2 ADD 16-chain
/*08c0*/ FADD R14, R7, R14
/*08d0*/ FADD R14, R7, R14
/*08e0*/ FADD R14, R7, R14
/*08f0*/ FADD R14, R7, R14
/*0900*/ FADD R14, R7, R14
/*0910*/ FADD R14, R7, R14
/*0920*/ FADD R14, R7, R14
/*0930*/ FADD R14, R7, R14
/*0940*/ FADD R14, R7, R14
/*0950*/ FADD R14, R7, R14
/*0960*/ FADD R14, R7, R14
/*0970*/ FADD R14, R7, R14
/*0980*/ FADD R14, R7, R14
/*0990*/ FADD R14, R7, R14
/*09a0*/ FADD R14, R7, R14
/*09b0*/ FADD R14, R7, R14
이 구간도 FADD R14, R7, R14가 16회 반복되는 strict 16-step dependent chain이다.
따라서 SASS 기준으로도 16-chain은 실제로 8-chain보다 두 배 긴 dependent arithmetic sequence를 가진다.
5. progress scaling 결과
JSON 결과 기준 평균 progress는 다음과 같았다.
Role평균 progress8-chain 대비
| controlled_dependent_add_8 | 55,166.0 | 100.0% |
| controlled_dependent_fma_8 | 55,166.0 | 100.0% |
| controlled_dependent_add_16 | 43,769.3 | 79.3% |
| controlled_dependent_fma_16 | 42,983.4 | 77.9% |
즉 chain length를 8에서 16으로 늘렸을 때 progress는 다음처럼 감소한다.
ADD:
55,166.0 → 43,769.3
약 20.7% 감소
FMA:
55,166.0 → 42,983.4
약 22.1% 감소
중요한 점은 progress가 절반으로 줄어들지 않았다는 것이다.
chain length:
8 → 16
2배 증가
progress:
100% → 약 78~79%
약 21~22% 감소
6. 왜 progress가 2배 감소하지 않는가
여기서 핵심은 progress가 단순히 다음 공식으로 결정되지 않는다는 점이다.
progress ∝ 1 / chain_length
만약 loop body가 오직 dependent arithmetic instruction만으로 구성되어 있고, 모든 비용이 chain length에만 비례한다면 8에서 16으로 늘렸을 때 progress가 거의 절반으로 줄어들 수 있다.
하지만 실제 probe는 그렇지 않다.
하나의 loop progress에는 arithmetic chain 외에도 다음 비용들이 포함된다.
- clock read / clock budget check
- loop branch
- role dispatch branch
- progress counter update
- predicate / control-flow instruction
- record writeback 준비
- warp scheduling effect
- scoreboard wait
- instruction issue spacing
따라서 전체 loop cost를 단순화하면 이렇게 볼 수 있다.
total_loop_cost =
fixed_overhead
+ dependent_chain_cost
8-chain은:
cost_8 = fixed_overhead + chain_cost_8
16-chain은:
cost_16 = fixed_overhead + chain_cost_16
chain instruction 수는 2배가 되었지만, fixed overhead는 2배가 되지 않는다.
그래서 progress는 정확히 1/2이 되지 않는다.
7. 간단한 모델
측정된 progress ratio를 이용하면 16-chain의 loop cost가 8-chain보다 얼마나 증가했는지 역산할 수 있다.
progress는 대략 cost의 역수로 볼 수 있다.
progress ∝ 1 / loop_cost
ADD의 경우:
ADD16 / ADD8 = 0.793
따라서:
cost16 / cost8 ≈ 1 / 0.793 ≈ 1.26
즉 ADD는 chain length가 2배가 되었지만, loop cost는 약 26% 증가한 것으로 볼 수 있다.
FMA의 경우:
FMA16 / FMA8 = 0.779
따라서:
cost16 / cost8 ≈ 1 / 0.779 ≈ 1.28
즉 FMA는 loop cost가 약 28% 증가한 것으로 볼 수 있다.
이 모델은 정확한 latency 모델은 아니지만, progress signature를 해석하는 데 유용하다.
chain length 2배 증가
→ observed loop cost 약 26~28% 증가
→ progress 약 21~22% 감소
8. 이것이 의미하는 것
이 결과는 다음을 의미한다.
chain length는 progress에 강한 영향을 준다.
하지만 progress는 chain length만으로 결정되지 않는다.
더 정확히 말하면:
dependent chain length 증가가 loop body의 critical path를 늘리지만,
전체 progress에는 fixed overhead와 scheduling/control-flow 비용도 함께 섞인다.
따라서 8 → 16으로 chain을 늘렸을 때 progress가 50%가 아니라 약 78~79% 수준으로 유지된 것은 이상한 결과가 아니다.
오히려 이 결과는 다음을 보여준다.
1. chain length 증가 효과는 분명히 존재한다.
2. 하지만 probe의 loop progress는 pure arithmetic latency만 측정하지 않는다.
3. fixed overhead가 상당한 비중을 차지한다.
4. 따라서 progress drop은 chain length 증가의 직접 효과와 loop structure 비용이 섞인 signature다.
9. chain 증가에 따른 SASS shape 변화
SASS를 보면 chain length 증가가 단순히 “같은 block을 두 배로 복사”하는 것만은 아니다.
9.1 strict R14-only 16-chain 구간
가장 깨끗한 형태는 다음이다.
FMA16:
0x07b0 ~ 0x08a0
FFMA R14, R2, R14, R7 x 16
ADD16:
0x08c0 ~ 0x09b0
FADD R14, R7, R14 x 16
이 구간에서는 8-chain과 같은 dependency pattern이 그대로 두 배 길어졌다.
8-chain:
R14 → ... → R14
8 arithmetic steps
16-chain:
R14 → ... → R14
16 arithmetic steps
9.2 중간 register를 경유하는 16-chain 구간
반면 다른 구간에서는 16-chain이 중간 register를 사용한다.
예를 들어 FMA 쪽에는 다음 흐름이 있다.
FFMA R14, R2, R14, R7
...
FFMA R10, R2, R14, R7
FFMA R10, R2, R10, R7
...
FFMA R14, R2, R10, R7
ADD 쪽에도 유사한 흐름이 있다.
FADD R14, R7, R14
...
FADD R10, R7, R14
FADD R10, R7, R10
...
FADD R14, R7, R10
이 경우 chain은 다음처럼 이어진다.
R14 → R10 → R10 → ... → R14
즉 R14 하나만 반복되는 pure chain은 아니지만, dependency가 끊긴 것은 아니다.
destination register가 다음 instruction의 source로 이어지기 때문에 여전히 dependent chain이다.
10. 왜 SASS shape 변화가 중요한가
chain length를 늘리면 compiler backend, 즉 ptxas가 instruction sequence를 그대로 유지할 수도 있고, 일부 구간에서는 register allocation이나 control-flow layout에 따라 중간 register를 사용할 수도 있다.
이번 SASS에서는 둘 다 보인다.
1. pure R14-only 16-chain
2. R14 → R10 → R14 형태의 16-chain
3. 다른 분기에서는 R8, R2 등을 경유하는 형태
따라서 16-chain 결과를 해석할 때는 다음을 구분해야 한다.
chain length 증가 효과:
8-step에서 16-step으로 dependent arithmetic sequence가 길어짐
SASS shape 변화 효과:
일부 16-chain path에서 중간 register가 사용됨
문서에서는 이렇게 쓰는 게 안전하다.
SASS confirms that the 16-chain roles contain longer dependent arithmetic sequences than the 8-chain roles. However, the 16-chain SASS shape is not uniformly a pure R14-only repetition across all paths; some paths route the dependency through intermediate registers such as R10, R8, or R2. Therefore, the primary 8-vs-16 progress drop can be attributed to increased dependent sequence length, while fine-grained ADD16-vs-FMA16 differences should be interpreted as SASS-shape-specific rather than pure latency differences.
11. ADD16 vs FMA16의 작은 차이
ADD16과 FMA16은 각각 다음 평균 progress를 보였다.
ADD16 ≈ 43,769.3
FMA16 ≈ 42,983.4
FMA16이 ADD16보다 약 1.8% 낮다.
하지만 이 차이는 순수 latency 차이로 단정하기 어렵다.
이유는 다음과 같다.
1. 16-chain에는 여러 SASS path가 존재한다.
2. 일부 path는 R14-only strict chain이다.
3. 일부 path는 R10/R8/R2 같은 중간 register를 거친다.
4. 일부 구간에는 MOV도 섞인다.
5. 따라서 ADD16/FMA16의 미세 차이는 op latency뿐 아니라 SASS shape 차이를 포함한다.
따라서 정확한 표현은 다음이다.
ADD16과 FMA16 사이의 약 1~2% 차이는 관찰값으로 기록하되,
FADD와 FFMA의 intrinsic latency 차이로 해석하지 않는다.
12. 문서용 핵심 결론
Controlled Arithmetic Chain Probe에서 chain length를 8에서 16으로 늘리면 progress가 약 21~22% 감소했다. SASS inspection은 이 감소가 실제로 더 긴 dependent arithmetic sequence와 연결됨을 확인한다.
8-chain은 `FFMA R14, R2, R14, R7` 또는 `FADD R14, R7, R14`가 8회 반복되는 strict R14 dependency chain으로 생성되었다. 16-chain은 동일한 형태가 16회 반복되는 구간을 포함하며, 일부 path에서는 R10/R8/R2 등의 중간 register를 통해 dependency가 이어진다.
따라서 8-chain 대비 16-chain의 progress 감소는 단순 JSON artifact가 아니라, SASS에서 확인된 dependent chain length 증가와 대응된다. 다만 progress가 2배 감소하지 않는 이유는 loop progress가 pure arithmetic latency만 측정하는 것이 아니라, clock check, branch, progress counter update, role dispatch 등 fixed overhead를 함께 포함하기 때문이다.
즉 chain length는 progress에 영향을 주지만, progress는 chain length만의 함수가 아니다.
13. Atlas 노드용 요약
resultSummary: {
title: "Dependency Chain Length Scaling",
conclusion:
"Controlled arithmetic chain probe shows that increasing dependent chain length from 8 to 16 reduces progress by about 21–22%, not by 50%. SASS inspection confirms that 8-chain roles contain 8 repeated dependent FFMA/FADD instructions on R14, while 16-chain roles contain longer dependent sequences, including strict R14-only 16-step chains and some paths routed through intermediate registers. The result indicates that chain length affects warp progress, but measured progress also includes fixed loop overhead, branch/control-flow cost, clock checks, and scheduler effects.",
keyNumbers: [
{
label: "ADD8 → ADD16",
value: "55,166 → 43,769 / progress ≈ 79.3% / drop ≈ 20.7%"
},
{
label: "FMA8 → FMA16",
value: "55,166 → 42,983 / progress ≈ 77.9% / drop ≈ 22.1%"
},
{
label: "Estimated loop cost increase",
value: "ADD ≈ +26%, FMA ≈ +28%"
}
],
sassValidation: [
{
label: "8-chain",
value:
"FFMA R14, R2, R14, R7 x8 and FADD R14, R7, R14 x8 were observed."
},
{
label: "16-chain",
value:
"FFMA R14, R2, R14, R7 x16 and FADD R14, R7, R14 x16 were observed."
},
{
label: "Shape variation",
value:
"Some 16-chain paths route dependency through intermediate registers such as R10/R8/R2, so fine-grained ADD16/FMA16 differences should not be interpreted as pure latency differences."
}
],
interpretation:
"The measured progress drop corresponds to verified dependent sequence length increase, but progress is not inversely proportional to chain length because the loop contains fixed overhead and control-flow costs."
}
최종적으로 문서의 중심 문장은 이거다.
chain length를 8에서 16으로 늘리면 SASS상 dependent arithmetic sequence가 실제로 길어진다. 그 결과 progress는 약 21~22% 감소한다. 하지만 progress가 절반으로 줄지 않는 이유는 loop progress가 pure arithmetic latency가 아니라 fixed overhead와 control-flow cost가 섞인 execution signature이기 때문이다.
'GPU Probing Lab' 카테고리의 다른 글
| 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 결과 정리 - dependent FMA vs dependent ADD 해석 검증 (0) | 2026.05.19 |
| CUDA PTX / SASS 분석 문서 - CUDA 코드가 실제 GPU 실행 구조로 바뀌는 과정 (0) | 2026.05.19 |
| Arithmetic Dependency Probe SASS 분석 문서 (0) | 2026.05.18 |