Files
FESADev/docs/calculation-performance/t4-shell-optimization.md
T

233 lines
32 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Shell 계산 경로의 성능 변경
이 기록은 reduced-coordinate shell의 local 계산 변경과 근거를 구분한다.
전체 시간 목표와 최종 원본 비교는 [PRD](PRD.md)의 계약이며 아래의 단계 검사는
그 계약의 최종 합격을 대신하지 않는다.
## 계측과 변경의 연결
원본 meshfine shell의 기준 전체 실행은 6372.3256209초다. VTune 소프트웨어
샘플링의 별도 150초 부분 수집은 accepted increment 2 / time 0.2까지 포함한다.
`Jet*`는 sampled CPU 133.466초(27.6%), `malloc`은 30.289초(6.3%)였다.
`EvaluateAssembly`의 inclusive 257.862958 CPU초와 중첩 selector의 1.600014초는
겹치는 호출 경로이므로 더하거나 전체 경과 시간으로 바꾸지 않는다.
`nonlinear_mitc4_shell.cpp`의 모든 Jet는 기존에 값이 상수인 경우도 576-double
Hessian을 영 초기화한 `shared_ptr`로 할당했다. 상수의 영 Hessian은 이제
읽기 전용 정적 영 배열을 참조하고 처음 쓰는 때만 기존 공유 storage를 할당한다.
읽기 전용 영 배열에는 trial 값이 없으며 동시 호출은 그 배열을 수정하지 않는다.
이미 할당된 Hessian의 복사/공유 수명은 그대로다. 현재 trial 이외의 형상·접선·
도함수 응답을 저장하거나 주소에 따라 재사용하는 cache는 추가하지 않았다.
후속 후보는 576-entry 반복문 앞에서 입력 read pointer와 fresh output pointer를
한 번씩 취득한다. fresh output은 단일 `make_shared` 할당을 유지하고 영 초기화를
생략한 뒤 576개 전체를 기록한다. `operator+/-/*`, scalar scale, Compose, Atan2의
모든 complete write와 MKL 거부 시의 NaN fill 뒤에만 결과를 읽거나 복사한다.
일반 부분 mutable write는 영 초기화를 유지한다. 상수의 nullptr 복사에는 별도
mutable 공유 객체가 없지만 실제 consumer는 복사된 상수 Hessian을 수정하지 않는다.
이미 할당된 결과의 shared copy와 입력 alias는 수정하지 않는다.
## 일반 행렬 연산의 MKL 경계
| 파일 / 함수 | 연산과 크기 | 변경 |
| --- | --- | --- |
| `mitc4_shell.cpp::Stiffness`, `Congruence` | 5×20 strain의 BᵀCB, 20/4 local→24 congruence | `Matrix::Multiply`와 private transpose-left MKL GEMM, 상삼각 결과를 그대로 대칭 복사 |
| `nonlinear_mitc4_inertia.cpp::CheckPhysicalMass` | 24×20 complement Gram·mass congruence, 20×20 Cholesky·inverse·reconstruction | GEMM 및 기존 private LAPACK helper; 같은 positivity, reconstruction, 2^-32 conditioning gate 유지 |
| `nonlinear_mitc4_inertia.cpp::Evaluate` | 각 lumped mass-node의 6×3 coefficient Gram, velocity/position bilinear, 3방향 mass variation의 6×6 block | 무할당 row-major transpose-right GEMM; 원래 point/node/row/column scatter와 가중 누적 유지 |
| `nonlinear_mitc4_shell.cpp::operator*`, `Compose`, `Atan2`, `DrillingEnergy` | ordinary 24×24 derivative outer products | private `OuterProduct`의 row-major GEMM k=1, 기존 Jet storage에 직접 기록 |
| `hht_dynamic_algebra.cpp::BuildPhysicalSpace` | scaled free mass×analytic null 및 일반 complement congruence의 sparse contributions | entrywise compact-diagonal MKL products 뒤 원래 CSR/COO 순서 누적; full global dense matrix 없음 |
| `hht_dynamic_algebra.cpp::CheckLocalMass` | nonempty nodal physical block, 크기1–6 | MKL Cholesky/inverse; 동일 inverse infinity norm과 2^-32 conditioning 검사 |
| `hht_dynamic_algebra.cpp::CheckRegularity`, `hht_reduced_operators.cpp::CheckGraphRegularity` | scalar null stiffness metric와 gradient×null projection | MKL GEMV/dot 또는 entry products, 기존 fresh factorization/모든 unit RHS/residual/condition gate 유지 |
| `hht_reduced_operators.cpp::ContractConstraintHessian` | failure-only bilinear replay의 sparse Hessian entries | 두 MKL diagonal product 뒤 기존 left association/entry order sum |
Outer product는 배열 copy나 Matrix 객체를 만들지 않는다. 크기·integer range·
nonempty null storage를 검사하며 비유한 입력은 MKL 호출/출력 쓰기 전에 거부한다.
유한 입력의 곱 overflow는 후속 owner finite gate가 판단한다. Jet consumer는
거부된 operand의 결과를 NaN으로 표시하고 원래 equilibrium/constraint finite
실패를 반환한다. 직접 scalar product로 계산하는 fallback은 없다.
`CholeskyLowerAndInverse`의 optional private failure reason은 validation 전에
`kNone`으로 초기화된다. factor pivot/finite 실패와 inverse/finite 실패를 구분하여
기존 positive-mass와 ill-conditioned-mass 진단을 유지한다. 실패에서는 lower와
inverse output candidate를 교체하지 않는다. 기존 default-nullptr consumer의
bool 의미는 그대로이며 live inverse 실패를 발생시킨 검사는 아직 없다.
Element-local dense work의 `ScopedLocalDenseThreads`는 caller TLS 요청이 default
0일 때만 1을 적용한다. caller의 양수 override는 유지하고 정상 반환과 unwind 뒤
원래 default를 복원한다. 전역 MKL/OpenMP 정책이나 이후 global solve에는 영향을
주지 않는다. 각 scalar metric scope는 MKL 호출 뒤 끝나며 global PARDISO를 포함하지
않는다. 현재 후보의 실제 비용과 복원 검사는 아래 단계 검증 기록으로 구분한다.
TLS default 0, caller override 우선순위와 저장한 값을 복원하는 동작은
[Intel 2026 thread-local reference](https://www.intel.com/content/www/us/en/docs/onemkl/developer-reference-c/2026-0/mkl-set-num-threads-local.html)의 계약을 따른다.
Hessian의 합산 순서와 ordinary product는 별도다. 곱셈 Jet는 원래의
`left.second * right.value + outer1 + outer2 + left.value * right.second`를
유지한다. Compose와 Atan2는 계수×gradient를 먼저 계산하여 원래 left association을
유지한 뒤 outer product를 계산한다. GEMM의 연산과 signed-zero 결과는 원래 scalar
구현의 bit 동일성을 주장하지 않으며 접선/방향/혼합 도함수의 수치 검토 대상이다.
일반 24×24 연산을 AD라는 이유로 특수 정밀도 예외로 처리하지 않는다.
## 유지하는 특수 연산
| 파일 / 함수 | 크기·정밀도·이유 | 검증 범위 |
| --- | --- | --- |
| `nonlinear_mitc4_inertia.cpp::Jet`, `ExpSkew`, `LeftJacobian` | 3개의 nodal rotation coordinate에 대한 최대 3차 analytic derivative; 3×3×3 tensor | finite rotation, inertia force/position/velocity tangent와 null·momentum oracle |
| `hht_reduced_operators.cpp::BasisValue`, fixed basis 생성 | normalized high+low 및 outward radius; 3-vector basis certificate | fixed chart/radius replay·partial-boundary·selector transversality |
| `hht_reduced_operators.cpp::RateSum`, `GradientDot`, reduced block 누적 | sparse support의 원래 순서 Neumaier correction | cancellation, full defect, mixed rates·channel acceptance |
| `nonlinear_mitc4_inertia.cpp::InertiaSum` | kinetic force/energy/momentum의 원래 순서 compensated contraction | 독립 inertia oracle와 omission 검출, 좌표/단위 변화 |
| shell의 fixed3 coordinate tensor/rotation 변환 | 좌표·director·chart의 3-vector 또는 3×3 연산 | rigid motion/objectivity·principal chart 실패 |
| `hht_dynamic_algebra.cpp::BuildPhysicalSpace`의 analytic nodal basis Gram, `InitializeAcceleration`의 force projection/lift | translation 1계수 또는 단일 절점의 최대3 rotation components; 현재 assembly의 nodal frame에 대한 Float64 좌표 변환 | 서로 다른 node의 basis support는 disjoint, 같은 node의 최대3-vector inner product만 사용; excluded fixed rows·원래 association·초기 acceleration 진단 순서 유지 |
보상 누적과 interval/basis 인증은 일반 Float64 GEMM으로 접어 수치 의미를 잃지 않는다.
`hht_reduced_operators.cpp::GradientDot`, `Lift`, `ProjectPhysical`,
`ReconstructPhysicalRates`, `AssembleAugmentedReducedSystem`의 support contractions는
원래 entry 순서의 Neumaier correction과 high+low/outward fixed-basis certificate를
유지하는 예외다. Plain sum과 달리 partition cancellation에서 소실되는 1을 유지하는
`ReconstructsRatesAcrossSelectedPartitionCancellation` 및 augmented full-model defect
검사가 해당 의미를 검증한다. 일반 24×24 outer와 mass matrix 제품은 이 예외로 묶지 않는다.
`BuildPhysicalSpace`의 좌표 basis는 현재 assembly의 analytic null로 각 호출에서
생성한다. 초기화는 initial assembly를 사용하고 후속 질량 인증은 해당 현재 assembly를
사용한다. 실행 전체의 fixed initial chart와 같은 자료라고 판단하지 않으며
다른 trial에 basis/응답을 재사용하지 않는다.
## 단계 검증 상태
변경 전 clean source `8c7c41729eb9eaa904f6739b54d34c37b1bd555f`의 fresh MSVC
Debug configure/build는 native 0, local shell/inertia/reduced/math 70개는 모두 PASS다.
별도 MITC4 linear kernel·mass·recovery 20개도 native 0으로 모두 PASS다.
Mixed-time actual shell fixture는 144.84초에 정상 통과했으며 중단되지 않았다.
[원래 실행 기록](../../.harness/performance/t4/baseline-native.json)과
[linear 실행 기록](../../.harness/performance/t4/baseline-linear-native.json)을 보존한다.
첫 후보 build의 `Status` 기본 생성자 오류(native 2)는 별도로 보존하고
`Status::Ok` 초기화로 수정했다. 수정 후보의 configure/build는 native 0이고
91개 중 90 PASS, `HhtReducedEmbedding.ReconstructsActualShellRatesWithMixedTimeLoad`는
180초 timeout으로 미통과다. 전체 CTest native 8과 실제 종료 상태를 보존한다.
이 Debug 비용 악화를 Release 개선으로 표시하지 않는다. 이는
`candidate-local-fixed` snapshot의 결과다. Read pointer hoist, fresh output의
단일 allocation/full overwrite, 별도 이름의 local TLS scope와 추가 coverage를
적용한 `packed-output-mkl-coverage` 결과는 별도로 기록한다.
기존 Korean compiler 환경의 Ninja header prefix가 mojibake이고 actual dependency
graph가 0개인 사실을 확인했다. 그 build의 직접 변경 source/검사 결과는 보존하되
header consumer 전체 재빌드를 입증한다고 해석하지 않는다. 설치된 compiler의
locale fallback 때문에 `VSLANG=1033`만으로 해결되지 않는다는 root의 후속 근거가
있다. 정확한 include prefix를 지정한 ignored metadata helper의 별도 probe 뒤
full fresh build에서 actual Ninja header deps를 확인했다. 공용 preset/flag나
source object를 바꾸어 혼합하지 않는다.
후속 `packed-output-mkl-coverage` snapshot의 source SHA-256은
[source manifest](../../.harness/performance/t4/candidate-packed-source.json)에 있다.
Corrected-prefix fresh configure/build는 각각 native 0이고
`eigen_reduction.cpp.obj`의 실제 dependency inventory에
`dense_blas_internal.h`가 포함되어 있다.
기존 Cholesky/eigen consumer, local tangent/objectivity/patch·inertia,
fixed chart·channel/failure·boundary·MKL scope/shape/finite 검사 **105/105 PASS**,
native 0, CTest 36.94초다. 별도 mixed-time fixture도 **1/1 PASS**, native 0,
fixture 60.69초다. [실행 기록](../../.harness/performance/t4/packed-native.json),
[검사 로그](../../.harness/performance/t4/packed-4.txt),
[mixed-time 기록](../../.harness/performance/t4/packed-mixed-native.json)을 보존한다.
이 106개 결과는 전체 Debug/원본 비교/시간수렴을 통과했다는 뜻이 아니다.
첫 Release 보조 configure는 runtime DLL PATH를 compiler 탐색보다 앞에 두어
icx가 선택되었고 `libircmt.lib` 없음으로 native 1 실패했다. 수치 실행은 없었으며
실패 자료/cache를 보존한다. 동일 설치 MSVC cl을 명시한 별도 fresh directory의
Release configure/build 97 edges는 native 0이다. [보조 실행 기록](../../.harness/performance/t4/release-micro-fixed-native.json)을 보존한다.
Jet 보조 측정은 frozen `8c7c417`의 실제 Jet source span과 현재 production
`nonlinear_mitc4_shell.cpp`를 같은 translation unit에 두고 현재 source의
Release library와 연결했다. 동일 입력·flags로 각 variant의 3000-product loop를
워밍업 없이 한 번씩 측정했다. 모든 value/gradient/Hessian/directional/mixed
coefficient 및 checksum이 같고 실제 native 0, scope 안 effective threads 1,
종료 뒤 caller TLS 복원 true다. 정확성 대조는 모든 타이밍 후 수행했다.
| 보조 variant | 3000-product loop 경과 시간 |
| --- | ---: |
| frozen original | 0.0025384초 |
| MKL candidate / default 8 | 0.0082295초 |
| MKL candidate / element scope 1 | 0.0029779초 |
Scope는 새 MKL kernel의 default-thread 비용을 줄이지만 이 dense nonzero
kernel 자체가 원래 구현보다 빠르다는 근거는 아니다. Scope 후보도 original보다
약17% 느리다. 전체 모델의 준비·조립·allocator·선형 해법·출력 비용과 최종
100초 목표는 이 보조 값으로 판단하지 않는다. 실제 production의 Constant/Jet
allocation 빈도 감소는 최종 VTune에서 확인해야 한다.
Standalone include의 vendor C4819 경고는 보존했다. 실제 production과 같은
`/W4 /WX /external:W0`로 compile/link만 추가 실행하여 native 0/경고 없음이고
수치 타이밍은 반복하지 않았다. 측정된 exe는 별도 원본 copy로 보존했으며
추가 exe의 `.text` SHA-256이 동일한 것을 확인했다.
[기계어/실행 파일 보존 기록](../../.harness/performance/t4/micro-warning-policy-text-comparison.json)을 따른다.
전체 Debug·원본 비교·C08 current grid·VTune 최종 수집·공식 단일 시간 측정은
이 단계에서 실행하지 않았다. 변경되지 않은 reference와 tolerance를 사용해야 한다.
## f9 고정 source 후속 SW 프로파일 및 metric/coverage 수정
f9e0df66dc9ab04e6a3e295e7ade1df6add15193 source의 Release CLI target 빌드 native0,2.210초. 기존 동일 source의 fresh MSVC Release LIB 디렉터리에 정식 fesa_cli target만 --parallel4 빌드했으며 다른 source object를 복사하지 않았다. parent `.harness/performance/t4/cli-build-native.json`, `cli-runtime-hashes.json` 및 `f9-shell-sw-150s/frozen-profile-source.json`에 실제 argv/settings/source/CLI/DLL/PDB hash를 고정했다.
동일 원본 input SHA B8922243CA8DDFE20B1DD39F3123207F789A1A75F6B10DBB6B0BC0B5A40DFFF5를 scratch에 복사해 SW hotspots150초를 1회 수집했다. Collector native4는 제한 수집의 partial 종료이며 target native exit는 미확인이다. Collector 총171.409초, watchdog240초 미발동, ownedtarget18316 종료 및 remaining_targets=[] 확인. 원본/scratch 입력 hash 유지. summary/functions/callstacks export는 각각 native0이다. 수집 자료는 parent `.harness/performance/t4/f9-shell-sw-150s/`에 보존한다.
VTune summary elapsed149.866초/CPU466.466초. Self CPU: shell Jet*85.260초, iomp64.371초, MKL dgemm40.878초, PARDISO kernel31.029초, malloc24.373초, shell Jet+23.937초, inertia Jet*23.821초, errchk_dgemm12.305초, MultiplyTransposeRight8.105초. Callstack inclusive attribution은 EvaluateAssembly240.854초, EvaluateConstraintOperators78.270초, EvaluateInternalResidualAndTangent254.027초, MultiplyTransposeRight86.911초, CheckGraphRegularity2.386초다. Inclusive 값은 서로 겹치며 합산하거나 벽시계로 사용하지 않는다. 작은 MKL dispatch 비용과 내부 constraint 재평가 비용은 후속 후보의 근거다. Sample에는 constant operand/proven-zero derivative 여부가 없으므로 영도함수 생략의 실제 비중은 미확인이다.
150초 구간 마지막 accepted increment1/time0.1/iteration3이다. 기존150초 baseline은 increment2/time0.2였으므로 현재 후보를 전체 성능 개선이나100초 합격으로 기록하지 않는다. f9 source의 증거는 이후 수정에 소급하지 않는다. Callstack parser 최초 PowerShell 시도는 blank separator row에서 numeric parse 오류로 중단했고, 명시적 blank delimiter를 처리하는 `attribute-callpaths.py` native0 결과를 사용한다.
프로파일을 고정한 뒤 root85ae2eb를 병합한 source2853051896091ca0e612c95a65a442f48a8e5558에서 후속 수정했다. 공통 high+low finite classifier와 생성 build ignore를 동기화했으며 공통 public API/flags 변경은 없다. 해당 공통 수정의 독립 검증은 root evidence 소유다.
추가 독립 검토는 metric GEMV의 overflow 반례를 발견했다. M=DBL_MAX, epsilon=2^-26, t=sqrt(1-epsilon^2), n=(epsilon,0.6t,0.8t), B=[[0,M,M],[M,0,0],[M,0,0]]에서 기존 ordered (n_i*B_ij)*n_j 합은 finite positive지만 B*n의 첫 성분은 overflow한다. `HhtReducedOperators.NullMetricKeepsFiniteLeftAssociatedProducts`를 먼저 추가해 실제 RED(native8/1failed), 이후 GREEN(native0/1PASS)를 확인했다. PSD 가정을 새로 추가하거나 accepted metric 범위를 좁히지 않는다.
두 metric caller(CheckGraphRegularity/CheckRegularity)는 analysis-private `OrderedNullMetric`으로9entry MKL diagonal product를 두 번 계산하고 기존 i/j 순서로 누적한다. 첫 product가 nonfinite이면 원래 두 번째 product도 nonfinite이며 최종 양의 finite gate를 통과할 수 없으므로 caller의 기존 진단 위치로 NaN을 반환한다. Source nonfinite도 같은 caller gate로 반환한다. 실제 원래 assertion/failure category/condition2^-32/scale/diagnostic order를 유지한다. 불필요해진 SparseEntry만 제거했다.
EvaluateAssembly의 hidden_second는 인접 shell 조립 Hessian map의 일반 bilinear action이다. node map 크기를24로 제한하지 않고 map 순서대로 H_ij*v_i 및 결과*v_j를 MKL diagonal batch 두 번 계산한 뒤 기존 hidden_second/abs-scale 순서로 누적한다. mass residual scale의24x24 m(row,col)*a[col]도 MKL diagonal entry batch로 계산한 뒤 기존 row/column abs 누적 순서를 유지한다. 이 두 일반 product를 fixed3 또는 AD 예외로 묶지 않는다. Private EntryProducts는 finite pair만 backend에 전달하고 invalid/intermediate entries는 NaN으로 유지하여 원래 mass/hidden finite gate에서 실패하게 한다. Failed/partial candidate를 유효 state로 공개하지 않는다.
수정 첫 build는 mass_action pack을 잘못된 첫 Gather(a) 위치에 삽입해 native2로 실패했다. 실패 source patch와 native/log는 parent `metric-green-build-failed.patch`, `metric-green-native.json`에 보존했다. Correct ordered assembly 위치로 옮긴 frozen source `metric-coverage-source.json`에서 정식 Debug build native0/6edges, 반례 GREEN native0, 관련 short106/106 PASS(native0/36.02초)를 확인했다. Actual Ninja deps에 hht_dynamic_internal.h와 dense_blas_internal.h가 포함된다. Test106은 mixed-time fixture를 제외하며 최종 전체 Debug/CTest/reference/C08/전체 모델 검증은 여전히 T5 미실행이다. 이 수정은 후속 DGER/constant/reuse source와 분리하며 독립 source 검토를 추가로 받는다.
## MKL DGER rank1 후보와 현재 실제 검증
고정 f9 profile의 GEMM/dispatch self CPU 비용을 근거로 private OuterProduct만 checked row-major cblas_dger로 전환했다. 일반 MultiplyTransposeRight GEMM, public API/vendor 경계, local TLS scope와 AD coefficient/scaled-left/누적식은 유지한다. ILP64/byte-count/empty/null 및 양 입력 전체 finite validation 성공 뒤에만 destination 전체를+0 fill하고 alpha1/inc1/lda=columns GER를 수행한다. Finite input overflow는 원래 owner gate에 남긴다. 실제 gradient/scaled-left와 fresh result/temporary output의 nonalias 수명 계약을 유지한다.
최초 새 strict-bit 반증 fixture는 실제108중107 PASS/1failed(native8), 이후 좁은 진단도native8이었다. 36entry 중10개는 GEMM -0(bits0x8000000000000000)→GER +0뿐이며 이 제한 fixture에서 비영/subnormal/overflow 결과 차이는 없었다. 그때의 source, binary hash와 실패 로그는 parent dger-failed-source.patch/dger-failed-delivery.json/dger-diagnostic-delivery.json에 보존한다. 이번 성공을 과거 실패 자료에 소급하지 않는다.
추가 독립 `source-numerical-review-dger-zero-sign.md`는 현재 Hessian/DrillingEnergy의 영 부호 차이가 value·first·mixed 식, finite/실패, +0 초기 ordered map/COO/global CSR 및 공개 HDF5 의미를 바꾸지 않는다는 source 근거를 확인했다. 일반 GEMM kernel의 영 부호를 새 규칙으로 대체하는 sign-xor 복원은 만들지 않았다. Root 승인에 따라 owner가 이번에 작성한 반증 fixture만 실제 ordinary Hessian 계약과 구분해 비영 strict bits, 양쪽 numeric zero 값 동등 및 zero-sign 차이 명시 기록으로 조정했다. 기존 PRD/TOLERANCE·physics·pair arithmetic 기대값은 변경하지 않았다.
Current dger-contract-source.json manifestSHA7519444546C57A81F787DFCD21230081A093B02299B43DE8C60E571FA04405B4는 source2파일 및 fixture3파일을 고정한다. Production source SHA77748F73D8F4EECF40D658FC930016A7A6A3E640FE8BC3C055178266C8229E3D는 strict-bit 실패 당시와 동일하다. 정식 Debug rebuild native0와 관련109+기존serial/TBB/repeat 결정론1을 합친 **actual110/110 PASS(native0/98.21초)**를 확인했다. Successful CTest output도 dger-contract-ctest-last.log에 보존한다. Actual6x6 zero-sign 차이10, actual24x24 차이65를 기록했고 비영 strict bits·입력 bits·rounding/MXCSR control mode 검사는 통과했다. Sticky arithmetic exception status는 원래 연산도 발생시키므로 control mode와 구분한다.
동일 current source Release library 정식10edges build0, 생산 warning policy /W4 /WX /externalW0 standalone compile0, micro native0이다. 오래된 object/library를 복사하지 않고 actual production TU와 동일 source library를 링크했다. Frozen8c original, frozenf9 GEMM shadow route, current DGER를 동일 TU에서 비교한다. f9 Jet 계수/storage/연산식은 source span 그대로이며 OuterProduct 호출1곳만 변경되지 않은 checked MultiplyTransposeRight(inner1) GEMM wrapper로 명시적 shadow routing한다. 이 helper fixture는 전체 f9 executable 재현이 아니다.
3000iterations 각0warmup/1batch 측정 결과(seconds): original0.0025600, f9GEMMdefault0.0043713, DGERdefault0.0031520, f9GEMMscope1 0.0029526, DGERscope1 0.0030267. 같은 checksum32.759844928979874, 모든 coefficient 일치/TLS 복원 확인. DGER default는 f9 default보다 약27.9% 짧지만 실제 production local scope1에서는 약2.5% 길고 original보다 약18.2% 길다. **현재 production scope 비용 개선을 입증하지 못했다.** 단일 짧은 batch의 결과를 전체 모델 성능이나100초 합격으로 사용하지 않는다.
Timing 밖 actual Jet14cases 모두 PASS: signed-zero Constant value, seeded Variable mixed, Constant×seed, Compose mixed-third, thirdInf 실패, Sqrt0 실패, Atan2 seeded mixed, +/-0 value branch, zero/zero 실패, x2^300/y0 radius_fourthInf 수용, tiny-radius underflow 실패, zero×Infmixed 실패, allocated-zero copy. Value/first/directional/mixed 영 부호와 비영 bits는 strict 비교하고 Hessian의 양쪽 numeric zero만 허용했다. NaN payload는 결과 계약이 아니므로 양쪽 NaN 및 IsFinite 거부를 비교한다. 14case의 Hessian zero-sign 차이 수는 모두0이었다. 이 좁은 fixture는 모든 Compose/Atan2 입력·환경을 보증하지 않는다.
Actual source/lib/exe hash 및 native argv는 parent dger-contract-native.json/dger-contract-built-hashes.json에 보존한다. Release library SHA FA4F911DEB913EAA8042A28CAA42CDADE13F5AD85715C75C537EB63F2D9DAFCA, micro exe SHA BF6DC244E6C1653F632C90ED2BCCA3DDAAB25CA9C59BBAB351336F50CC901579. 전체 shell 목표, 후속 whole-model VTune/reference/C08/최종전체Debug는 미검증이다. DGER source와 검사는 Constant specialization/reuse source와 분리하여 고정한다.
### DGER 미채택 및 GEMM 복원
Root는 실제 production local thread1 scope에서 개선 근거가 없으므로 DGER를 채택하지 않기로 결정했다. 위110 PASS 및14 Jet 행동/단일 kernel 자료는 실험 source11af92809a674567262c51c0c0f2e7e130241ca7의 기록이며 현재 복원 source의 새 실행 결과가 아니다. 기본 thread 설정에서의27.9% 감소를 실제 production scope1의2.5% 증가와 바꾸어 주장하지 않는다.
Working/index에 다른 변경이 없음을 확인하고 T4가 소유한 dense_blas_internal.cpp와 dense_blas_internal_test.cpp만 c58d499727e2370cb405c96decea0efcb2645bea의 checked GEMM 상태로 복원했다. 새 GEMM 대 GEMM 비교로만 남는 DGER 실험 검사도 제거했으며 기존 c58 검사/MKL 적용/TLS 정책은 유지한다. 검증된 DGER 원문은 parent dger-verified-dense_blas_internal.cpp/dger-verified-dense_blas_internal_test.cpp, 실험 commit/manifest/micro/review/native8 실패·진단·native0 행동 자료와 함께 보존한다. 복원 후 전체검사/micro를 반복하지 않았다. 실제 복원 file hash는 parent dger-gemm-restored-source.json에 기록한다. 다음 변경은 프로파일 근거의 Constant provenance 및 정확한 true-trial 재사용이며100초 목표는 계속 미달이다.
## Constant provenance 및 immutable zero Hessian 후보
DGER 미채택/GEMM 복원8bfe97dbf82b37a264109fe03028300600b63d1b 이후 nonlinear_mitc4_shell.cpp만 수정했다. 고정 production SHA DABB5423A43A8AA439C50272C4CED40607FC189C67E03A9BC498559BA94F64DC, parent constant-source.json SHA0FDFE9A18ED5BECF3E1DA7A4F1420BADD9B22340EAC9A159550ABC96D5778E37. Direct derivative 쓰기와 수명 근거는 constant-write-audit.md, 조건부 이론 검토는 constant-specialization-proof.md, 현재 source-only/current Jet caller 독립 PASS는 source-numerical-review-constant.md에 보존한다. 결과를 전체 모델/성능 PASS로 확대하지 않는다.
Anonymous Jet의 derivative-zero provenance는 기본false이며 Constant만true로 시작하고 Variable은 seed 쓰기 전에false로 만든다. 연산 결과에서는 원래 식과 실제 finite 계수로 증명될 때만 전파한다. Null Hessian은 Variable도 가지므로 상수 판정으로 사용하지 않는다. 별도 IsImplicitZero는 immutable zero storage의 사실만 나타낸다. +/−의 양 implicit H 및 finite scalar×implicit H에는 독립 H=0 lemma를 사용하며 first/directional/mixed 식은 그대로 계산한다. ScalarInf/NaN은 원래 H576 경로로 보내0 곱의 기존 실패를 유지한다.
Jet 곱의 known-zero outer는 finite lhs/rhs/result value와 상대 gradient 전체 finite를 확인한 proven Constant 경로에서만 생략한다. 일반 비영24outer는 기존 checked MKL GEMM이다. 필요한 H 항은 원래 left association을 유지하며 양쪽 implicit H일 때만 H576 전체를 생략한다. Compose는 실제 first/second/third 및 input/result value finite를 모두 요구한다. Atan2는 actual Cartesian 계수와 양 provenance로 H영을 증명하지만 std::atan2 value/first/bounded ratio/Reciprocal/Compose/directional/mixed 원래 식과 실패 경로는 계속 계산한다. radius_fourthInf 자체를 새 gate로 사용하지 않는다.
입력 또는 기존 allocated alias를 결과로 반환하지 않고 fresh Jet를 만든다. Allocated H의 기존 shared copy/첫 mutable write alias는 유지한다. 알려진 영 결과는 immutable zero를 읽는 readonly copy로 사용할 수 있으며 현재 생산 consumer는 그 결과에 raw derivative를 나중에 쓰는 경로가 없다. 모든 직접 Jet derivative 생산자는 기본false fresh 결과 또는 Variable seed에서 시작하며 true 전파는 쓰기 완료 후 증명한다. 값·분기·finite/진단·공개 결과에 영향이 없는 현재 raw H의 numeric zero 범위만 다루고 pair/canonical-zero 기준과 전역 flags/thread policy는 변경하지 않는다.
실제 corrected-prefix Debug 정식5edges build0, Ninja dependency 양수/private math header 확인, /Od /Ob0 /RTC1 /MDd /W4 /WX production TU oracle compile0, frozen33-case oracle native0를 확인했다. Value/first/directional/mixed 영 부호와 비영 bits는 strict, H의 양쪽 numeric zero만 부호 차이를 기록하며 NaN은 같은 failure 분류와 owner IsFinite 거부를 검증했다. Constant/seed/default-false unknown, finite·Inf·NaN scalar, Compose first/second/third 각각Inf/NaN, Sqrt0, Atan2 branch/singular/extreme scale, mixed-third, nonfinite gradient/H, allocated alias와 readonly zero-result copy chain을 반증했다. 33사례의 기록된 H zero-sign 차이는 모두0이며 provenance/alias 조건도 통과했다.
관련 shell residual/tangent/objectivity/patch, hidden graph/finite/initial Newton/기존serial-TBB-repeat 결정론 필터는 **actual53/53 PASS(native0/71.98초)**이다. 기존 serial/TBB fixture57.46초도 별도 기록했지만 이는 전체 모델 성능 기준이 아니다. 실행 source/컴파일 환경/argv/thread/native 및 모든 hash는 parent constant-debug-native.json/constant-debug-built-hashes.json/constant-debug-delivery.json에 보존한다. Debug library SHA25632077F5A27A0216E4EB8E9F785F88D70B5FF37FAE02127430DE3D40C18814, probe exeBA299678CF250BBEEF78A7E095C503315277A354938B67B0BAA80BA455D0EC0E, unit exe23DAFC468C20211D9B1CDD60365F448B76E33BDC5EE3478A80CF4DCEE27D090D.
현재 후보의 Release 비용·전체 shell 실행·현재 mixed-time·최종 전체Debug/C08/reference는 미실행이다. 과거 packed-mixed의 actual CTest61.25초/native61.4626626초 자료는 별도로 보존하며 이전60.69 표기를 이 source의 실행 시간으로 재사용하지 않는다. 시간 수치를 맞추기 위한 반복도 하지 않았다. 다음 단계의 원본 shell150초 안전 제한 개발 실행도 partial 진행을 시간 개선 비율이나100초 합격으로 바꾸지 않는다.
## Constant 고정 source의150초 안전 제한 개발 실행
Source commit c397a147b0e885384da8dee81ef645b9d0b17adb에서 corrected-prefix cl Release fesa_cli 정식4edges build native0/3.9286466초를 확인했다. 기존 T3 probe와 현재 scripts/performance/measure.py의 run_once/timeout/cleanup/precheck 계약을 재사용했으며 새 측정 framework를 만들지 않았다. parent PATH를 원시 파일 constant-shell-parent-path.txt에 저장하고 uv launcher의 일시 PATH와 분리했다. Target은 원시 parent PATH와 외부 MKL/OMP8threads, dynamic FALSE를 상속했다.
원본 byte-identical scratch input에서0warmup/1회 개발 전체 실행을 수행했고150초 안전 제한으로 중단됐다. Actual target elapsed150.09139460000006초, execution_state=timed-out/native1/execution_valid=false다. Wrapper의 metadata 수집을 포함한 외부 경과156.3597352초는 target elapsed와 구분한다. 마지막 accepted increment2/time0.2/iteration3이며 이 부분 진행을 시간 개선 비율/전체 모델 완료/100초 합격으로 사용하지 않는다. 입력 원본과 scratch hash는 동일하고 source/header/exe/DLL/build/thread/power/runtime identity 전후 unchanged=true다. 관련 fesa/VTune/cl process0 확인 후 CPU 토큰을 반환했다.
Release exe SHA7d3c48351a8b76dbc5274468fc9f205386d28521cde79633dcd970a861321143. Build/native/parent PATH, environment/identity 전후 및 timer facts는 parent constant-shell-native.json/development-constant-shell-before.json/development-constant-shell-after.json/development-constant-shell.json과 해당 run-1/native.json/run.json/stdout/solver log에 보존한다. 최종 HDF5가 없어서 reader/precheck와 blocking U comparator 및 UR warning 비교는 모두 미실행이다. 729node/101frame/schema2 또는 required reference PASS로 표시하지 않는다. 기존 원본이나 최종 H5를 수정하지 않고 현재 partial 파일과 timeout 자료를 보존했다. 추가 micro/profile/whole-run 반복은 하지 않았다.
다음 우선 후보는 profile에서 큰 EvaluateAssembly/EvaluateConstraintOperators 중복을 줄이는 exact true-trial internal constraint subset 재사용이다. False 위치/root 경로 및 external force/rate/acceleration primitive는 유지한다. 구체 context/q/v/direction/request/gate/lifetime 계획과 최소 private friend 범위를 먼저 검토한다. Node-local support6 AD는 support/비용 근거가 충분해진 경우의 비교 후보이며 현재 구현 범위를 확대하지 않는다.